ALEA R4 3B-A0.7B Base (preview)
Version: v0.1-preview (draft release, 2026-11-09). This is a preview of ALEA's R4 base model, published so that people can try it and give feedback. It is not the final R4 release; weights, evaluations and this card may change.
R4 is a 3.3B-parameter mixture-of-experts language model with about 0.67B parameters active per token. It was designed to train only on lawful data: U.S. legal, regulatory and financial public-record text (and English EU Official Journal text) from the KL3M Data Project, public-domain general text, and synthetic, dictionary, knowledge and task data created by ALEA. It is a base model: there is no instruction tuning, no preference or safety tuning, and no learning-rate decay phase. It is not legal advice.
What it is good and bad at, in short. On ALEA's own probes it scores higher than the latest single R4 checkpoint on closed-book factual recall, the knowledge probe, in-context tasks and JSON extraction. It is near chance on MMLU and BBH, fails conditional reasoning, does not know who made it, and invents names, figures, court captions and case holdings when it continues legal or financial text. Treat every fact, citation and number it produces as unverified.
| Architecture | stock Qwen3MoeForCausalLM (no trust_remote_code): 32 layers, d_model 1,280, 16 query / 8 KV heads (head_dim 128), QK-norm, RoPE (theta 1e6), 48 routed experts (FFN 512) with top-6 routing, tied input/output embeddings |
| Parameters | 3,315,557,632 (3.32B; 3.36B if the tied output head is counted separately); about 673M active per token |
| Context | 4,096 tokens |
| Tokenizer | alea-v2b-sw32k: 32,768-token BPE with control tokens and a chat template; <|start|> (id 0) is prepended automatically |
| Weights | one bf16 safetensors file, 6.6 GB |
| Stops | generation_config.json stops on <|end|> (id 1) and <|eot|> (id 7) |
| License | CC-BY-4.0 (WordNet-derived content: see WORDNET_LICENSE.txt) |
What this model is
This preview is a uniform weight average of four R4 pretraining checkpoints: steps 35,000, 45,000, 55,000 and
65,000. Each of the four is public as a branch of
alea-r4-3B-A0.7B-Base-ckpts
(s5-step35000, s6-step45000, s8-step55000, s9-step65000). Every weight is the plain mean of the four (in
fp32, then stored in bf16). No training was done after averaging.
| Training | OLMo-core on one NVIDIA GH200; 1,048,576 tokens per step; AdamW (betas 0.9 / 0.95, weight decay 0.1), learning rate 4e-4, constant after a 2,000-step warmup |
| Tokens seen | the four source checkpoints had seen about 36.7B, 47.2B, 57.7B and 68.2B tokens |
| Data segments | the sources come from four different data mixes (segments 4, 5, 7 and 8 of the R4 run) |
| Why average | among the single checkpoints and plain weight averages we tested, this one scored best on closed-book recall, grounding minimal pairs and JSON extraction, and near the best on the knowledge probe, at a cost in legal recitation (see Evaluation) |
The step-55,000 and step-65,000 checkpoints are on a line that branched from the step-52,000 checkpoint, so "tokens seen" counts that line only.
Quick start
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "alea-institute/alea-r4-3B-A0.7B-Base-preview"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16) # add device_map="auto" for GPU
model.eval()
inputs = tok("This Agreement shall be governed by and construed in accordance with", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=48, do_sample=False)
print(tok.decode(out[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
Output (greedy, bf16, CPU):
the laws of the State of California.
10.
Entire Agreement. This Agreement constitutes the entire agreement
between the parties with respect to the subject matter hereof and
supersedes all prior agreements, understandings, negotiations and
discussions, whether oral or written
Tested with transformers 5.17 only. Other versions with Qwen3-MoE support (4.51 or later) should load these
weights but were not tested; before 4.56 pass torch_dtype= instead of dtype=. The tokenizer config lists model_max_length 2,048; the model itself
takes 4,096 tokens.
Chat with a passage. The chat template wraps turns as <|user|> … <|eot|> and opens <|assistant|>. Put
source text in a <|context|> block with numbered <|snippet|> passages:
context = ("<|context|>\n<|snippet|>[1] Lease Agreement, Section 4 (Rent)\nTenant shall pay Landlord a monthly base "
"rent of $5,875.00, due on the first day of each calendar month. A late fee of five percent (5%) applies to "
"any payment received after the fifth day of the month.<|/snippet|>\n<|/context|>")
messages = [{"role": "user", "content": context + "\nWhat late fee applies to a late rent payment? Cite the source."}]
enc = tok.apply_chat_template(messages, add_generation_prompt=True, return_dict=True, return_tensors="pt")
out = model.generate(**enc, max_new_tokens=48, do_sample=False)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=False))
# A late fee of five percent applies to any payment received after the fifth day of the month.<|eot|>
The answer is correct, but the model did not add the citation the prompt asked for.
Evaluation
All numbers are from ALEA's evaluation runs on the training-framework weights in bf16, greedy decoding where
generation is involved. "78k" is the public single checkpoint s10-step78000, the latest R4 checkpoint, and
"avg 73-75k" is an unpublished uniform average of steps 73,000-75,000. The bracketed deltas are paired 95% bootstrap
intervals (20,000 resamples, clustered by item) of this model minus 78k; they cover item sampling only, not
checkpoint-to-checkpoint noise. About 30 metrics are compared, so an occasional interval that excludes zero can be
chance.
External benchmarks: near chance for every R4 model.
| benchmark | this model | 78k | avg 73-75k | chance |
|---|---|---|---|---|
| MMLU, 1,140-question sample, length-normalised cloze (%) | 31.0 | 31.4 | 32.5 | 25 |
| MMLU, same sample, letter answer (%) | 29.4 | 27.1 | 28.1 | 25 |
| BBH logic multiple-choice subset, 3-shot (%) | 31.6 | 32.1 | 33.3 | about 31.4 |
The MMLU interval vs 78k is -0.4 [-4.2, +3.4] (unpaired); BBH is -0.5 [-2.3, +1.3].
ALEA probes. These are internal test sets built for this model family (multiple-choice knowledge items, short factual questions, in-context tasks, legal recitation). They track progress across R4 checkpoints and are not comparable to public benchmarks.
| probe | this model | 78k | avg 73-75k | this model minus 78k |
|---|---|---|---|---|
| Knowledge probe, 4-way multiple choice scored by PMI likelihood of each option (%, chance 25) | 82.0 | 76.6 | 77.8 | +5.4 [+2.3, +8.8] |
| Closed-book short answers, 0-shot exact match (%) | 92.7 | 87.4 | 89.4 | +5.3 [+3.8, +7.0] |
| Closed-book short answers, 3-shot exact match (%) | 64.3 | 41.9 | 46.2 | +22.4 [+19.6, +25.2] |
| In-context task suite, 4-shot (%) | 81.2 | 76.8 | 79.6 | +4.4 [+1.4, +7.4] |
| Grounding minimal pairs: two passages differ in one detail, both answers right (%) | 73.8 | 57.1 | 58.1 | +16.7 [+10.5, +22.9] |
| … of which the detail is whether a condition is met (%, 30 pairs) | 3.3 | 0.0 | 0.0 | |
| JSON extraction, typed fields correct (%) | 91.8 | 76.8 | 79.5 | +15.0 [+11.2, +18.8] |
| JSON extraction, whole object exact (%) | 54.7 | 14.1 | 18.8 | +40.6 [+28.1, +53.1] |
| Generated case citations real and correctly attributed (%) | 89.3 | 79.2 | 82.1 | not separable (44 items) |
| Generated case citations invented (%, lower is better) | 3.6 | 7.8 | 4.5 | not separable |
| Proposition → supporting case (%) | 69.1 | 73.9 | 75.8 | -4.8, not separable |
| U.S. Code section recitation, exact (%) | 32.6 | 45.5 | 50.5 | -12.9 [-20.1, -5.7] |
| U.S. Code verbatim recitation, ≥ 16-token prefix (%) | 48.0 | 58.0 | not run | -10.0 [-20.7, +0.7] |
| Holding → case name, canon cases (%) | 11.8 | 20.6 | 20.6 | |
| Summary coverage of source facts (%) | 92.6 | 96.3 | 96.9 | -3.7 [-7.0, -0.5] |
| Summary contradictions (%, lower is better) | 12.5 | 9.4 | 7.8 | not separable |
| Template leak on bare word problems (%, lower is better) | 65.0 | 51.0 | 52.0 | +14.0 [+3.0, +25.0] |
| Held-out bits per byte, macro over 7 domains (lower is better) | 0.4256 | 0.4508 |
The held-out BPB gain is mostly on synthetic and contract text. This model is slightly worse than 78k on case law (0.613 vs 0.601), court dockets (0.620 vs 0.603) and 10-K filings (0.349 vs 0.315).
Conversion check. The bf16 safetensors export, loaded in stock transformers with fp32 compute, matches the
training framework's forward pass with the same weights on 5 real prompts and 1 chat prompt: max |Δlogit| 1.6e-5,
top-1 agreement 1.0, 6 of 6 greedy continuations identical.
Release behaviour checks
Run on the published bf16 weights (commit 239536d1) after this preview was made public, using the R3 release sets and decoding settings; the suites run locally and only scores are published. One harness setting differs from R3: the copyright run sets the document-start token explicitly, because the harness's automatic detection does not recognise the R4 tokenizer; this keeps the start token R3 also received. No run without it was made. The regurgitation and PII checks shown on the R3 card were not run for this preview. R3-final columns are copied from the R3 card.
Copyright memorization (text not in the public domain). Sequences that Pythia memorized from the Pile and that overlap known in-copyright book text, prompted with 32 tokens and scored on the next 32 (Biderman et al. 2023), and excerpt sets from HELM, MUSE-Books, BookMIA and CoTaEval (50-token prefix and suffix). Prompts start with the document-start token, as in training.
| Set | This model | R3-final |
|---|---|---|
| Pile-memorized book prose (59): greedy exact / exact-suffix probability ≥ 0.1% | 0 / 1 | 0 / 1 |
| same, deduplicated-Pile split (63) | 0 / 0 | 0 / 0 |
| Copyright-page boilerplate from the same books (350): exact | 0 (1 character-level only) | 0 (1 character-level only) |
| HELM books, MUSE-Books, BookMIA, CoTaEval books and news, MUSE-News (1,520): exact / probability ≥ 0.1% | 0 / 0 | 0 / 0 |
The character-level boilerplate match is the same item as R3's: a run of consecutive dates after a Bible verse, which GPT-2 also reproduces; it is not a token-exact reproduction. The additional one-item Pile duped.160m prose group has 0 exact matches and 1 suffix-probability hit ≥ 0.1%.
This passes only R3's copyright exact-reproduction gate: no token-exact matches on the non-public-domain sets and no character-exact matches on non-public-domain prose or excerpts. Character-only boilerplate matches and suffix-probability hits do not fail that gate. It does not establish the absence of memorization or copyright compliance.
The Pile book-overlap sets also contain public-domain texts that books quote (214 sequences, excluded above). Of the 20 founding-document sequences (the Constitution Preamble, the presidential oath, the Declaration of Independence), this model reproduces 5 token-exactly and 9 at character level (R3-final: 9 and 14); of the 194 King James Bible sequences, none (R3-final none).
Toxicity, secondary classifier measure (the KL3M paper's protocol, as on the R3 card): 1,000 "challenging" RealToxicityPrompts prompts, greedy plus 5 samples (T = 1.0, top-p 0.9), ~100 characters each, scored by two local classifiers; EMT = expected maximum toxicity with a 95% bootstrap interval. Levels are not comparable with Perspective-API figures.
| Model | EMT RoBERTa [95% CI] | P(any ≥ 0.5) | Greedy ≥ 0.5 | EMT toxic-bert |
|---|---|---|---|---|
| This model | 0.47 [0.44, 0.50] | 0.47 | 0.38 | 0.49 |
| R3-final | 0.46 [0.43, 0.49] | 0.46 | 0.36 | 0.46 |
| R3 stable-31000 | 0.41 [0.38, 0.44] | 0.41 | 0.33 | 0.42 |
- This model's RoBERTa EMT is 0.473, above the 0.46 point-estimate limit used for the R3 release (the upper end of R2-final's interval); under that rule this release would have been held, and the preview was already public when this was measured. R3-final scored 0.458. Paired over the same prompts, the difference from R3-final is +0.015 [95% CI −0.021, +0.052] for RoBERTa, an interval that includes zero, and +0.030 [+0.001, +0.059] for toxic-bert, which excludes zero. A classifier scores surface words: it cannot separate quoted abuse (court records, transcripts) from use, and it cannot rule out a rise in the model's own abusive language.
- LLM-judge toxicity, our designated primary measure, intended to separate use from quotation, has not been run for this model. Human calibration of the R3 judge also remains pending.
Intended use
- Research on small models designed to train only on lawful, provenance-tracked data; comparison with the R4 checkpoints.
- Continuing U.S. legal, regulatory and financial text; short answers grounded in a passage you supply; field extraction to JSON.
- A starting point for fine-tuning.
It is not meant for unsupervised use, for any decision about a person, or as a source of legal, financial or factual answers without checking.
Known limitations
- No general reasoning. MMLU is only a few points above its 25% chance level, and BBH logic is at its chance
level (above). Given two passages that differ only in whether a
condition is met, it answers both correctly in 1 of 30 pairs (3.3%). On a short ordering puzzle ("who filed last?") it reasons inside a
<|think|>block and gives the wrong name. - Wrong identity. It was meant to say it is a language model created by the ALEA Institute. It has not learned this. Asked "Who made you?" it answers "Matt Groening created the creation known as Marge Simpson."
- Invented names, figures and captions. Continuing a sentence on what a Section 1983 plaintiff must allege, it went on to write an invented court caption with the same made-up person as plaintiff and defendant. Continuing a 10-K, it wrote figures that contradict each other ("$1,000,000, a decrease of $1,000,000, or 100%, from $2,000,000"). Asked to continue "In Marbury v. Madison, the Supreme Court held that", it gives a wrong holding. Its generated citations are mostly real, but some are invented and some point to the wrong case. Court and SEC records name real people, so it can also reproduce real names, not only invent them.
- Template leaks on bare prompts. Training included many formatted task examples. On plain prompts it often adds
a
<|think|>block or anAnswer:line (65% of bare word problems), sometimes writes a new practice item after answering, sometimes answers with a Python code block (45 of 378 bare prompts), and greeted with "Hi" it writes an unprompted encyclopedia-style biography. - Weaker legal recitation than the late checkpoints. It recites U.S. Code sections and links holdings to cases
less well than
s10-step78000(table above). If verbatim recall of primary law matters most, compare that branch. - Some invented-record training data. Part of the synthetic task data in the middle of the R4 run rendered fictional records (contracts, filings, rosters) with invented names and field values. Later data mixes retired or filtered several of these sets, but all four averaged checkpoints had already trained on them. We suspect, but have not shown, that this contributes to the invented names above.
- Base model behaviour. No safety tuning. It can produce offensive, biased or false text, and it can repeat passages from its training data, which is public-record text such as statutes and court opinions.
- English and U.S.-centric. It is weak at code, open-ended writing and facts about obscure entities.
Data provenance
This model is not Fairly Trained certified. It was designed to train only on public-domain, CC0, permissively licensed or ALEA-created data:
- U.S. legal, regulatory and financial public-record text from the KL3M Data Project: U.S. Code, eCFR, Federal Register and other U.S. government publications, including pages from U.S. government (.gov) websites; court opinions and court records; SEC EDGAR filings; USPTO patents. These are government works, court records and public filings.
- The Official Journal of the European Union, English only (a small share of the mix), reused under Commission Decision 2011/833/EU. Source: © European Union, https://eur-lex.europa.eu.
- Public-domain general text: Project Gutenberg books in the U.S. public domain, and Wikidata facts (CC0). Wikipedia (CC-BY-SA) was not used.
- ALEA datasets, CC-BY-4.0: the OpenGloss dictionary and encyclopedia (partly LLM-generated; WordNet-derived rows under the Princeton WordNet License), OpenLemma logic, arithmetic and program data, and task, knowledge, citation and grounded-QA data. These were produced deterministically from public-record text and structured data, or with OpenAI and open-weight models, and checked by code or by judges where possible. Many of them are published under alea-institute and mjbommar on Hugging Face.
By design, no general web crawl (the only web pages are from U.S. government .gov sites) and no books under copyright were included. This describes what the model was trained on; it is not a promise about outputs.
Citation
A paper describing the ALEA models is in preparation. Until then, please cite this repository.