/ Модель

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

Контекст
2 048 токенов
Лицензия
MIT
Архитектура
gaggle · dense
Библиотека
transformers
Опубликована
10 ноя 2026

gaggle-nanochat-0.9b-ift-climbmix-20261108

Генерация текстаТекст → текст3 профессии
247скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

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

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

Разговорная модель Castorini на 0,89 млрд параметров для генерации ответов и решения вопросов на знания и математику.

Gaggle Nanochat 0.9B IFT ClimbMix — разговорная модель Castorini, созданная дообучением базовой castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105: сначала проведено промежуточное обучение, затем контролируемая тонкая настройка (SFT), без RL. Она предназначена для диалогов и генерации текста, включая ответы на вопросы и решение задач на знания и математику. Модель построена на декодерном трансформере nanochat с 32 слоями, содержит 0,89 млрд параметров, использует токенизатор byte-level BPE на 32 768 токенов и контекст длиной 2 048 токенов.

В README описаны оценки на ARC, MMLU, GSM8K и HumanEval; результаты показывают, что модель уступает версии Gaggle 3.3B на всех приведённых для сравнения тестах, а SFT особенно улучшает результаты на GSM8K. Основной язык карточки и обучающих данных smol-smoltalk — английский. Модель работает в формате чата nanochat; доступна через Transformers с кодом базовой модели, vLLM с плагином Gaggle и код nanochat. Лицензия — MIT.

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

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

Ограничения

Контекст ограничен 2 048 токенами. По оценкам из README, модель 0,9B уступает версии 3,3B на всех сопоставленных тестах; в частности, результаты на GSM8K и HumanEval невысоки.

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

gaggle-nanochat-0.9b-ift-climbmix-20261108

The chat model made from castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105 (step 229,067) with nanochat's standard two-stage chat recipe: midtraining, then supervised fine-tuning (SFT). No RL. The midtraining checkpoint is included as well. It is the 0.9B counterpart of castorini/gaggle-nanochat-ift-climbmix-20261031: the same recipe, data and code, applied to the smaller base model.

The same weights load three ways, with the base model's code: with transformers (trust_remote_code=True), with vLLM (through the Gaggle plugin), and with nanochat's own code from the original checkpoint files.

Model

Architecture, tokenizer and code are those of the base model, unchanged; only the weights differ.

Architecturenanochat decoder-only transformer: 32 layers, width 1,152, 9 attention heads of dimension 128, 2,048-token context; a value embedding on every 4th layer; 0.89B parameters (0.30B of them value-embedding lookups)
Tokenizerthe base model's byte-level BPE, 32,768 entries (the same tokenizer as the 3.3B Gaggle models)
Chat formatnanochat's: <|bos|>, then <|user_start|>...<|user_end|> and <|assistant_start|>...<|assistant_end|> turns; a system message is merged into the first user message
Codekarpathy/nanochat at commit 92d63d4, plus a 15-line patch for the value-embedding spacing (nanochat-92d63d4-ve_every.patch, see Usage)

Training

This is the 3.3B Gaggle chat model's post-training, unchanged. nanochat removed midtraining on 2026-01-31 (commit 1ddaad1); the recipe is the last two-stage version, nanochat commit 348fbb3 (scripts/mid_train.py, then scripts/chat_sft.py starting from the midtrained model), with its data and hyperparameters unchanged, ported onto nanochat 92d63d4, the code the base model was trained with. The only change for this model is one line in the ported mid_train.py: the checkpoint metadata it writes now records ve_every, without which SFT would rebuild the model with nanochat's default spacing and could not load the weights. Both stages start with a fresh optimizer.

Midtraining (one epoch, 816 steps of 524,288 tokens, 2,048-token sequences with BOS-aligned best-fit packing, loss on all tokens):

DataRows
smol-smoltalk train460,341
MMLU auxiliary_train99,842
GSM8K main train7,473
nanochat identity conversations, 2 epochs2,000
SimpleSpelling200,000
SpellingBee80,000
Total849,656

Learning rates 0.2 (embeddings), 0.004 (unembedding), 0.02 (Muon, block matrices), no weight decay; constant for the first 80% of training, then linear decay to zero; Muon momentum 0.85 to 0.95 over the first 300 steps. As in every nanochat run, the AdamW rates are scaled by 1/√(width/768), here 0.816.

SFT (one epoch, 701 steps of 32 conversations, loss on assistant tokens only):

DataRows
ARC-Easy train2,251
ARC-Challenge train1,119
GSM8K main train7,473
smol-smoltalk train, first 10,000 after nanochat's seed-42 shuffle10,000
nanochat identity conversations1,000
SimpleSpelling300
SpellingBee300
Total22,443

Same learning rates scaled by 0.02, decayed linearly to zero.

Neither stage replays pre-training (ClimbMix) text.

Compute: two NVIDIA H200 GPUs. The recipe's batch sizes are kept by gradient accumulation (midtraining: 16 sequences per GPU per micro-batch; SFT: 4 conversations). Midtraining took 29 min, SFT 6 min.

Evaluation

The 0.9B and 3.3B Gaggle models at each stage: pre-trained (PT), after midtraining, and after midtraining + SFT (this model). The 3.3B rows are from its model card: its PT row is the Gaggle paper's, as on the 3.3B base model's card, and its post-trained rows were measured with the same code as ours. Each model is shown in the format it was trained for:

  • Few-shot, plain text (pre-trained models): MMLU and MMLU-Pro 5-shot with the LM Evaluation Harness 0.4.9 (mmlu, leaderboard_mmlu_pro); ARC-Easy and ARC-Challenge 10-shot as in CORE (500 questions each); all scored by the log-likelihood of the answer. CORE is nanochat's average centered accuracy over 22 in-context-learning tasks (500 examples each).
  • Zero-shot, chat (post-trained models): nanochat's chat_eval in the chat format, on the full test sets; ARC, MMLU and MMLU-Pro by the answer letter, GSM8K and HumanEval by greedy generation (up to 512 tokens). ChatCORE is nanochat's mean centered accuracy over ARC-Easy, ARC-Challenge, MMLU, GSM8K and HumanEval. nanochat has no MMLU-Pro task; ours (code/tasks/mmlu_pro.py) is its MMLU task on MMLU-Pro's 12,032 test questions, with each question's own options lettered A to J.
StageModelFormatMMLUMMLU-ProARC-EasyARC-ChallengeGSM8KHumanEvalCOREChatCORE
PTGaggle 0.9Bfew-shot, plain text35.711.876.247.0——0.370—
PTGaggle 3.3Bfew-shot, plain text49.2717.7683.459.0——0.458—
PT + midtrainingGaggle 0.9B, step 816 (in this repo)zero-shot, chat38.33—63.2248.217.436.71—0.228
PT + midtrainingGaggle 3.3Bzero-shot, chat44.3219.9080.0165.7013.9516.46—0.368
PT + midtraining + SFTGaggle 0.9B (this model)zero-shot, chat38.1416.6965.9549.3219.415.49—0.259
PT + midtraining + SFTGaggle 3.3Bzero-shot, chat44.9319.9781.5768.0030.6315.85—0.412

"—" means not measured: GSM8K and HumanEval are generation tasks run only in the chat format, CORE and ChatCORE each belong to one format, and MMLU-Pro was not measured for the 0.9B midtraining checkpoint.

What the comparison shows:

  • After SFT, the 0.9B model trails the 3.3B one on every benchmark: ChatCORE 0.259 against 0.412; 6.8 points on MMLU, 3.3 on MMLU-Pro, 15.6 on ARC-Easy, 18.7 on ARC-Challenge, 11.2 on GSM8K and 10.4 on HumanEval.
  • SFT over midtraining helps mostly on GSM8K, as for the 3.3B model: +12.0 points (7.4 to 19.4; 3.3B: +16.7). ChatCORE rises by 0.031 (3.3B: 0.044).
  • The two formats move differently than for the 3.3B model. ARC-Easy is 10.3 points lower in the chat format after SFT than few-shot before it (76.2 to 66.0), against 1.8 for the 3.3B model; MMLU is 2.4 points higher (35.7 to 38.1), where the 3.3B model is 4.3 lower. The formats differ, so these are not same-task comparisons.

Validation: midtraining validation loss fell from 0.451 to 0.336 bits per byte; SFT validation loss 0.835.

Usage

Prompts must use nanochat's chat format, which the tokenizer's chat template produces exactly (apply_chat_template(..., add_generation_prompt=True) ends with <|assistant_start|>), and replies end with <|assistant_end|>, which is the eos token. The context is 2,048 tokens.

transformers

pip install "transformers>=4.57" "torch>=2.5"
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()

messages = [{"role": "user", "content": "What is the capital of France?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt",
                                       return_dict=True).to("cuda")
out = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Output on one NVIDIA RTX 6000 Ada GPU:

The capital of France is Paris. It is a city located in the northern part of the country, bordering Belgium, the English Channel, and the Loire River. Paris is the largest city in France and the most populous in Europe, known for its historical landmarks, cultural institutions, and romantic atmosphere.

The reply is verbatim, mistakes included: a model of this size states facts unreliably.

trust_remote_code=True is needed because the architecture is nanochat's; configuration_gaggle.py and modeling_gaggle.py are the base model's files, byte for byte. The chat template already adds <|bos|>: if you render it to a string first, tokenize that string with add_special_tokens=False, or the tokenizer adds a second <|bos|>.

vLLM

vLLM has no built-in class for this architecture, so install the Gaggle plugin (a copy is in this repo; it is the 3.3B models' plugin, byte for byte, and needs vLLM 0.17 or newer); vLLM then finds it automatically:

pip install vllm https://huggingface.co/castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108/resolve/main/vllm_gaggle-0.1.0-py3-none-any.whl
vllm serve castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108 --trust-remote-code
from vllm import LLM, SamplingParams

llm = LLM("castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108", trust_remote_code=True)
out = llm.chat([{"role": "user", "content": "What is the capital of France?"}],
               SamplingParams(max_tokens=64, temperature=0))
print(out[0].outputs[0].text)

Output on one NVIDIA L40S GPU (vLLM 0.17.0): the same reply as transformers above, token for token.

Both LLM.chat and vllm serve's OpenAI-compatible chat endpoint use the chat template from tokenizer_config.json, and replies stop at <|assistant_end|>.

nanochat

The original checkpoints are laid out as a nanochat base directory, so nanochat's chat scripts load them directly. Stock nanochat places a value embedding on every other layer; this model has one on every 4th, so apply the 15-line patch in this repo, which adds that setting (ve_every) and leaves models without it unchanged:

git clone https://github.com/karpathy/nanochat.git
cd nanochat && git checkout 92d63d4
uv sync --extra gpu
export NANOCHAT_BASE_DIR=$(uv run --with huggingface_hub python -c "from huggingface_hub import snapshot_download; \
print(snapshot_download('castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108', allow_patterns=['tokenizer/*', 'chatsft_checkpoints/*', 'nanochat-92d63d4-ve_every.patch']))")
git apply $NANOCHAT_BASE_DIR/nanochat-92d63d4-ve_every.patch
uv run --extra gpu python -m scripts.chat_cli -i sft -g gaggle229067     # chat in the terminal
uv run --extra gpu python -m scripts.chat_eval -i sft -g gaggle229067    # the chat evaluation above

From Python, nanochat.checkpoint_manager.build_model(f"{NANOCHAT_BASE_DIR}/chatsft_checkpoints/gaggle229067", step=700, device=..., phase="eval") returns the model, tokenizer and metadata; conversations go through tokenizer.render_conversation / render_for_completion.

Stock 92d63d4 has no mid source and no MMLU-Pro task. code/ has both: the patched nanochat/checkpoint_manager.py (maps -i mid to mid_checkpoints), tasks/mmlu_pro.py, and scripts/chat_eval.py with MMLU-Pro added (-a MMLU-Pro).

The implementations agree

transformers and vLLM load the same tensors as nanochat. We checked them against nanochat's own forward pass on the original SFT checkpoint, with the 3.3B chat model's checks (code/hf/).

CheckResult
transformers vs nanochat, bf16 on an NVIDIA RTX 6000 Ada (both with PyTorch SDPA attention): logits of real text at 2 to 2,048 tokensbitwise identical
same, a right-padded batch vs nanochat on the same batchbitwise identical
loss on a 2,048-token sequenceidentical (1.6194)
greedy generation, 5 text prompts x 48 tokensidentical token for token without the KV cache; with the cache 3 of 5, and 3 of 5 in a left-padded batch (bf16 rounding, below)
greedy chat replies, 6 prompts up to 96 tokens, stopping at <|assistant_end|>identical token for token without the KV cache (6 of 6); 5 of 6 with the cache and in a left-padded batch
tokenizer vs nanochat's, 400 documentsidentical ids, identical decoding
chat template vs nanochat's render_conversation / render_for_completion, 5,700 conversations (smol-smoltalk, GSM8K with tool calls, MMLU, MMLU-Pro, ARC, identity, SimpleSpelling, SpellingBee), message content as strings and as lists of text parts (as vLLM passes it)identical ids, apart from the two nanochat behaviours below
vLLM 0.17 chat (LLM.chat, bf16, NVIDIA L40S): prompt ids, greedy replies to the 6 chat promptsprompt ids identical to the chat template's; 5 of 6 replies identical to transformers
nanochat 92d63d4 + nanochat-92d63d4-ve_every.patch, loading both checkpoints from this repo's layoutboth load; nanochat's greedy reply to the usage example's prompt is the same text as transformers'

Two nanochat behaviours the chat template does not copy, the same as for the 3.3B model: nanochat cuts a rendered conversation at 2,048 tokens (the template does not; this is all 39 of the 3,000 smol-smoltalk prompts that differed), and it tokenizes consecutive text parts of one assistant message separately, where the template joins them (all 300 SpellingBee training conversations become identical once the parts are joined). Neither affects ordinary chat prompts.

In bf16, any change of kernel shape (batching, padding, a KV cache, a different attention kernel) moves logits by rounding, which can flip near-tied greedy choices; nanochat itself behaves the same way. convert_nanochat_to_hf.py is the base repo's converter, unchanged; convert_ift.py runs it on model_000700.pt and adds the chat template.

Files

  • model.safetensors: the weights for transformers and vLLM. These are the tensors of chatsft_checkpoints/gaggle229067/model_000700.pt, unchanged in value and dtype, renamed to model.<nanochat name> (lm_head.weight keeps its name).
  • config.json, generation_config.json, configuration_gaggle.py, modeling_gaggle.py: the architecture for transformers and vLLM; the two .py files are the base model's.
  • tokenizer.json (the base model's), tokenizer_config.json (the base model's plus the chat template and <|assistant_end|> as eos).
  • vllm_gaggle-0.1.0-py3-none-any.whl, vllm_plugin/: the Gaggle vLLM plugin, the same files as the 3.3B models'.
  • chatsft_checkpoints/gaggle229067/model_000700.pt, meta_000700.json: this model for nanochat (SFT, step 700).
  • mid_checkpoints/gaggle229067/model_000816.pt, meta_000816.json: the midtraining checkpoint (step 816), nanochat only; no optimizer state.
  • tokenizer/: the base model's tokenizer in nanochat's format, unchanged.
  • nanochat-92d63d4-ve_every.patch: adds the value-embedding spacing to nanochat 92d63d4 (needed to load the .pt files with nanochat).
  • code/: the ported midtraining, SFT and evaluation scripts and patched nanochat files that were run (scripts/, nanochat/, tasks/), the launch scripts (run/), and the conversion and vLLM checks (code/hf/).
  • logs/: training, evaluation and check logs.
  • SHA256SUMS: checksums of every other file.

Related

Citation

@misc{lin2026projectgreenhouseprogressfully,
  title={{Project Greenhouse}: Progress Toward Fully Open and Sovereign Agentic Search},
  author={Jimmy Lin and Sahel Sharifymoghaddam and Lingwei Gu and Nour Jedidi},
  year={2026},
  eprint={2610.11922},
  archivePrefix={arXiv},
  primaryClass={cs.IR},
  url={https://arxiv.org/abs/2610.11922}
}

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

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

0 моделей