Manas-64M · Mixture-of-experts pretraining
The mixture-of-experts variant of the base model: same width and depth, but every feed-forward layer is 4 experts with top-1 routing (0.2B parameters total, about 64M active per token).
Try it: chat Space · Every stage: collection · Code: github.com/kuluruvineeth/manas · Data: manas_dataset
Results
| value | |
|---|---|
| held-out loss | 2.772 |
| training loss, first → last log point | 5.769 → 2.747 |
| training steps | 11,554 |
| tokens processed | ≈189M (throughput × time) |
| wall-clock | 34 min at ~94k tokens/s |

Use
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "kuluruvineeth/manas-64m-pretrain-moe"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
messages = [{"role": "user", "content": "What is the capital of France?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**inputs, max_new_tokens=60, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
The export is a standard transformers checkpoint, so vLLM and SGLang load it with no custom code (vllm serve kuluruvineeth/manas-64m-pretrain-moe).
Training
- Lineage: starts from random weights.
- Method: next-token prediction plus a router load-balancing loss (coefficient 0.001).
- Data:
pretrain_t2t_mini.jsonl(the quick-start tier of the pretraining corpus) (sources and licenses). - Trainer:
trainer/train_pretrain.pywith--use_moe 1, peak learning rate 5e-4 (from the training log). - Hardware: one A100 or H100 GPU on Modal (
gpu/modal_train.py). - Architecture: Qwen3-MoE layout: 768 hidden, 8 layers, 8 query / 4 key-value heads (head dim 96), 4 SwiGLU experts of width 2,432 with top-1 routing, RoPE θ = 10⁶, tied embeddings, 6,400-token byte-level BPE vocabulary. 0.2B parameters total.
Limitations
English only. At this size the model has little world knowledge: it is confidently wrong about facts that need it, loses the thread in long conversations, and should not be used for anything that matters. It is a teaching and research artifact for studying how each training stage changes a model.
Files
model.safetensors,config.json,tokenizer.json,chat_template.jinja: the transformers exportpretrain_moe_768_moe.pth: the raw training checkpoint for the training codepretrain_moe_768_moe_metrics.jsonl,pretrain_moe_768_moe_curves.png: the training log and its plot