π― Ekalavya DeepSeek-Class - Ultra-Powerful AI Model (61.73B params max)
Browse filesUltra-Powerful Transformer with RoPE+RMSNorm+SwiGLU+GQA. Up to 61.73B parameters. MIT License.
- README.md +130 -0
- config.json +22 -0
- pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- ekalavya
|
| 6 |
+
- deepseek-class
|
| 7 |
+
- language-model
|
| 8 |
+
- transformer
|
| 9 |
+
- education
|
| 10 |
+
- ncert
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# π― Ekalavya DeepSeek-Class
|
| 14 |
+
|
| 15 |
+
**Ultra-Powerful Transformer Language Model**
|
| 16 |
+
|
| 17 |
+
Ekalavya is a DeepSeek-class transformer model with advanced architecture designed for educational applications and general language understanding.
|
| 18 |
+
|
| 19 |
+
## π Model Architecture
|
| 20 |
+
|
| 21 |
+
### Features
|
| 22 |
+
- **RMSNorm** - Stable layer normalization
|
| 23 |
+
- **Rotary Position Embeddings (RoPE)** - Better length generalization
|
| 24 |
+
- **SwiGLU Activation** - Superior to GELU/ReLU
|
| 25 |
+
- **Grouped Query Attention (GQA)** - Efficient multi-head attention
|
| 26 |
+
- **Advanced Weight Initialization** - Xavier uniform + normal distributions
|
| 27 |
+
- **Extended Context** - Up to 8K tokens
|
| 28 |
+
|
| 29 |
+
### Configurations
|
| 30 |
+
|
| 31 |
+
| Config | Parameters | Layers | Dim | Heads | Use Case |
|
| 32 |
+
|--------|-----------|--------|-----|-------|----------|
|
| 33 |
+
| **Mini** | 64M | 8 | 512 | 8 | Fast inference, CPU |
|
| 34 |
+
| **Pro** | 309M | 16 | 1024 | 16 | Balanced performance |
|
| 35 |
+
| **Mega** | 2.08B | 32 | 2048 | 32 | Powerful, GPU |
|
| 36 |
+
| **Ultra** | 11.74B | 48 | 4096 | 64 | DeepSeek-class |
|
| 37 |
+
| **Flagship** | 61.73B | 64 | 8192 | 128 | Maximum capability |
|
| 38 |
+
|
| 39 |
+
## π Educational Integration
|
| 40 |
+
|
| 41 |
+
This model powers the **Ekalavya Education Platform** with:
|
| 42 |
+
- NCERT Q&A for Class 6-12
|
| 43 |
+
- Mathematics solver
|
| 44 |
+
- PDF/Word document generation
|
| 45 |
+
- Educational flowcharts
|
| 46 |
+
- Full-text search
|
| 47 |
+
|
| 48 |
+
## π οΈ Usage
|
| 49 |
+
|
| 50 |
+
### Load Model
|
| 51 |
+
|
| 52 |
+
```python
|
| 53 |
+
import torch
|
| 54 |
+
from transformers import AutoModel
|
| 55 |
+
|
| 56 |
+
# Load from Hugging Face
|
| 57 |
+
model = AutoModel.from_pretrained("hackerbhai/ekalavya-deepseek-class")
|
| 58 |
+
|
| 59 |
+
# Or load specific config
|
| 60 |
+
from ekalavya import create_model
|
| 61 |
+
model = create_model('pro') # or 'mini', 'mega', 'ultra', 'flagship'
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
### Generate Text
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
# Generate with the model
|
| 68 |
+
input_ids = torch.randint(0, 32000, (1, 10))
|
| 69 |
+
output = model.generate(
|
| 70 |
+
input_ids,
|
| 71 |
+
max_new_tokens=100,
|
| 72 |
+
temperature=0.8,
|
| 73 |
+
top_k=40,
|
| 74 |
+
top_p=0.95
|
| 75 |
+
)
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## π Training
|
| 79 |
+
|
| 80 |
+
This model was trained on:
|
| 81 |
+
- Open-source educational content
|
| 82 |
+
- Wikipedia (CC-BY-SA)
|
| 83 |
+
- Public domain materials
|
| 84 |
+
- NCERT curriculum data
|
| 85 |
+
|
| 86 |
+
**Training Features:**
|
| 87 |
+
- Character and token-level training
|
| 88 |
+
- Cosine annealing learning rate schedule
|
| 89 |
+
- Gradient clipping (max_norm=1.0)
|
| 90 |
+
- Weight decay (0.01)
|
| 91 |
+
|
| 92 |
+
## π― Capabilities
|
| 93 |
+
|
| 94 |
+
- β
Educational content understanding
|
| 95 |
+
- β
Question answering
|
| 96 |
+
- β
Text generation
|
| 97 |
+
- β
Mathematical reasoning
|
| 98 |
+
- β
Multi-language support (English, Hindi)
|
| 99 |
+
- β
Long-context processing (8K tokens)
|
| 100 |
+
|
| 101 |
+
## π Files
|
| 102 |
+
|
| 103 |
+
- `config.json` - Model configuration
|
| 104 |
+
- `pytorch_model.bin` - Model weights
|
| 105 |
+
- `tokenizer.json` - Tokenizer (if applicable)
|
| 106 |
+
- `training_args.bin` - Training arguments
|
| 107 |
+
|
| 108 |
+
## π‘οΈ License
|
| 109 |
+
|
| 110 |
+
**MIT License** - 100% free to use, modify, and distribute.
|
| 111 |
+
|
| 112 |
+
No copyright restrictions. Built from scratch.
|
| 113 |
+
|
| 114 |
+
## π Acknowledgments
|
| 115 |
+
|
| 116 |
+
Inspired by:
|
| 117 |
+
- DeepSeek architecture
|
| 118 |
+
- LLaMA innovations
|
| 119 |
+
- Transformer advancements
|
| 120 |
+
- Educational AI research
|
| 121 |
+
|
| 122 |
+
## π Contact
|
| 123 |
+
|
| 124 |
+
For questions or contributions, visit the [Ekalavya Platform](https://github.com/hackerbhai/ekalavya).
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
**Built with π― by combining AI and Education**
|
| 129 |
+
|
| 130 |
+
*Ekalavya - Named after the legendary self-taught archer from Mahabharata*
|
config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"EkalavyaDeepSeekClass"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "ekalavya",
|
| 6 |
+
"vocab_size": 1000,
|
| 7 |
+
"dim": 512,
|
| 8 |
+
"n_layers": 8,
|
| 9 |
+
"n_heads": 8,
|
| 10 |
+
"n_kv_heads": 4,
|
| 11 |
+
"hidden_dim": 2048,
|
| 12 |
+
"max_seq_len": 4096,
|
| 13 |
+
"rope_theta": 10000.0,
|
| 14 |
+
"dropout": 0.1,
|
| 15 |
+
"use_gqa": true,
|
| 16 |
+
"activation_function": "swiglu",
|
| 17 |
+
"normalization_type": "rmsnorm",
|
| 18 |
+
"position_embedding_type": "rotary",
|
| 19 |
+
"tie_word_embeddings": true,
|
| 20 |
+
"torch_dtype": "float32",
|
| 21 |
+
"transformers_version": "4.30.0"
|
| 22 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57636afbbd47d96a13f5f2fa7610dea537ec7ee113f90db3c389c12be8d5c4f6
|
| 3 |
+
size 127940725
|