Downloads · 30 days
10
10% of all-time downloads
rajofearth/Chinchilla-1-73M
Chinchilla-1-73M is a text generation model from rajofearth. Use it when you need the model to write or continue text. It is set up for nanochat. The card lists the license as gpl-2.0.
Downloads · 30 days
10
10% of all-time downloads
All-time downloads
97
Public
Repo size
295 MB
Likes
3
Public
Click a slice to open those files.
.pt294 MB · 100%
From the Hugging Face model README

Chinchilla-1 is a ~73.5M parameter instruction-tuned language model built on the nanochat d6 architecture. The name references Chinchilla scaling laws — this is a research-scale model, not a production LLM.
This model was created as a learning exercise in SFT infrastructure (Modal, torchrun, MuonAdamW) and to explore nanochat's custom architecture (value embeddings, smear mechanism, backout residuals). It should be treated as a baseline for understanding how small transformers behave after SFT — not as a usable chatbot.
<|python_start|> / <|python_end|> tokens to invoke Python for tasks like letter counting. Both checkpoints correctly emit 'strawberry'.count('r') and interpret the result. See evaluation Q7.s == s[::-1] with alphanumeric filtering). See evaluation Q6.<|user_start|> / <|assistant_start|> conversation markers with no format breakages. Fluent, grammatically correct English prose. See evaluation §5.3–5.4.NANOCHAT_DTYPE).This model has severe limitations that make it unsuitable for any factual or reasoning task without augmentation.
| Property | Value |
|---|---|
| Params | 73,531,646 |
| Layers | 6 |
| Embed dim | 384 |
| Attention heads | 6 (full MHA, no GQA) |
| Context (SFT) | 2048 tokens |
| Context (pretrain) | 512 tokens |
| Vocab | 32,768 BPE (rustbpe + tiktoken) |
| Activation | ReLU² (relu(x)²) |
| Position encoding | RoPE (rotary) |
| Norm | RMSNorm (manual implementation) |
| Window pattern | "L" — full causal attention on all layers |
Custom innovations (see ARCHITECTURE.md for full details):
32768 × 384 embedding tables injected into the residual stream via learned gates. Account for ~51% of total parameters (~37.7M of 73.5M).tanh at 15) — prevents overconfident predictions.Not weight-tied. Embedding and LM head are separate parameter matrices (2 × 12.6M params).
Parameter breakdown:
| Component | Parameters |
|---|---|
| Token embedding | 12,582,912 |
| Value embeddings (3 layers) | 37,748,736 |
| LM head (unembedding) | 12,582,912 |
| 6× Transformer (attention + MLP) | ~10,616,832 |
| Scalars & gates | 254 |
| Total | 73,531,646 |
model_001500.pt checkpoint was trained with KD from LFM2.5-350M (cross-tokenizer KD — limitations documented in the SFT report).Hyperparameters: max_seq_len=2048, total_batch_size=524,288 tokens, device_batch_size=2 (KD run), AdamW for embeddings (LR 0.424) + Muon for matrix params (LR 0.02), linear warmup→constant→decay schedule over 1,500 steps.
⚠️ Not compatible with llama.cpp, Ollama, LM Studio, or HuggingFace Transformers'
from_pretrained. This model uses a custom nanochat architecture that requires the nanochat inference engine.
# Install dependencies
pip install torch tiktoken rustbpe
# Run inference
python inference.py --prompt "Write a Python function to reverse a string."
See inference.py — it loads the checkpoint and tokenizer from this repo.
<|bos|><|user_start|>Your message here<|user_end|><|assistant_start|>
Tool calls use <|python_start|>, <|python_end|>, <|output_start|>, <|output_end|> tokens for Python REPL integration.
| File | Description |
|---|---|
checkpoints/sft/model_001500.pt | Best SFT checkpoint (KD run, step 1500, val_bpb 0.4763) |
checkpoints/sft/meta_001500.json | Training metadata (config, metrics) |
checkpoints/tokenizer/tokenizer.pkl | rustbpe tokenizer for tiktoken |
The alternative non-KD checkpoint (sft-d6, step 971, val_bpb 0.4891) is available on the Modal volume archive if needed.
A manual qualitative evaluation across 12 questions spanning factual knowledge, reasoning, math, code, tool use, and creative writing was conducted. Full results and example outputs in evaluations/checkpoints/report.md.
Scorecard (sft at step 1500 vs non-KD checkpoint at step 971):
| Metric | Count |
|---|---|
| sft wins | 2 |
| d6 wins | 3 |
| Ties | 7 |
The additional 529 SFT steps improved fluency modestly without improving factual accuracy. See the full checkpoint evaluation report for detailed question-by-question analysis.
max_tokens=64 for production use.@misc{chinchilla1_73m,
title={Chinchilla-1: A Research-Scale nanochat SFT Experiment},
author={Yashraj Maher},
year={2026},
howpublished={\url{https://huggingface.co/rajofearth/Chinchilla-1-73M}}
}
Built on karpathy/nanochat (MIT license). Training on Modal cloud GPUs. SFT data includes SmolTalk by HuggingFaceH4, MMLU by hendrycks, GSM8K by OpenAI. The nanochat architecture and training recipe are the work of Andrej Karpathy and contributors.