Vizuara AI Labs · trained from scratch

SLM‑500M

A 518-million-parameter Llama-style language model, pretrained from random weights on the same legal and financial corpus as its 125M sibling. Give it the start of a sentence and it continues in the legal register.

517.8M
parameters
32,768
vocab
1,024
context
2.08B
train tokens
7.91
val perplexity
0.588
bits / byte
5
epochs
Validation metrics along the 500M lineage
Each perplexity is measured on that stage's own validation set, so read the trend as 'how well the model fits its own stage's data', not as one curve on one dataset. DPO and RLAIF optimize preferences rather than likelihood, so they log preference margin and reward instead of perplexity. Click a stage to open that model.
Base
ppl 7.91
pretrain val
QA SFT
ppl 5.41
QA val
Instruct
ppl 6.69
instruction val
DPO
margin 88.0%
preference val, no ppl
/
RLAIF
reward 6.7→10.1
RM reward, no ppl
RAFT on DPO
ppl 1.95
RAFT val
/
RAFT on RLAIF
ppl 2.01
RAFT val
your prompt (a prefix to continue)
ready
The completion will appear here.

What this is base completer

This is a base model, not a chatbot. It was trained on next-token prediction only, so it continues text rather than answering questions. Prompt it with the opening of a sentence and watch it complete the thought.

The honest quality metric is held-out validation perplexity: 7.91 (lower is better), reached over 5 epochs of pretraining. It speaks the legal register fluently (case-citation phrasing, procedural language) but it does not know facts reliably: at ~2 bits per parameter, 518M parameters hold only about 129MB of usable knowledge. Four times the 125M's capacity, still far short of knowing case law. Grounded facts need retrieval (RAG).

Why we quote bits‑per‑byte, not just perplexity. This model uses a 32K tokenizer; the 125M uses 16K, and perplexity is measured per token, so the two perplexities are not directly comparable: a bigger vocabulary packs more text into each token, making each prediction intrinsically harder. That gap is loudest early in training, when a raw perplexity comparison actively misleads: at step 1000 this model read perplexity 19.4 against the 125M's 16.5 at the same step, yet in bits‑per‑byte the two were already neck and neck. Bits‑per‑byte divides by the UTF‑8 bytes of the underlying text, so it is tokenizer‑invariant. On that honest footing the 500M finishes ahead of the 125M on both measures: 0.588 bits/byte vs 0.632, and 7.91 perplexity vs 8.36.

stream 3 datasets clean rule chain dedup + decontaminate 32K byte-level BPE pack 1024-token windows pretrain 8×B200, 5 epochs

Corpus: US case law (~40%), SEC filings (~40%), educational web text (~20%). First call may take ~15–30s while the model wakes from idle.

what this model cost to build
$117.04 total to assemble, on real Modal billing
Data & tokenization $1.35Pretraining $115.69
StageCostShare
Data pipeline32K tokenizer + re-tokenize (CPU); corpus cleaning is shared with the 125M$1.351.2%
Pretraining5 epochs on 8x B200, 10.4B tokens seen, incl. smoke runs$115.6998.8%
Total to assemble$117.04100%

Almost all of it is one line: 5 epochs of pretraining on 8x B200. Building the corpus and the tokenizer that fed it cost $1.35; the GPUs that learned from it cost $115.69.

Figures are actual invoiced Modal usage (GPU + CPU + memory) for this model’s lineage, not estimates. Serving is billed separately and scales to zero.