/ Модель

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

Контекст
2 048 токенов
Параметры
138 млн
Лицензия
Apache 2.0
Архитектура
odinnext · dense
Базовая модель
OdinNext-138M-Base
Библиотека
transformers
Опубликована
7 июн 2026

OdinNext-138M-Instruct

Генерация текстаТекст → текст3 профессии

Компактная англоязычная чат-модель на 138,4 млн параметров для коротких ответов и следования инструкциям в формате ChatML.

116скачиваний за 30 дней8лайковвеса обновлены9 июн 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

OdinNext-138M-Instruct — компактная англоязычная причинная языковая модель Joel Hen Wang с 138,4 млн параметров, предназначенная для следования инструкциям и кратких ответов в формате ChatML. Это дообученная версия OdinNext-138M-Base: автор применил SFT и последовательную дистилляцию знаний от LFM2.5-1.2B-Instruct. Архитектура декодера использует рекуррентный gated linear attention в стиле HGRN2 вместо softmax self-attention; состояние при генерации имеет постоянный размер. Контекст модели — 2048 токенов.

Модель подходит для коротких диалогов, структурированных ответов и экспериментов с компактными рекуррентными чат-моделями. Она ориентирована на английский язык; возможности для других языков и кода не охарактеризованы. Из-за небольшого размера модель склонна галлюцинировать и не предназначена для задач, где важны точность фактов или безопасность. Лицензия — Apache-2.0.

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

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

Ограничения

При размере 138,4 млн параметров модель часто галлюцинирует и не подходит для ответов, требующих фактической точности или безопасности; дополнительного обучения безопасности не проводилось. Контекст ограничен 2048 токенами, а при пакетной генерации маска внимания игнорируется, поэтому дополнение последовательностей может влиять на результат.

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

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

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

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

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

Открыть на Hugging Face

OdinNext-138M-Instruct

OdinNext is a 138M-parameter causal language model that replaces softmax self-attention with an HGRN2-style gated linear recurrence. This repository is the instruction-tuned variant of joelhenwang/OdinNext-138M-Base: the base was post-trained with SFT and sequence-level knowledge distillation (SeqKD) from a 1.2B instruct teacher (LFM2.5-1.2B-Instruct) into a concise, ChatML-formatted assistant.

This is a small instruction-follower, not a knowledge model. Factual accuracy is fundamentally limited at 138M parameters — it follows instructions and produces structured, assistant-style answers, but it will hallucinate facts. Use it for research on compact recurrent/linear-attention chat models, not for knowledge-sensitive applications.

  • Repo: joelhenwang/OdinNext-138M-Instruct
  • Base: joelhenwang/OdinNext-138M-Base (138M HGRN2 recurrent base)
  • Chat format: ChatML (<|im_start|> / <|im_end|>), 32,770-token vocabulary.
  • Context window: 2,048 tokens in the released inference code.
  • License: Apache-2.0.

Uses custom Transformers code. Loading with trust_remote_code=True executes Python from this repo. Review the files or pin a commit before trusting it.

At a glance

ItemValue
Parameters~138M (HGRN2 recurrent)
Layers16
Hidden size768
Heads6
Head state dims128 × 128 per head
FFN inner size2,048
Vocabulary32,770 (32,768 base BPE + 2 ChatML special tokens)
Max sequence length2,048
Checkpoint dtypefp16
ArchitectureHGRN2 recurrence + alternating RoPE + SwiGLU² FFN + ZCRMSNorm
Cache typeFixed-size recurrent state, not a growing KV cache
Post-trainingSFT + SeqKD (ChatML) on the EMA base

Architecture

Decoder-only causal LM, 16 identical pre-norm blocks:

x = x + sigmoid(gate_attn) * HGRN2(ZCRMSNorm(x))
x = x + sigmoid(gate_ffn)  * SwiGLU²(ZCRMSNorm(x))

The HGRN2 recurrent state updates per token as:

S_t = diag(exp(g_t)) S_{t-1} + k_t ⊗ v_t
o_t = q_t S_t

with a per-layer state shaped [B, n_heads, head_f_dim, head_i_dim] = [B, 6, 128, 128], constant in size with respect to context length (O(1)-per-token decoding, not a growing KV cache).

Hybrid RoPE: even layers (0, 2, …, 14) apply RoPE to q/k (θ = 100,000); odd layers are position-free. Tied embedding / LM head. No linear biases.

Post-training

Starting from the EMA base (OdinNext-138M-Base), three stages were trialed and the SeqKD variant was selected:

StageDataResult
SFT (full-param, CE-only)smol-smoltalk + no_robots (~549M tokens, ChatML)fluent, hallucinates
DPO (UltraFeedback)—rejected — over-optimized to incoherent output on a weak base
SeqKD (selected)LFM2.5-1.2B-Instruct → 10K ChatML completions, 3 SFT epochsbest — concise assistant answers, learned teacher formatting (markdown / LaTeX)

The released weights are the SeqKD checkpoint. Knowledge benchmarks are preserved relative to the base (the post-training is style/format, not new knowledge).

Memory: recurrent state vs Transformer KV cache

For batch size 1 in fp16 the recurrent state is constant:

layers × heads × head_f_dim × head_i_dim × bytes
= 16 × 6 × 128 × 128 × 2 = 3,145,728 bytes ≈ 3.0 MiB

independent of generated length (the pure-PyTorch fallback promotes the scan state to fp32, ≈ 6.0 MiB). A same-depth fp16 Transformer KV cache would grow linearly (≈ 48 MiB at 1K tokens, ≈ 768 MiB at 16K). Cache-state comparison only.

Results

Zero-shot, lm-evaluation-harness (HellaSwag = acc_norm, ARC = mean of Easy + Challenge acc, PIQA = acc), measured on the full validation/test sets. Other rows are as reported by Axiomic Labs on the GPT-X2-125M card.

Correction (2026-06-09): an earlier version of this card reported HellaSwag ~33%. That figure was computed on only the first 2,000 HellaSwag validation examples, which score ~5–6 points higher than the full 10,042-example set. The table below is the corrected full-set result and reproduces under lm-eval (thanks to the Axiomic Labs leaderboard for catching this).

CompanyModelHellaSwagARC (avg)PIQATraining tokens
HuggingFaceSmolLM2-135M43.22%44.62%67.52%2T
Axiomic LabsGPT-X2-125M40.55%39.90%66.97%75B
OpenAIGPT-2 (124M)31.49%31.40%63.28%~10B
EleutherAIPythia-160M30.46%29.95%57.94%~225B
FacebookOPT-125M31.39%31.53%62.02%180B
EleutherAIGPT-Neo-125M30.55%31.43%61.75%300B
This workOdinNext-138M-Instruct28.82%33.12%59.41%101.6B + post-train

Benchmarks are essentially unchanged from the base model — the instruction tuning optimizes assistant style/format, not commonsense-continuation (HellaSwag) or knowledge. All numbers are below the SmolLM / GPT-X2 frontier; the model was trained end-to-end on two consumer AMD mini-PCs.

Usage

pip install "transformers>=4.46" torch safetensors
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "joelhenwang/OdinNext-138M-Instruct"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.float16 if device == "cuda" else torch.float32

tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    repo, trust_remote_code=True, torch_dtype=dtype,
).to(device).eval()

messages = [{"role": "user", "content": "Explain photosynthesis in one sentence."}]
inputs = tok.apply_chat_template(
    messages, add_generation_prompt=True, return_tensors="pt",
).to(device)

with torch.inference_mode():
    out = model.generate(
        inputs,
        max_new_tokens=128,
        do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.1,
        pad_token_id=tok.pad_token_id, use_cache=True,
    )
print(tok.decode(out[0, inputs.shape[1]:], skip_special_tokens=True))

If you build prompts manually, the ChatML format is:

<|im_start|>user
{your message}<|im_end|>
<|im_start|>assistant

Batching guidance

The recurrent scan does not apply an attention mask. For correct batched generation: avoid left padding, prefer same-length prompts, and verify batched output against single-sample output before relying on it. Single-prompt generation is the safest path.

What this model is good for

  • Short, ChatML-formatted instruction following and assistant-style replies.
  • Research on compact recurrent / linear-attention chat models and fixed-state decoding.

Do not use it for knowledge-sensitive or safety-sensitive generation, or for benchmark claims without running your own evaluation.

Limitations

  • Capacity-limited: 138M parameters — it hallucinates facts and is not a knowledge model.
  • No safety/alignment training beyond SFT+SeqKD: outputs can be biased, false, or incoherent.
  • Hard 2,048-token cap: recurrent state is constant, but the released RoPE cache limits cumulative positions to 2,048.
  • attention_mask ignored in the backbone; padding affects recurrent state.
  • English-focused; multilingual / code ability is uncharacterized.
  • Benchmarks above are zero-shot, full-set, via lm-evaluation-harness — run your own evaluation to confirm.

Citation

@misc{odinnext_138m_instruct_2026,
  title        = {OdinNext-138M-Instruct},
  author       = {Wang, Joel},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/joelhenwang/OdinNext-138M-Instruct}},
  note         = {138M HGRN2 recurrent instruction-tuned (SFT + SeqKD) checkpoint}
}

References

  • Zhen Qin et al. HGRN2: Gated Linear RNNs with State Expansion. arXiv:2404.07904.
  • Bowen Peng et al. Efficient Pre-Training with Token Superposition. arXiv:2605.06546.
  • Chenze Shao et al. Patch-Level Training for Large Language Models. arXiv:2407.12665.
  • Makoto Shing et al. DiffusionBlocks: Block-wise Neural Network Training via Diffusion Interpretation. arXiv:2506.14202.

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

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

0 моделей