Instructions to use prometheus04/matilda-152m-v15-7.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prometheus04/matilda-152m-v15-7.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prometheus04/matilda-152m-v15-7.5B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("prometheus04/matilda-152m-v15-7.5B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prometheus04/matilda-152m-v15-7.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prometheus04/matilda-152m-v15-7.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prometheus04/matilda-152m-v15-7.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/prometheus04/matilda-152m-v15-7.5B
- SGLang
How to use prometheus04/matilda-152m-v15-7.5B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prometheus04/matilda-152m-v15-7.5B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prometheus04/matilda-152m-v15-7.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prometheus04/matilda-152m-v15-7.5B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prometheus04/matilda-152m-v15-7.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use prometheus04/matilda-152m-v15-7.5B with Docker Model Runner:
docker model run hf.co/prometheus04/matilda-152m-v15-7.5B
matilda-152m-v15
152M-parameter decoder-only transformer trained from scratch on a single A100 SXM4 40GB. Token-matched beats Pythia-160M on PIQA, ARC-easy, HellaSwag and LAMBADA at every checkpoint (avg +0.05 / +0.15 / +0.05 / +0.09); ties on Winogrande.
This is the HuggingFace-format mirror of checkpoint step 7150 (~7.50B
training tokens) from prometheus04/matilda-152m-v15-7.5B. Use it with:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"prometheus04/matilda-152m-v15-7.5B",
trust_remote_code=True,
torch_dtype="bfloat16",
).to("cuda")
tok = AutoTokenizer.from_pretrained("prometheus04/matilda-152m-v15-7.5B")
out = model.generate(**tok("The capital of France is", return_tensors="pt").to("cuda"),
max_new_tokens=40, do_sample=True, temperature=0.8)
print(tok.decode(out[0]))
Architecture
- 18 layers × 768 hidden × 12 attention heads / 4 KV heads (GQA, head_dim 64)
- RoPE (theta 10000), RMSNorm pre-norm, QK-Norm per head
- ReLU² FFN (Primer / modded-nanogpt; 2 matmuls instead of SwiGLU's 3)
- Final logit soft-cap 30.0 (Gemma-2 style)
- Tied input/output embeddings, GPT-2 BPE vocab (50 257)
Training recipe
- Muon hybrid optimizer (Muon for 2-D weights at lr=0.02, AdamW for 1-D params and embeddings at lr=3e-4 — no weight decay on norms/biases/embeddings)
- WSD schedule: 700 warmup, ~5160 stable at peak, ~1290 linear decay to min_lr_ratio=0.1 of peak
- 7150 optimizer steps × 1.05M tokens/step ≈ 7.5B total tokens, ~23h on A100 SXM4 40GB at 29.6 % avg MFU
- Liger-kernel RMSNorm + FusedLinearCrossEntropy at training (RoPE Triton
kernel bypassed — see
prometheus04/matilda-mini-v2docs/instance-run-2026-05-30/) - Data: 15B-token mix of FineWeb-Edu-dedup (83.3 %) + Cosmopedia v2 (16.7 %)
from
prometheus04/matilda-smollm-mix-15b-gpt2
Eval (lm-eval-harness, 0-shot, full splits)
Token-matched against published EleutherAI/pythia-160m revisions (closest-≥ matilda tokens):
| Task | Matilda (7.50B) | Pythia step4000 (8.39B) | Δ |
|---|---|---|---|
| PIQA acc | 0.649 | 0.592 | +0.057 |
| ARC-easy acc | 0.554 | 0.419 | +0.135 |
| HellaSwag acc_norm | 0.347 | 0.275 | +0.072 |
| Winogrande acc | 0.526 | 0.529 | -0.003 (tie) |
| LAMBADA acc | 0.287 | 0.248 | +0.040 |
Across all 10 saved checkpoints × 5 tasks: 41 wins, 3 ties, 2 losses (Winogrande only).
Full per-checkpoint curve: eval/matilda_results/ (10 JSON + summary.csv) and
eval/pythia_results/ (5 JSON) in this repo.
What's in this repo
model.safetensors,ckpt_750.pt … ckpt_7150.pt— final + 10 intermediate checkpointsconfigs/base_152m_v2.json— exact training configeval/—run_eval.py,run_pythia.py,matilda_lm.pyand the raw per-checkpoint JSON for both Matilda and Pythia-160Mtools/convert_to_hf.py,tools/verify_parity.py— checkpoint → HF-format conversion and parity checkmetrics.jsonl— training-time loss / MFU / grad-norm log
Reproduce
The full training stack, operating journal, and DeepSeek review bundle live in
prometheus04/matilda-mini-v2.
The 15B-token pre-tokenized corpus is
prometheus04/matilda-smollm-mix-15b-gpt2.
- Downloads last month
- 35
Model tree for prometheus04/matilda-152m-v15-7.5B
Unable to build the model tree, the base model loops to the model itself. Learn more.