/ Модель

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

Контекст
1 024 токена
Лицензия
Своя лицензия
Архитектура
ac_swiglu · dense
Библиотека
transformers
Опубликована
2 авг 2026

Qana-mini-5M

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

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

699скачиваний за 30 дней5лайковвеса обновлены17 авг 2026

Бенчмарки

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

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

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

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

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

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

Qana-mini-5M — компактная базовая причинная языковая модель с 4,94 млн параметров, разработанная User01110 при участии Paul Courneya и Jonathon LY в сообществе FromZiro. Она предназначена для исследований архитектур, анализа представлений, учебных экспериментов и контролируемых сравнений. Модель использует плотную архитектуру ACSwiGLUForCausalLM: стандартное причинное grouped-query attention сочетается с исследуемым механизмом смешивания каналов внутри расширенного блока SwiGLU. Контекст составляет 1 024 токена; модель обучена на англоязычных текстовых корпусах и использует токенизатор на 4 096 токенов.

Это базовая модель продолжения текста, а не ассистент, настроенный следовать инструкциям. В карточке приведены результаты нулевого обучения на задачах языкового моделирования и тестах на общие знания, чтение и естественные языковые закономерности. Из-за малого размера и короткого контекста её фактическая надёжность, качество генерации и способность работать с длинными текстами ограничены; ответы могут содержать ошибки и смещения из обучающих данных. Для загрузки требуется Transformers с разрешённым пользовательским кодом. Лицензия указана как other.

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

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

Ограничения

Малый размер и контекст в 1 024 токена ограничивают надёжность фактов, качество генерации и работу с длинными текстами. Это базовая модель, не настроенная как ассистент; ответы могут содержать ошибки и смещения из обучающих данных.

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

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

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

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

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

Открыть на Hugging Face

Qana-mini-5M

Qana-mini-5M is a 4.94M-parameter base causal language model that studies content-dependent mixing across the expanded channels of a SwiGLU feed-forward block. It was trained as a compact generalist model and serves as a controlled architecture-research checkpoint. The final checkpoint was recorded at step 40,000 with a WikiText-103 normalized BPB of 1.4241.

Quick start

The model uses a custom Transformers architecture, so trust_remote_code=True is required.

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

repo = "User01110/Qana-mini-5M"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device == "cuda" else torch.float32

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

inputs = tokenizer(
    "The process of photosynthesis",
    return_tensors="pt",
).to(device)

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

print(tokenizer.decode(output[0], skip_special_tokens=True))

The checkpoint is stored in native bfloat16 Safetensors. The exported model does not implement a KV cache, so autoregressive generation recomputes the visible context at each step.

Architecture

ComponentConfiguration
Parameters4,943,712
Hidden width / layers216 / 10
Context length1,024 tokens
Vocabulary4,096 tokens
Token attention6 query heads, 2 KV heads
SwiGLU expansion2x, producing 432 channels
Channel layout18 chunks of 24 channels
Channel-mixing heads3
Position encodingContiguous-half RoPE
Weight formatBF16 Safetensors

The expanded SwiGLU representation is divided into channel chunks that act as queries, keys, and values for a small dense mixing graph. Each 24-channel chunk is split across three heads, and each head computes an 18x18 content-dependent mixing matrix.

The centered operator is V_mix = [I + s(A(x) - A0)]V. The mixed representation then passes through the block's single SwiGLU down projection. Shared diagonal Q/K scales keep the mixer lightweight, while the reference distribution provides an identity-preserving initialization.

What is different?

Token-to-token attention remains a standard causal grouped-query attention layer. The architectural change is inside SwiGLU: after expansion, each token's features are divided into small channel chunks and content-dependent attention mixes information between those chunks. The centered update V_mix = [I + s(A(x) - A0)]V preserves the ordinary SwiGLU representation at its reference state while allowing learned cross-channel interactions. The mixed representation then passes through the block's single down projection, contracting it back to model width before it rejoins the residual stream.

Tokenizer

The model uses the 4,096-token tokenizer from AxiomicLabs/GPT-S-5M at revision 275b9c3ca78736bf6aeb154c7e2d5f5764fe9035. The exported checkpoint preserves its vocabulary, tokenization pipeline, and native special tokens. Standalone prompts receive the tokenizer's native BOS prefix.

Training

The model was trained for 40,000 updates on 20.97B tokens, with an effective batch of 524,288 tokens per update and a sequence length of 1,024.

SourceShare
FineWeb-Edu 100BT55%
Cosmopedia v225%
FineWeb-HQ10%
FineMath 4+10%

Training used native BF16 compute, AdamW for embeddings and scalar parameters, Muon for hidden matrices, a 1,000-update warmup, a flat learning-rate phase through update 30,000, and cosine decay to zero at update 40,000.

Evaluation

The following results characterize the released checkpoint across language modeling, commonsense completion, reading comprehension, and science question answering. Results are reported task by task without composite aggregation.

All tasks were evaluated zero-shot with lm-eval 0.4.12 at model revision fa2cd38b2888846e350bf533dc7bd21fbcfc344f. Model weights were BF16, likelihood softmax was FP32, the evaluation batch size was 8, a native BOS token was added, and the maximum context was 1,024 tokens. Inputs exceeding the model context, encountered in BoolQ, were left-truncated by the harness. Standard errors are reported directly from lm-eval; n/a means the task does not define that metric.

Taskaccacc stderracc_normacc_norm stderrPerplexityPPL stderr
HellaSwag26.85%0.44%27.60%0.45%n/an/a
ARC-Easy36.03%0.99%34.97%0.98%n/an/a
ARC-Challenge16.21%1.08%23.21%1.23%n/an/a
PIQA58.11%1.15%57.18%1.15%n/an/a
LAMBADA OpenAI17.87%0.53%n/an/a229.392610.0397
BoolQ54.86%0.87%n/an/an/an/a
WinoGrande52.64%1.40%n/an/an/an/a
OpenBookQA14.80%1.59%26.80%1.98%n/an/a
SciQ68.90%1.46%60.50%1.55%n/an/a
SWAG31.67%0.33%36.92%0.34%n/an/a
BLiMP70.13%0.15%n/an/an/an/a
ArithMark-3n/an/a29.90%n/an/an/a

BLiMP was evaluated over all 67 official subtasks with automatic batch-size selection; the table reports its group accuracy. ArithMark-3 was evaluated separately using its official acc_norm metric. A standard error was not recorded for that ArithMark-3 run and is therefore left as n/a.

WikiText-103 validation produced loss 3.1497, perplexity 23.33, and normalized BPB 1.4241 over 359,037 scored tokens using 1,024-token windows with a 512-token stride.

Intended use and limitations

Qana-mini-5M is intended for architecture research, representation analysis, educational experiments, and controlled comparisons. It is a compact base model rather than an instruction-tuned assistant. Its scale and context length limit factual reliability, generation quality, and long-context capability. Outputs may contain inaccuracies or biases inherited from the training data and should not be used for consequential decisions.

Credits

Qana-mini-5M was led, developed, trained, evaluated, and released by User01110. Additional authorship and project credit belong to Paul Courneya and Jonathon LY. The project is part of the FromZiro research community.

Copyright (c) 2026 User01110
Copyright (c) 2026 FromZiro
Copyright (c) 2026 Paul Courneya
Copyright (c) 2026 Jonathon LY

License

The complete release is covered by the Qana Open Attribution License 1.0, including the weights, architecture, implementation, configuration, tokenizer artifacts, metadata, and documentation.

  • No permission or fee is required for private testing, research, evaluation, use, modification, fine-tuning, implementation, or commercial use.
  • Redistribution, derivative models, and public products or services are also allowed, but must preserve the license and provide visible credit to Qana-mini-5M and its authors: User01110, Paul Courneya, and Jonathon LY with a repository link where practical.
  • Users are solely responsible for their use, outputs, compliance, and any misuse. The authors and FromZiro provide no warranty, accept no liability, and do not endorse downstream applications.

Third-party components, datasets and tokenizer materials remain subject to their respective licenses.

Citation

@misc{qana_mini_5m_2026,
  title        = {Qana-mini-5M},
  author       = {User01110},
  organization = {FromZiro},
  year         = {2026},
  url          = {https://huggingface.co/User01110/Qana-mini-5M}
}

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

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

GPU в ailist

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

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

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

Класс архитектуры
ACSwiGLUForCausalLM
Ревизия весов
3a240e1

0 моделей