/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
262 млн
Лицензия
CC BY 4.0
Архитектура
qwen3_moe · MoE
Библиотека
transformers
Опубликована
15 ноя 2026

alea-r4-3B-A0.7B-Base

Генерация текстаТекст → текст4 профессии
175скачиваний за 30 дней2лайкавеса обновлены15 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Базовая языковая модель ALEA на архитектуре Qwen3 MoE для генерации текста и экспериментов с юридическими и деловыми материалами.

ALEA Institute выпустил ALEA-R4-3B-A0.7B-Base-R0 — базовую языковую модель для продолжения текста и работы с юридическими и деловыми материалами. Она построена на архитектуре Qwen3 MoE и загружается как стандартная Qwen3MoeForCausalLM через Transformers без удалённого кода. В модели 3,32 млрд параметров, из которых около 673 млн активны на токен; контекст — 4096 токенов. Модель принимает и выдаёт текст, карточка указывает английский язык.

Чекпойнт получен усреднением весов четырёх этапов предварительного обучения. По внутренним проверкам ALEA он показывает результаты на извлечении полей в JSON, ответах на фактические вопросы и создании ссылок на судебные дела. Это базовая модель без дообучения на инструкциях и предпочтениях, поэтому для диалога и прикладных систем её обычно требуется дополнительно адаптировать. Лицензия — CC BY 4.0.

Модель может генерировать ложные факты, вымышленные или ошибочно атрибутированные юридические ссылки, предвзятый и оскорбительный текст; её рассуждения общего назначения слабы. Она не предназначена для юридических консультаций, неконтролируемого использования или принятия решений о людях. Указанные в карточке результаты по токсичности и воспроизведению текста основаны на ограниченных проверках и не доказывают отсутствия вредных выходов или запоминания данных.

Сценарии применения

  • черновая генерация юридического и делового текста
  • извлечение полей из документов в JSON
  • ответы на фактические вопросы по тексту
  • создание и проверка черновых ссылок на судебные дела

Ограничения

Это базовая модель без настройки на инструкции и безопасность; она может выдавать ложные факты, предвзятый или оскорбительный текст и ошибочные юридические ссылки. Слабые общие рассуждения и результаты ограниченных внутренних тестов не делают её пригодной для юридических консультаций или решений о людях.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

ALEA R4 3B-A0.7B Base

Release R0, 2026-11-15. A 3.3B-parameter mixture-of-experts base model (about 0.67B active per token) for U.S. legal, regulatory and financial text, trained only on lawful data:

  • U.S. public-record legal, regulatory and financial text from the KL3M Data Project, plus English EU Official Journal text;
  • public-domain general text;
  • synthetic, dictionary, knowledge and task data created by ALEA.

No general web crawl and no in-copyright books were used.

Highlights

  • Zero copyright reproductions. On the Pile-memorized book sets and 1,520 book and news excerpts, it reproduces no text that is not in the public domain. GPT-2 also scores 0; Pythia-1B reproduces 506 such sequences.

  • Low toxicity for its size. Its completions are flagged as toxic language use about half to a third as often as those of other open base models of similar size:

    modeltoxic-use rate (KL3M set 002, first sample)
    KL3M-003-1.7b3.8%
    R3-final (alea-r3-moe-2b-a417m)6.4%
    this model7.6%
    Qwen3.5-2B-Base13.9%
    Comma-v0.1-2T22.0%
    Granite-3.1-1B-A400M24.1%
  • Useful on legal and business text. On ALEA's own probes it gets:

    • 92.7% on closed-book factual answers (0-shot);
    • 91.8% of typed fields right in JSON extraction;
    • 82.0% on a 4-way knowledge probe;
    • 89.3% of the case citations it generates real and correctly attributed.
  • Stock architecture. It loads as a plain Qwen3MoeForCausalLM in transformers; no remote code is needed.

What it is reasonable for

  • Continuing legal, regulatory and financial text: contracts, statutes and regulations, filings, court documents.
  • Short answers grounded in a passage you supply, using the <|context|> / <|snippet|> format below.
  • Field extraction to JSON from documents.
  • A base for fine-tuning on legal and business tasks, where the provenance of training data matters.
  • Research on models trained only on lawful, provenance-tracked data.

Treat its output as something to check, not as an authority (see the notes at the bottom).

Quick start

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "alea-institute/alea-r4-3B-A0.7B-Base"
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

Answering from a passage. The chat template wraps each turn as <|user|> … <|eot|> and then 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|>

Versions.

  • Tested with transformers 5.17; the release behaviour checks ran with 4.57.6.
  • Other versions with Qwen3-MoE support (4.51 or later) should work but were not tested. Before 4.56, pass torch_dtype= instead of dtype=.
  • The tokenizer config lists model_max_length 2,048, but the model takes 4,096 tokens.

Special tokens.

  • <|start|> (0) opens every document and is prepended automatically; <|end|> (1) ends a document; <|pad|> (2); <|eot|> (7) ends a chat turn.
  • Chat roles: <|system|>, <|user|>, <|assistant|>, <|tool|>.
  • Sources: <|context|> … <|/context|> holding <|snippet|> … <|/snippet|>; citation and quotation: <|cite|>, <|quote|>; reasoning: <|think|> … <|/think|>.
  • Ids 0-225 are control or reserved special tokens.

Model details

Architecturestock Qwen3MoeForCausalLM: 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
Parameters3,315,557,632 (3.32B; 3.36B if the tied output head is counted separately); about 673M active per token
Context4,096 tokens
Tokenizeralea-v2b-sw32k: 32,768-token BPE with 226 control and reserved special tokens and a chat template
Weightsone bf16 safetensors file, 6.6 GB
Stopsgeneration_config.json stops on <|end|> (id 1) and <|eot|> (id 7)
LicenseCC-BY-4.0 (WordNet-derived content: see WORDNET_LICENSE.txt)

How it was made. R0 is a uniform weight average of four R4 pretraining checkpoints: steps 35,000, 45,000, 55,000 and 65,000.

  • Each source is public as a branch of alea-r4-3B-A0.7B-Base-ckpts: s5-step35000, s6-step45000, s8-step55000 and s9-step65000.
  • Every weight is the plain mean of the four, computed in fp32 and stored in bf16. No training was done after averaging.
  • In our evaluation suite the average scored above the single checkpoints on closed-book recall, grounding minimal pairs and JSON extraction, and within about a point of the best average on the knowledge probe (82.0 vs 83.2).
TrainingOLMo-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 seenthe four source checkpoints had seen about 36.7B, 47.2B, 57.7B and 68.2B tokens
Data segmentsthe sources come from four data mixes (segments 4, 5, 7 and 8 of the R4 run)

The step-55,000 and step-65,000 checkpoints are on a line that branched from step 52,000; "tokens seen" counts that line.

Same weights as the preview. model.safetensors is byte-identical to the one in alea-r4-3B-A0.7B-Base-preview (sha256 a5520e80c411b48b87a2aac0257a0ebb2b45bef121c619a13e30da6bee89e973), as are the config, generation config and tokenizer files. This release adds the evaluations below. The tag r0 marks it.

Evaluation

All generation is greedy unless stated. "78k" is the latest single R4 checkpoint (s10-step78000); "avg 73-75k" is an unpublished average of steps 73,000-75,000. Brackets are paired 95% bootstrap intervals of this model minus 78k.

Copyright memorization

Pile-memorized sequences that overlap in-copyright book text (Biderman et al. 2023; 32-token prompt, next 32 scored), and book and news excerpts from HELM, MUSE-Books, MUSE-News, BookMIA and CoTaEval (50-token prefix and suffix). Lengths are in Pythia (GPT-NeoX) tokens. Cells are n / token-exact / character-exact / exact-suffix probability ≥ 0.1%.

setthis modelR3-finalGPT-2Pythia-1B (v0)
non-public-domain exact matches000506
Pile-memorized book prose, duplicated Pile59 / 0 / 0 / 159 / 0 / 0 / 159 / 0 / 0 / 159 / 58 / 58 / 54
same, deduplicated Pile63 / 0 / 0 / 063 / 0 / 0 / 063 / 0 / 0 / 063 / 30 / 30 / 46
book and news excerpts1,520 / 0 / 0 / 01,520 / 0 / 0 / 0not runnot run
copyright-page boilerplate from the same books350 / 0 / 1 / 0350 / 0 / 1 / 0350 / 0 / 1 / 2350 / 328 / 328 / 339

The one boilerplate character match (the same item for all three of this model, R3-final and GPT-2) is a run of dates after a Bible verse. Public-domain texts quoted in these books (King James Bible, founding documents; 214 sequences) are excluded above; this model reproduces 9 of them at character level (R3-final 14).

Toxicity: LLM judge

KL3M toxicity protocol with a local judge (allenai/Olmo-3.1-32B-Instruct): one blind request per (completion, coding), 3 codings at temperature 0.5, each a 0-10 score plus whether the text uses toxic language, references it, or neither. A prompt is flagged if a completion is judged toxic use with score ≥ 5. RealToxicityPrompts: 1,000 "challenging" prompts, 5 samples (T 1.0, top-p 0.9) and greedy. KL3M sets: greedy and 3 samples at T 0.5. Differences are paired over prompts complete for both models.

setdecodingthis modelR3-finaldifference [95% CI]
RealToxicityPrompts (1,000)5 samples38.5%39.4%-0.7 [-4.3, +3.0] (n 921)
RealToxicityPromptsgreedy24.5%28.1%-3.3 [-6.6, -0.1] (n 986)
KL3M toxicity set 002 (500)3 samples18.7%19.9%-1.7 [-5.6, +2.5] (n 484)
KL3M set 003, bias prompts (50)greedy16.0%6.0%+10.0 [+2, +18] (n 50)
KL3M set 003, bias prompts (50)3 samples10.0%14.3%-6.1 [-16.3, +4.1] (n 49)

The comparison with other models (Highlights) uses the first sampled continuation on KL3M set 002; this model is above KL3M-003-1.7b (+3.8 [+1.2, +6.4]) and below the other three open models.

Toxicity: classifiers

KL3M paper classifier protocol: the same 1,000 RealToxicityPrompts, greedy plus 5 samples of about 100 characters, scored by two local classifiers. EMT = expected maximum toxicity (not comparable with Perspective-API figures).

modelEMT RoBERTa [95% CI]P(any ≥ 0.5)greedy ≥ 0.5EMT toxic-bert [95% CI]
this model0.477 [0.447, 0.508]0.4740.3830.498 [0.475, 0.523]
R3-final0.458 [0.428, 0.485]0.4570.3600.465 [0.439, 0.490]

Paired against R3-final: +0.019 [-0.016, +0.054] (RoBERTa) and +0.033 [+0.005, +0.062] (toxic-bert). KL3M-003-1.7b scores 0.24 on the same harness. Classifiers score surface words and cannot separate quoted language (court records, transcripts) from use, which the judge above is meant to do.

ALEA probes

Internal test sets built for this model family; they track progress across R4 checkpoints and are not comparable to public benchmarks.

probethis model78kavg 73-75kthis model minus 78k
Knowledge probe, 4-way multiple choice (PMI), chance 2582.076.677.8+5.4 [+2.3, +8.8]
Closed-book short answers, 0-shot exact92.787.489.4+5.3 [+3.8, +7.0]
Closed-book short answers, 3-shot exact64.341.946.2+22.4 [+19.6, +25.2]
In-context task suite, 4-shot81.276.879.6+4.4 [+1.4, +7.4]
Grounding minimal pairs, both answers right73.857.158.1+16.7 [+10.5, +22.9]
… of which the detail is whether a condition is met (30 pairs)3.30.00.0
JSON extraction, typed fields correct91.876.879.5+15.0 [+11.2, +18.8]
JSON extraction, whole object exact54.714.118.8+40.6 [+28.1, +53.1]
Generated case citations real and correctly attributed89.379.282.1not separable (44 items)
Generated case citations invented (lower is better)3.67.84.5not separable
Proposition → supporting case69.173.975.8-4.8, not separable
U.S. Code section recitation, exact32.645.550.5-12.9 [-20.1, -5.7]
U.S. Code verbatim recitation, ≥ 16-token prefix48.058.0not run-10.0 [-20.7, +0.7]
Holding → case name, canon cases11.820.620.6
Summary coverage of source facts92.696.396.9-3.7 [-7.0, -0.5]
Summary contradictions (lower is better)12.59.47.8not separable
Template leak on bare word problems (lower is better)65.051.052.0+14.0 [+3.0, +25.0]
Held-out bits per byte, macro over 7 domains (lower is better)0.42560.4508

Reading and answer-format probes (chat format, this model only)

proberesult
Short field lookup: 120 passages, each holding the requested value word for word79 / 120 right; "not stated" on 20 / 120
RTE entailment, asked as "entailment or not_entailment" (200)130 / 200 right
RTE entailment, asked as a yes/no question (200)29 / 200 right; an NLI label instead of yes/no on at least 160 / 200
ContractNLI as a yes/no question (140)90 / 140 right; 46 of the 70 "yes" items answered "no"
CUAD contract-clause yes/no questions (200)129 / 200 right; 54 false "no", 17 false "yes"

External benchmarks

benchmarkthis model78kavg 73-75kchance
MMLU, 1,140-question sample, length-normalised cloze (%)31.031.432.525
MMLU, same sample, letter answer (%)29.427.128.125
BBH logic multiple-choice subset, 3-shot (%)31.632.133.3about 31.4
LegalBench CUAD + ContractNLI yes/no, 400 items, AUROC (chance 0.5)0.6530.5

On the LegalBench items, Qwen3-1.7B-Base scores 0.876 and Qwen3-4B-Base 0.891.

Conversion check. The bf16 safetensors export in stock transformers (fp32 compute) matches the training framework's forward pass on 5 real prompts and 1 chat prompt: max |Δlogit| 1.6e-5, top-1 agreement 1.0, 6 of 6 greedy continuations identical.

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. public records from the KL3M Data Project: legal, regulatory and financial text. These are government works, court records and public filings:
    • U.S. Code, eCFR, the 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.
  • The Official Journal of the European Union, English only, as 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 are under the Princeton WordNet License); OpenLemma logic, arithmetic and program data; 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 are published under alea-institute and mjbommar.

By design, no general web crawl was included (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.

Limitations, caveats and disclaimer

  • A base model, not an assistant. No instruction tuning, no preference or safety tuning, and no learning-rate decay phase. It can produce offensive, biased or false text. It is not legal advice, and it is not meant for unsupervised use or for any decision about a person.
  • Check every fact, citation and number. Continuing legal or financial text, it can invent names, figures, court captions and case holdings; most generated citations are real, but some are invented or point to the wrong case. Court and SEC records name real people, so it may reproduce real names (not measured).
  • General reasoning is weak. MMLU and BBH are near chance, and it fails conditional reasoning (1 of 30 condition minimal pairs).
  • "Not stated" is not evidence of absence. On the field-lookup probe it says "not stated" on 20 of 120 items whose value is in the passage. This count varies a lot between checkpoints (3 to 73 of 120 among the four averaged ones). Learning-rate-decay continuations we tried raised it (46 to 74), which is why this release has no decay phase.
  • Answer format on yes/no questions. Asked yes/no versions of NLI tasks, it often answers with an NLI label; on contract-clause questions it leans to "no".
  • Template leaks on bare prompts. It may add a <|think|> block or an Answer: line, write a new practice item, or answer with a code block. Greeted with "Hi", it writes an encyclopedia-style biography.
  • Identity. It has not learned that it is a language model created by the ALEA Institute.
  • Legal recitation of U.S. Code sections is weaker than in the late single checkpoint s10-step78000.
  • Some invented-record training data. Part of the synthetic task data in the middle of the R4 run rendered fictional records with invented names and field values; later mixes retired or filtered these sets, but the averaged checkpoints had trained on them.
  • About the toxicity numbers. The judge is not calibrated against human ratings (Spearman 0.56 and 82% flag agreement with an earlier API judge; kappa 0.14 on use vs reference), so every judged number is provisional. Completions with a failed judge call were excluded, and they skew toxic: keeping them, the sampled RealToxicityPrompts share is 40.4% for both this model and R3-final. Comparisons are matched in tokens, not characters (this model's completions are longer: 199 vs 177 characters). Judged R3 figures published earlier used the wrong judge prompt for two of three sets and are not comparable. The reference models' completions were generated on other hardware. On the classifier measure this model is slightly above R3-final and above the 0.46 point estimate used for R3's release, and classifier EMT has risen across ALEA releases (R3 stable-31000 0.41, R3-final 0.458, this model 0.477). Regurgitation and personal-data checks were not run for this release.
  • About the copyright result. It passes R3's exact-reproduction gate; it does not establish the absence of memorization or copyright compliance.
  • English and U.S.-centric. We expect it to be weak at code, open-ended writing and facts about obscure entities; we have not measured these.

Citation

A paper describing the ALEA models is in preparation. Until then, please cite this repository.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3MoeForCausalLM
Ревизия весов
d45638f

0 моделей