/ Модель

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

Контекст
16 384 токена
Параметры
97 млн
Лицензия
CC BY 4.0
Архитектура
kroha_routed_norm · MoE
Библиотека
transformers
Опубликована
24 ноя 2026

Kroha-base

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

Компактная мультиязычная базовая модель Kroha для генерации текста и кода с контекстом до 16 384 токенов.

109скачиваний за 30 дней2лайкавеса обновлены27 ноя 2026

Бенчмарки

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

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

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

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

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

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

Kroha-base — базовая мультиязычная авторегрессионная модель, разработанная автором репозитория Kroha. Это компактная модель примерно на 97 млн параметров по метаданным; README указывает 71,69 млн параметров декодера. Архитектура сочетает рекуррентный Gated DeltaNet, групповое причинное внимание GQA и маршрутизируемые эксперты MoE. Контекст составляет до 16 384 токенов, веса представлены в safetensors, для работы используются PyTorch и Transformers.

Модель предназначена для генерации продолжений текста, диалоговых ответов и кода, а также для текстов по математике и научным темам. Обучение охватывало английский, русский и другие языковые группы, Python, математику, научную прозу и последовательности ДНК; в README описан отдельный режим DNA, но основная задача в каталоге — генерация текста. Карточка сообщает о 36 млрд обучающих токенов и трёх стадиях обучения с увеличением контекста.

Модель можно использовать как основу для последующей адаптации и генерации текста, однако она не является готовой инструкционной моделью: шаблон чата и маркеры предусмотрены для будущего дообучения. Автор отмечает, что распределение языков неоднородно, а для низкоресурсных языков выделены небольшие объёмы данных. Бенчмарк-деконтаминация и анализ биологической гомологии ещё не завершены. Лицензия — CC BY 4.0.

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

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

Ограничения

Распределение языковых данных сильно различается, а низкоресурсные языки представлены небольшими объёмами. Деконтаминация бенчмарков и анализ биологической гомологии ещё не завершены; модель позиционируется как базовая, а не готовая инструкционная модель.

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

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

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

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

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

Открыть на Hugging Face

Kroha-base

Kroha is a 71.69M-parameter multilingual base model with a looped Gated DeltaNet/GQA decoder. It was trained on 36 billion tokens of text, Python, mathematics, scientific prose and DNA, extending context from 2,048 to 4,096, then 16,384 tokens.

PropertyValue
Decoder parameters71,685,712
Unique active parameters across both passes58.71M–63.03M per token
Additional MTP training parameters3,939,968
Parameters during MTP training75,625,680
Hidden size512
Decoder blocks10 physical blocks, 18 block applications
Core8 shared blocks, 2 loop iterations
Core sequence mixerAlternating Gated DeltaNet v1 and GQA
GQA heads8 query heads, 2 key/value heads, head dimension 64
Routed experts8 per core block, top-2 per token and pass
Routed latent / expert hidden size256 / 352
Shared expert hidden size256
Block AttnRes group size4 sublayer outputs
Vocabulary69,650 token IDs, tied embedding and LM head
Final training context16,384 tokens

Each core block runs twice and selects two to four distinct routed experts in total. Active counts include the tied embedding/LM head and count shared weights once.

Quick start

Reference environment: Python 3.12, PyTorch 2.11.0 and Transformers 5.17.0.

python -m pip install "torch==2.11.0" "transformers==5.17.0"
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "d0rj/Kroha-base"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device == "cuda" else torch.float32

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    attn_implementation="sdpa",
    dtype=dtype,
).to(device).eval()

inputs = tokenizer("Маленькие языковые модели интересны тем, что", return_tensors="pt")
inputs = inputs.to(device)

with torch.inference_mode():
    output = model.generate(
        **inputs,
        max_new_tokens=64,
        do_sample=False,
        use_cache=True,
    )

continuation = output[0, inputs["input_ids"].shape[1]:]
print(tokenizer.decode(continuation, skip_special_tokens=True))

Keep the prompt and generated continuation within config.max_position_embeddings, the trained context limit. model_id can also point to a local export directory.

For CUDA GDN1 kernels, install fla-core==0.5.2. GQA supports attn_implementation="flash_attention_4" with a compatible FlashAttention installation; training used FlashAttention 4.0.0b35. CPU inference uses PyTorch and Transformers. Router scores and recurrent decay parameters remain FP32 when loading BF16 weights.

Architecture

Token embedding
  ↓
GQA + dense FFN
  ↓
Shared core, pass 1
  ↓
Shared core, pass 2
  ↓
GQA + dense FFN
  ↓
Final normalization → tied LM head

Each core pass = [GDN1 + MoE → GQA + MoE] × 4

Hybrid sequence mixing. GDN1 (Gated Delta Networks) maintains a recurrent state with a gated delta rule. GQA uses causal attention and RoPE with theta=10,000. Each block application keeps a separate inference state, even when weights are shared.

Pass-specific adapters. The second core pass adds rank-16 Q/V adapters, separate normalization weights and learned sublayer gains, inspired by Relaxed Recursive Transformers.

Latent MoE and SharedGate. Each core FFN projects from 512 to 256 dimensions, applies two routed experts, combines their weighted outputs, applies RMSNorm and projects back to 512 dimensions. A separate shared expert processes every token, with a learned sigmoid gate controlling its contribution. Routed and shared experts use SwiGLU clipped at 10.

HeadGate and Block AttnRes. Learned gates scale GQA heads before the output projection. Block AttnRes mixes earlier representations per token, grouping four sublayer outputs at a time, following Attention Residuals.

The Hugging Face model is self-contained in configuration_kroha.py and modeling_kroha.py, including the DNA codec. It uses PyTorch and Transformers for RoPE, RMSNorm, attention dispatch, hybrid caching and generation.

Training

Training used three stages with a global batch of 262,144 token positions. Final partial batches follow the stored corpus boundaries.

StageSource tokensContextGlobal sequencesMicrobatch × accumulationOptimizer stepsPeak LR
Pretrain30B2,04812832 × 4114,4421e-3
Powerup 2×3B4,0966416 × 411,4461e-4
Powerup 8×3B16,384164 × 411,4481e-4

All stages use BF16 on one NVIDIA RTX 5070 Ti with 16 GB VRAM. Hidden and expert matrices use Muon; routers, the tied embedding/LM head, norms and other groups use AdamW. Each stage has 1% warmup and cosine decay to 10% of its peak LR. Weight decay is 0.1, AdamW betas are (0.9, 0.95) and gradient-norm clipping is 1.0.

Training uses isolated document packing, buffered global load balancing, SonicMoE/Quack expert kernels, FlashAttention 4, core activation checkpointing and regional compilation. Document boundaries reset positions, attention, convolution and recurrent state. Prediction targets crossing those boundaries are masked. Source-token budgets include document EOS and exclude padding.

Multi-token prediction. An auxiliary GQA/SwiGLU block predicts t+2, using the backbone state and the ground-truth t+1 embedding. It shares the main embedding and LM head. The objective is CE(t+1) + 0.3 × CE(t+2), plus the router balancing loss. Each prediction depth is normalized over its valid targets in the global batch. This is adapted from the sequential MTP construction in DeepSeek-V3.

HF generation uses the next-token head. The companion Kroha-base-dev archive pairs the same HF model with full training checkpoints: MTP weights, optimizer/scheduler and RNG states, data cursors, TensorBoard logs, configuration and original training code.

Data

The corpus covers English, Russian and 34 other natural-language quota groups, plus Python, mathematics, scientific prose and DNA. Language exposure varies widely; the lowest-resource groups have very small allocations.

alt atv bak bel bxr che chv eng kaz kbd kca kir kjh koi kpv krc krl kum
lez lud mdf mhr mns mrj myv nog olo rus sah tat tyv udm ukr uzn vep xal

Source-token shares from the stage manifests, rounded to two decimals:

DomainPretrainPowerup 2×Powerup 8×
General text74.42%58.00%47.22%
Python11.58%17.00%21.59%
Mathematics11.00%17.50%21.59%
Scientific prose1.35%3.38%4.32%
DNA1.65%4.13%5.28%

General text includes SNeG, Cultura RU Edu, FineWeb-Edu, FineWeb2-HQ, FinePDFs-Edu, DCLM, Wikipedia, HPLT and regional-language corpora. SNeG has priority during deduplication and contributes about 2.80B selected tokens across the curriculum. Corpus provenance records retain source metadata and revision pins.

Python comes from CodeParrot and UltraData-Code; mathematics comes from FineMath and UltraData-Math. Scientific prose includes Dolmino science web, FineDNA biology text and Russian scientific articles. DNA comes from FineDNA sequence subsets.

Stages use disjoint selected token intervals. Filtering includes exact-text, paragraph, Python-AST and DNA-body checks. Benchmark decontamination and biological homology analysis are pending.

Tokenizer and DNA

B64 + DNA6 v3 combines a 65,536-ID multilingual byte-level BPE tokenizer with 4,114 DNA IDs. Numbers are split into individual digits. A chat template and markers for tool calls, reasoning and fill-in-the-middle are provided for later instruction tuning.

DNA mode is selected explicitly. Its 4,096 canonical tokens cover all uppercase ACGT 6-mers. Sixteen single-symbol tokens and the BPE vocabulary provide lossless fallback for short tails, ambiguous bases, lowercase letters and formatting. Ordinary text uses BPE; DNA uses the codec in modeling_kroha.py.

import importlib

model_module = importlib.import_module(type(model).__module__)
codec = model_module.DNACodec(tokenizer)
sequence = "ACGTACGTACGTNNu\n"
encoded = codec.encode_sequence(sequence)

assert codec.decode_sequence(encoded["input_ids"]) == sequence

Pass encoded["input_ids"] to the model as token IDs for a sequence prompt. For mixed text and DNA, use codec.encode_document(text, dna_mode=True) with <dna>...</dna> spans. The tokenizer decodes DNA token IDs; </dna> closes a DNA span so generation can continue afterwards.

Evaluation

Open SLM Leaderboard (Base)

BenchmarkLeaderboard verifiedLocal two passesLocal + LoopCD
Intelligence Index8.39038.47838.5160
Avg37.083937.128636.8697
HellaSwag29.4563%29.4463%29.2571%
ARC-Easy36.7845%36.8266%36.8687%
ARC-Challenge22.1843%22.6109%22.0990%
PIQA55.4951%55.5495%56.6376%
ArithMark-333.9000%33.8000%32.1000%
ArithMark-232.7600%——

The leaderboard column reports the organizers' verified results. The local comparison uses full zero-shot splits, the same weights, and vLLM BF16. Leaderboard · Scoring rules

Inference depth and LoopCD

Inference modeMean26Mean50WikiText-2 word perplexity ↓
One pass24.514227.970524,395.28
Two passes30.528532.374360.73
Two passes + LoopCD-Logits (ω = 0.3)30.598632.804076.94

All modes share the same checkpoint. LoopCD added 0.43 points on Mean50 and reduced generation throughput by 7–10% on RTX 5070 Ti in vLLM eager mode (256 input and 32 output tokens). LoopCD paper

Evaluation sliceTasksKroha-base · 71.69McRia-75M (benchmark-adapted)GPT-X3-150MSupra2-100M-BaseGPT-2 Small 124M
Mean505032.3743————
Russian2335.3759————
English2729.8174————
Original Mean262630.528534.943036.680532.686330.3616
English/Russian suite2633.6887————
BenchmarkLang.Primary metric / filterShotsExamplesKroha-base · 71.69McRia-75M (benchmark-adapted)GPT-X3-150MSupra2-100M-BaseGPT-2 Small 124M
arc_challengeENacc_norm,none01,17222.610930.460831.655324.573422.5256
arc_easyENacc_norm,none02,37636.826658.333359.553947.727339.6465
arithmark3ENacc_norm,none01,00033.800037.100051.600037.500035.6000
balanced_copaENacc,none01,00052.700058.700060.100057.800055.4000
blimpENacc,none067,00074.416480.380679.806080.907583.3373
boolqENacc,none03,27060.550553.975558.318061.712549.9388
commonsense_qaENacc,none01,22120.638820.475021.294021.294019.5741
hellaswagENacc_norm,none010,04229.446339.016145.966935.998831.2189
lambada_openaiENacc,none05,15325.926638.327236.755335.649130.6229
mmlu_continuationENacc,none014,04224.668926.662928.649826.983325.2101
openbookqaENacc_norm,none050026.000033.800034.400032.000027.0000
piqaENacc_norm,none01,83855.549564.689971.109965.125163.4385
sciqENacc_norm,none01,00068.700089.900080.100070.800063.9000
truthfulqa_mc2ENacc,none081743.094441.710640.032240.749040.6980
winograndeENacc,none01,26750.749852.565153.749051.223450.8287
bananamind_baseENraw_accuracy,none035052.000060.571466.285756.571451.4286
social_iqaENacc,none01,95436.796340.634638.996938.382836.5404
raceENacc,none01,04526.220130.717733.588530.143529.6651
mmluENacc,none514,04226.264125.580425.316925.138926.2926
triviaqaENexact_match,remove_whitespace017,9440.35114.83732.28491.13130.3622
gsm8kENexact_match,flexible-extract51,3191.81961.97124.92801.13721.2130
hendrycks_math500ENexact_match,none05000.20000.00001.60000.40000.2000
bbhENexact_match,get-answer36,51120.488417.908223.51416.89604.7612
humanevalENpass@1,create_test01643.65850.00001.82930.00000.0000
mbppENpass_at_1,none35000.00000.20001.20000.00000.0000
mbpp_plusENpass_at_1,none33780.26460.00001.05820.00000.0000
mmlu_pro_mc0ENacc,none012,03211.3281————
global_mmlu_full_ruRUacc,none514,04226.4706————
mmlu_prox_ru_mc0RUacc,none011,75911.3190————
mera_rummlu_mc0RUacc,none014,01223.1088————
include_base_44_russianRUacc,none055228.0797————
rublimp_sum_llRUacc,none045,00091.9889————
rucola_devRUmcc,none02,7870.2638————
sberquad_devRUf1,none05,0367.8481————
rsg_danetqaRUacc,none082148.9647————
rsg_parusRUacc,none010064.0000————
rsg_rcbRUacc,none022032.2727————
rsg_russeRUacc,none08,50538.5068————
rsg_rwsdRUacc,none020451.4706————
rsg_terraRUacc,none030748.5342————
belebele_rus_CyrlRUacc,none090024.8889————
xnli_ruRUacc,none02,49039.7590————
xquad_ruRUf1,none01,1902.6521————
xwinograd_ruRUacc,none031554.6032————
xstorycloze_ruRUacc,none01,51152.0847————
mgsm_native_cot_ruRUexact_match,flexible-extract82501.6000————
arc_ruRUacc_norm,none01,16924.4654————
hellaswag_ruRUacc_norm,none09,27229.2278————
truthfulqa_ru_mc2RUacc,none078847.5370————
global_piqa_completions_rus_cyrlRUacc_norm,none010064.0000————

Inference and compatibility

The HF implementation supports cached generation, inputs_embeds, hidden-state outputs, gradient checkpointing and standard linear projections for LoRA.

Install the vLLM or SGLang adapter in a separate environment, following its README.

To enable LoopCD-Logits in the vLLM adapter, add "kroha_loopcd_weight":0.3 to --additional-config. Adapter instructions

Prefix reuse, quantization, speculative decoding and CUDA graphs are untested.

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

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

GPU в ailist

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

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

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

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

0 моделей