/ Модель

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

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

gaggle-nanochat-0.9b-pretrained-climbmix-20261105

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

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

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

Базовая модель Castorini на 0,89 млрд параметров для продолжения текста и языковых экспериментов, обученная с нуля на ClimbMix.

Модель castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105 разработана Castorini и представляет собой базовую авторегрессионную языковую модель на 0,89 млрд параметров, обученную с нуля на архитектуре nanochat. Это decoder-only трансформер с 32 слоями, контекстом 2048 токенов, rotary position embeddings, QK-нормализацией и скользящим окном в большинстве слоёв. Модель обучалась один проход на 287 млрд токенов набора ClimbMix; опубликованные оценки включают CORE, MMLU и MMLU-Pro.

Модель предназначена для продолжения текста, оценки вероятности продолжения и базовых языковых экспериментов. Она не проходила instruction tuning или RLHF, поэтому не рассчитана на выполнение инструкций в диалоговом формате. Веса доступны в safetensors и поддерживают Transformers с пользовательским кодом архитектуры, а также vLLM через плагин. Лицензия — MIT.

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

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

Ограничения

Модель не проходила настройку на инструкции или RLHF и предназначена для продолжения текста, а не для следования пользовательским инструкциям. Контекст ограничен 2048 токенами.

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

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

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

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

Источники: 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-pretrained-climbmix-20261105

A 0.89B-parameter decoder-only base language model, pre-trained from scratch with nanochat on one pass over ClimbMix (287B tokens). It is the smaller sibling of castorini/gaggle-nanochat-pretrained-climbmix-20260924, the 3.3B causal model described in the pre-training section of Project Greenhouse: Progress Toward Fully Open and Sovereign Agentic Search, trained on the same data with the same recipe. It has had no post-training (no instruction tuning or RLHF), so it continues text rather than following instructions. The chat model made from it with nanochat's midtraining + SFT recipe is castorini/gaggle-nanochat-0.9b-ift-climbmix-20261108, and the reranker fine-tuned from it is castorini/gaggle-reranker-0.9b-20261108.

The same weights load three ways: with transformers (trust_remote_code=True), with vLLM (through a small plugin), and with nanochat's own code from the original checkpoint files, which are unchanged.

Model

Architecturenanochat decoder-only transformer: 32 layers, width 1,152, 9 attention heads of dimension 128, 2,048-token context
Componentsrotary position embeddings, QK normalization, parameter-free RMSNorm, squared-ReLU MLP, untied input/output embeddings, logit soft-capping; a value embedding on every 4th layer (counting back from the last); 3 of every 4 layers use a 512-token sliding window
Parameters0.89B: 0.51B in the transformer blocks, 0.30B in the value-embedding tables, 0.08B in the input and output embeddings. Value embeddings are lookups, so per-token compute is that of a dense model of about 0.59B parameters.
Tokenizerbyte-level BPE, 32,768 entries: the 3.3B model's tokenizer, byte for byte
Codekarpathy/nanochat at commit 92d63d4, with one addition: the spacing of the value-embedding layers (ve_every), which stock nanochat fixes at every other layer

The shape was chosen with a sweep of sub-1B nanochat models at a fixed 7B-token budget: at the same ~0.9B parameters, this deep and narrow shape with fewer value-embedding tables beat nanochat's own depth-20 model on both validation loss and CORE.

Training

  • Data: ClimbMix (karpathy/climbmix-400b-shuffle), one pass of 287B tokens. The last of its 6,543 shards is held out for validation. Documents are packed into 2,048-token sequences with nanochat's BOS-aligned best-fit packing.
  • Optimizer and schedule: nanochat's, unchanged. Muon updates the weight matrices of the transformer blocks and AdamW the embeddings and scalar parameters; the learning rate warms up briefly, stays constant, and then decays linearly.
  • Batch size: as for the 3.3B model, the batch grows from 262,144 to 2,097,152 tokens over training, and the peak learning rates stay unchanged as it grows.
  • Compute: one node of four NVIDIA H200 GPUs with FP8 matrix multiplications, about 590 H200-hours.
  • This checkpoint: the final one, step 229,067, after 287B tokens. It is also the checkpoint with the highest CORE measured during training.

Evaluation

Base-model benchmarks that need no instruction following: CORE (nanochat's average centered accuracy over 22 in-context learning tasks, 500 examples each), and 5-shot MMLU and MMLU-Pro scored by the log-likelihood of the answer letter with the LM Evaluation Harness.

ModelParametersTokensCOREMMLUMMLU-Pro
This model0.89B287B0.3700.3570.118
Gaggle 3.3B3.29B283B0.4580.4930.178
nanochat d342.2B89B0.3380.2570.115

The 3.3B and nanochat d34 rows are from the 3.3B model's card. Scored on every example instead of 500 per task, this model's CORE is 0.355.

Validation loss on the held-out ClimbMix shard is 0.658 bits per byte (3.3B model: 0.596).

Usage

Sequences must start with the BOS token <|bos|>, as in training. The transformers tokenizer adds it for you (add_special_tokens=True, the default), and so does vLLM.

transformers

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

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

inputs = tokenizer("The capital of France is", return_tensors="pt").to("cuda")   # starts with <|bos|>
out = model.generate(**inputs, max_new_tokens=20, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Output on one NVIDIA RTX 6000 Ada GPU:

The capital of France is Paris. The capital of France is Paris. The capital of France is Paris. The capital of France

Log-likelihood of a continuation, as in the nanochat example below:

@torch.inference_mode()
def continuation_logprob(context, continuation):
    ctx = tokenizer(context)["input_ids"]                                    # starts with <|bos|>
    cont = tokenizer(continuation, add_special_tokens=False)["input_ids"]
    ids = torch.tensor([ctx + cont], device="cuda")
    logp = torch.log_softmax(model(ids).logits[0, len(ctx) - 1:-1], -1)
    return logp[torch.arange(len(cont)), torch.tensor(cont, device="cuda")].sum().item()

print(continuation_logprob("The capital of France is", " Paris"))    # -0.3766
print(continuation_logprob("The capital of France is", " Berlin"))   # -10.9051

These can differ from the nanochat example's printout in the last digits: in bf16, results depend on the GPU and the attention kernel (nanochat uses Flash Attention 3 on Hopper GPUs when that kernel is available; this port always uses PyTorch's scaled_dot_product_attention, nanochat's own fallback). On the same GPU with the same kernel, the two produce bit-identical logits (see below).

trust_remote_code=True is needed because the architecture is nanochat's rather than one transformers ships; configuration_gaggle.py and modeling_gaggle.py in this repo define it. They are plain PyTorch, import nothing beyond torch and transformers, and are short enough to read first. No nanochat checkout and no Flash Attention build are involved. They are the 3.3B model's files with the value-embedding spacing (ve_every, 4 here) added as a setting; with its default of 2 they describe the 3.3B model exactly as before. model(input_ids).logits are fp32 and already soft-capped, as nanochat returns them; passing labels=input_ids gives the usual next-token loss. Batches may be padded on either side.

With the LM Evaluation Harness, pass add_bos_token=True (it does not add special tokens by default):

lm_eval --model hf --model_args pretrained=castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105,trust_remote_code=True,dtype=bfloat16,add_bos_token=True --tasks mmlu --num_fewshot 5

vLLM

vLLM has no built-in class for this architecture, so install the small plugin that provides one (the 3.3B model's plugin, byte for byte; it needs vLLM 0.17 or newer); vLLM then finds it automatically:

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

llm = LLM("castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105", trust_remote_code=True)
out = llm.generate(["The capital of France is"], SamplingParams(max_tokens=20, temperature=0))
print(out[0].outputs[0].text)

Output on one NVIDIA RTX 6000 Ada GPU (vLLM 0.17.0):

 Paris. The capital of France is Paris. The capital of France is Paris. The capital of France

The plugin (vllm_plugin/ in this repo) registers the architecture through vLLM's vllm.general_plugins entry point, so every vLLM process finds it; nothing in vLLM itself is changed. It reads the same config.json and safetensors as transformers, including the value-embedding spacing. It runs on one GPU (no tensor parallelism) with the model's 2,048-token context; we tested it in vLLM's default mode, with CUDA graphs and torch.compile. On one RTX 6000 Ada, 256 prompts x 256 new tokens run at about 11,000 tokens/s.

GGUF files for Ollama and llama.cpp, which the 3.3B model has, are not provided for this model: the 3.3B model's llama.cpp port assumes a value embedding on every other layer.

nanochat

The original training checkpoint is here, unchanged (model_229067.pt, meta_229067.json, tokenizer/). Stock nanochat places a value embedding on every other layer, so apply the 15-line patch in this repo (nanochat-92d63d4-ve_every.patch), which adds the ve_every setting and leaves models without it unchanged:

git clone https://github.com/karpathy/nanochat.git
cd nanochat && git checkout 92d63d4
curl -L https://huggingface.co/castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105/resolve/main/nanochat-92d63d4-ve_every.patch | git apply
uv sync --extra gpu        # use --extra cpu on a machine without a CUDA GPU

Save the following as example.py in the nanochat repository root (nanochat is imported from there, not installed as a package) and run uv run --extra gpu --with huggingface_hub python example.py.

import os, torch
from huggingface_hub import snapshot_download

# only the nanochat files; the safetensors are for transformers and vLLM
path = snapshot_download("castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105",
                         allow_patterns=["model_229067.pt", "meta_229067.json", "tokenizer/*"])
os.environ["NANOCHAT_BASE_DIR"] = path   # nanochat loads the tokenizer from $NANOCHAT_BASE_DIR/tokenizer

from nanochat.checkpoint_manager import build_model

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model, tokenizer, meta = build_model(path, step=229067, device=device, phase="eval")

# Greedy continuation
prompt = "The capital of France is"
ids = tokenizer.encode(prompt, prepend=tokenizer.get_bos_token_id())
new = list(model.generate(ids, max_tokens=20, temperature=0.0))
print(prompt + tokenizer.decode(new))

# Log-likelihood of a continuation given a context
@torch.inference_mode()
def continuation_logprob(context, continuation):
    ctx = tokenizer.encode(context, prepend=tokenizer.get_bos_token_id())
    cont = tokenizer.encode(continuation)
    x = torch.tensor([ctx + cont[:-1]], device=device)
    y = torch.tensor([[-1] * (len(ctx) - 1) + cont], device=device)   # -1 = ignore context positions
    return -model(x, targets=y, loss_reduction="sum").item()

print(continuation_logprob("The capital of France is", " Paris"))
print(continuation_logprob("The capital of France is", " Berlin"))

Output on one NVIDIA L40S GPU:

The capital of France is Paris. The capital of France is Paris. The capital of France is Paris. The capital of France
-0.37485089898109436
-10.875528335571289

Notes:

  • On GPUs with bfloat16 support the model computes in bfloat16; on CPU and MPS it uses float32. Override with NANOCHAT_DTYPE=bfloat16|float16|float32.
  • For further pre-training or fine-tuning, use nanochat's training scripts (scripts/base_train.py, scripts/chat_sft.py) with this checkpoint as the starting point.

The implementations agree

transformers, vLLM and nanochat load the same tensors. We checked them against nanochat's own forward pass on the original checkpoint, which is what every number in the Evaluation section was computed with.

CheckResult
transformers vs nanochat, bf16 on an NVIDIA RTX 6000 Ada: logits of real text at 2 to 2,048 tokensbitwise identical
same, a right-padded batch vs nanochat on the same batchbitwise identical
same, fp32 on CPUbitwise identical at 5 of 8 lengths, and on the right-padded batch; at 300, 1,000 and 2,048 tokens, fp32 rounding (largest difference 1.6e-5, same top-1 token everywhere)
loss on a 2,048-token sequenceidentical (2.4170 in bf16, 2.4168 in fp32)
greedy generation, 5 prompts x 48 tokensidentical token for token without the KV cache; with the cache, 3 of 5 in bf16 and 5 of 5 in fp32 on CPU
tokenizer vs nanochat's, 400 documentsidentical ids, identical decoding
tokenizer.json, tokenizer_config.json, generation_config.json vs the 3.3B model'sbyte-identical
vLLM 0.17 vs transformers, fp32 on an NVIDIA RTX 6000 Ada: per-token log-probabilities of real text at 2 to 2,048 tokensmean difference 0.0009 to 0.0013 nats; all 5 greedy generations identical
vLLM 0.17 vs transformers, bf16mean difference 0.019 to 0.036 nats per token, the size of bf16 rounding; 2 of 5 greedy generations identical
nanochat 92d63d4 + nanochat-92d63d4-ve_every.patch, the example below as writtenloads model_229067.pt; the same greedy continuation as transformers

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 after a few dozen tokens; nanochat itself behaves the same way. convert_nanochat_to_hf.py is the converter that produced the safetensors from model_229067.pt.

Files

  • model.safetensors: the weights for transformers and vLLM. These are the tensors of model_229067.pt, unchanged in value and dtype (fp32 matrices, bf16 embedding tables), 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 the configuration vLLM reads).
  • tokenizer.json, tokenizer_config.json: the tokenizer, converted from tokenizer/tokenizer.pkl; it encodes every text exactly as nanochat does and prepends <|bos|>.
  • model_229067.pt: model weights (nanochat state dict), for nanochat.
  • meta_229067.json: model configuration, training configuration, and validation loss.
  • tokenizer/: the 32,768-entry tokenizer in nanochat's format (tokenizer.pkl, token_bytes.pt).
  • nanochat-92d63d4-ve_every.patch: adds the value-embedding spacing to nanochat 92d63d4.
  • vllm_gaggle-0.1.0-py3-none-any.whl, vllm_plugin/: the vLLM plugin.
  • convert_nanochat_to_hf.py: the converter.
  • SHA256SUMS: checksums of every other file.

Optimizer state is not included.

Related

Citation

If you use this checkpoint, please cite our paper:

@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
Ревизия весов
9b6d165

0 моделей