SLM-125M · base model

A 125M-parameter language model, trained from scratch on US case law, SEC filings, and educational web text — pure next-token prediction, no instruction-tuning.

model card

Architecture

125.8M
parameters
16,384
vocab size
1,024
context length
~16.0
tokens per parameter
full architecture spec
parametervaluewhat it means
total parameters125.8Msize of the model — small enough to run inference on CPU with no GPU
vocabulary size16,384number of unique tokens the custom byte-level BPE tokenizer can produce
hidden size768width of each token's internal representation as it flows through the network
layers12number of stacked transformer blocks the input passes through
attention heads12parallel attention patterns computed per layer (head dim 64, standard multi-head attention)
feed-forward size3,072width of the expansion layer inside each block (SwiGLU activation)
context length1,024maximum number of tokens the model can attend over at once
tied embeddingsyesinput and output embedding matrices share weights, reducing parameter count
tokens per parameter~16.02.02B training tokens ÷ 125.8M params — a Chinchilla-style ratio; ~20 is considered compute-optimal
training

How it was built

Next-token prediction only, one epoch, no instruction data — this teaches the model to speak the legal/financial register fluently, but it has no notion of following an instruction or answering a question (that comes from the fine-tuned version).

2.02B
training tokens (1 epoch)
2.33
val loss
10.32
val perplexity
8×H100
~13 min, ≈$6.60 (est.)
case law — 35.5% SEC filings — 41.5% fineweb-edu — 23.0%
optimizer & schedule
learning rate6e-4 → 6e-5step size for weight updates; cosine decay from a high starting rate
warmup200M tokensgradually ramps up the learning rate at the start to avoid early instability
global batch size524,288 toktotal tokens averaged per optimizer step, via gradient accumulation
weight decay0.1regularization that discourages overly large weights
gradient clipping1.0caps the gradient norm to prevent destabilizing update spikes
playground

Try it

The completion will stream in here.
honest limitations

What this is (and isn't)

This is a base model, not a chatbot — it was trained only on next-token prediction over raw text, with no instruction-tuning or RLHF. Ask it to continue a sentence, not to answer a question or hold a conversation. At 125M parameters and 1 epoch over ~2B tokens, it speaks the legal/financial register fluently but has limited world knowledge — expect plausible-sounding continuations, not factual reliability. For grounded and open-domain Q&A, see the fine-tuned demo, or compare against a much larger fine-tuned model on the Gemma-2-2B demo.