/ Модель

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

Контекст
4 096 токенов
Параметры
108 млн
Лицензия
Apache 2.0
Архитектура
nq4 · dense
Базовая модель
N-Q-164M
Библиотека
transformers
Опубликована
12 ноя 2026

N-Q-164M-Chat

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

Небольшая русско-английская чат-модель для диалогов, генерации текста и вызова инструментов вычислений, дат и единиц измерения.

239скачиваний за 30 дней3лайкавеса обновлены12 ноя 2026

Бенчмарки

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

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

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

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

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

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

N-Q-164M-Chat — небольшая русско-английская чат-модель проекта Q Project, дообученная на базе q-project/N-Q-164M. Она предназначена для диалогов, генерации ответов и вызова инструментов для вычислений, дат и единиц измерения. По карточке, модель имеет архитектуру NQ4ForCausalLM с чередованием слоёв Gated DeltaNet и gated attention; метаданные указывают 108,3 млн параметров и контекст 4096 токенов. Токенизатор содержит 8256 токенов для русского и английского языков. Для точного выполнения поддерживаемых вычислений нужен исполнитель, подключаемый через tokenizer; без него модель должна сама предсказывать результат.

Модель уверенно формирует связные ответы и в опубликованном тесте надёжно вызывала калькулятор, инструмент для дат и инструмент для единиц. При этом её общие знания ограничены, фактические ошибки могут звучать убедительно, а результат на GSM8K составляет около 7%; планирование многошаговых задач остаётся слабым. У модели нет настройки безопасности, поэтому разработчик позиционирует её для исследований и обучения, а не как продукт. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

[!IMPORTANT] This is a research release, not a product. At 164M parameters the model writes fluent, structured answers in Russian and English and calls its calculator / date / unit tools reliably, but it still states wrong facts confidently and solves only a few multi-step word problems (GSM8K ≈ 7%). See Honest results.

What this is

N-Q is the Q Project's take on MiniMind: a ladder of small Russian/English models trained from scratch on a single 16GB V100, with the whole pipeline — tokenizer → pretrain → SFT → reasoning → DPO → GRPO → agentic RL — in plain PyTorch. This is the chat model of the 164M rung (base: N-Q-164M); it went through exactly the same recipe as N-Q-26M-Chat.

Q's exact circuits are part of the model: it writes <CALC>expr<EQ>, a deterministic executor writes the exact result and <ECALC>, and the model continues from there.

Honest results

Every stage of the recipe was evaluated with the same scripts; the released checkpoint is the last one (agentic RL), because at this size each RL stage helped a little instead of doing nothing.

checkpoint16-task tool probe (8 RU + 8 EN, greedy)GSM8K EN (500)GSM8K-ru (500)
N-Q-26M-Chat (released, DPO)15/162.0%2.2%
164M after reasoning SFT16/165.0%3.4%
164M after DPO16/165.6%3.0%
164M after GRPO16/166.8%5.8%
N-Q-164M-Chat (after agentic RL)16/167.2%6.2%

GSM8K is scored by the final number only (thinking on). ±1.1 pp is one standard error at these rates; the jump from reasoning SFT to the final model is real, the step-to-step differences are partly noise. The multi-turn agentic episodes themselves stayed close to zero reward — the gain comes mostly from better single-turn tool use.

Samples (temperature 0.7, from the evaluation log):

Сколько будет 347 умножить на 86? — <THINK><CALC>347*86<EQ>29842<ECALC><ETHINK>347 умножить на 86 равно 29842.

Товар стоит 1250 рублей, скидка 15%. Сколько платить? — <CALC>1250*15/100<EQ>187.5<ECALC><CALC>1250-187.5<EQ>1062.5<ECALC> Скидка 187.5 руб., итоговая цена 1062.5 руб.

How many days are between March 3, 2026 and July 19, 2026? — <CALC>dur:2026-03-03,2026-07-19<EQ>138<ECALC> 138 days.

What is the capital of France? — The capital of France is Paris. It is located in the northern part of the country and is known for its historical landmarks, such as the Tuileries Gardens and the Eiffel Tower.

Объясни простыми словами, что такое фотосинтез. — Фотосинтез — это процесс, в ходе которого растения … преобразуют световую энергию солнца в химическую энергию, используя углекислый газ и воду. … выделяет кислород (CO2) … (right idea, wrong detail: the typical failure mode at this size)

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("q-project/N-Q-164M-Chat", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("q-project/N-Q-164M-Chat", trust_remote_code=True)

msgs = [{"role": "user", "content": "Товар стоит 3200 рублей, скидка 25%. Какая итоговая цена?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(ids, max_new_tokens=160, temperature=0.7, top_p=0.9, tokenizer=tok)   # tokenizer=tok switches the exact circuits on
print(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=False))
# ... Скидка 800 руб., итоговая цена 2400 руб.<EOT>
  • Pass tokenizer=tok. Without it there is no executor and the model has to "compute" the number after <EQ> itself, which is usually wrong.
  • Thinking: apply_chat_template(..., enable_thinking=True) opens a <THINK> block; leaving it unset lets the model decide (it thinks on calculations and word problems, answers chit-chat directly).
  • The model has its own generate() (recurrent Gated DeltaNet state + KV cache for the attention layers); it accepts temperature, top_p, top_k, repetition_penalty, max_new_tokens, stop_ids (default <EOT>, <eos>).
  • model.qpack / model.q8.qpack: single-file packed weights (fp16 / int8), loadable with from_pretrained(..., trust_remote_code=True) from a folder without *.safetensors and by the qpack C++ engine.

Architecture

  • 16 layers, pattern LLLA ×4: three Gated DeltaNet linear-attention layers (4 key / 8 value heads, head dim 112, conv k=4, gated RMSNorm output) then one gated attention layer (14 query / 2 KV heads, head dim 64, zero-centred QK-norm, partial RoPE 25%, θ=1e6, sigmoid output gate).
  • hidden 896, SwiGLU 896→1664→896, Gated Residual with 4 residual streams, zero-centred RMSNorm.
  • Hashed n-gram embedding (PLE): 58.7M parameters counted separately from the 166.8M backbone.
  • Tokenizer: 8,256 tokens (8,192 byte-level BPE RU+EN with single-digit splitting + 64 control tokens), shared with N-Q-26M.
  • Chat format: <bos>[<SYSTEM>…<EOT>]<USER>…<EOT><MODEL>[<THINK>…<ETHINK>]answer<EOT>.

Training

All on one V100 16GB.

stagedataV100 time
pretrain (N-Q-164M)8.0B tokens: FineWeb-Edu (EN), Cultura-Ru-Edu, Russian Wikipedia; 5% dialogue / <CALC> rows from step 1≈117 h
SFT150k conversations (SmolTalk, GrandMaster-PRO-MAX, saiga_scored, own <CALC> corpus RU/EN, identity)2.8 h
reasoning60k: 60% <THINK> traces (russian-reasoning), 40% SFT mix0.9 h
DPO19.6k preference pairs (saiga_preferences, UltraFeedback), β=0.14.5 h
GRPO200 steps on GSM8K / GSM8K-ru, verifiable rewards, circuits live during rollouts, Dr.GRPO-style2.0 h
agentic RL (this checkpoint)150 steps of multi-turn tool episodes on the same core3.2 h

Limitations

  • Facts are often wrong in the details; general knowledge is thin; long answers drift; creative writing is weak (fluent verse without meaning).
  • Multi-step math word problems: ~7%. The circuits make single computations exact, not the plan.
  • Identity is shaky ("Я программист…" when asked who it is).
  • No safety tuning. Research and education only.

License and data terms

Code and weights: Apache-2.0 (see LICENSE). Training data keeps its own terms — check each dataset card before commercial use: FineWeb-Edu (ODC-By 1.0), Cultura-Ru-Edu, Russian Wikipedia (CC BY-SA / GFDL), SmolTalk, GrandMaster-PRO-MAX, saiga_scored, saiga_preferences, russian-reasoning, UltraFeedback, GSM8K (MIT) / GSM8K-ru.

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

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

GPU в ailist

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

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

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

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

0 моделей