/ Модель

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

Контекст
2 048 токенов
Архитектура
cma · dense
Библиотека
transformers
Опубликована
20 июл 2026

CMA-1M-Mini

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

CMA-1M Mini — крошечная экспериментальная языковая модель для продолжения текста и исследований механизма Channel-Mixing Attention.

219скачиваний за 30 дней3лайкавеса обновлены20 июл 2026

Бенчмарки

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

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

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

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

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

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

CMA-1M Mini — экспериментальная базовая авторегрессионная языковая модель User01110 с архитектурой CMA (Channel-Mixing Attention), предназначенная для изучения смешивания каналов внимания на очень малом масштабе. Это декодерная плотная модель примерно с 959 тысячами параметров, шестью слоями и шириной скрытого представления 128; она использует причинное групповое внимание, байтовую токенизацию и окно контекста в 2 048 байтовых токенов.

Модель продолжает обычный текст и подходит для контролируемых архитектурных экспериментов, обучения и сравнений компактных языковых моделей. Это предварительно обученная базовая модель, а не чат- или инструкционная система. Обучение проводилось преимущественно на англоязычных текстовых корпусах; байтовый токенизатор способен представить текст на других языках, но это не означает хорошего качества на них.

README прямо предупреждает, что генерации ненадёжны, часто несвязны и не должны считаться фактами или использоваться для реальных решений. Модель не настроена для диалога, следования инструкциям, работы с инструментами или безопасности. Для генерации на длинном контексте она пересчитывает активный контекст без KV-кэша, что замедляет работу. Веса представлены в BF16 и формате safetensors; для загрузки через Transformers требуется пользовательский код из репозитория и параметр trust_remote_code=True. Лицензия в предоставленных данных не указана.

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

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

Ограничения

Генерации часто несвязны и ненадёжны; модель не предназначена для диалогов, следования инструкциям или принятия решений. Обучение преимущественно англоязычное, а отсутствие KV-кэша замедляет длинную генерацию.

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

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

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

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

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

Открыть на Hugging Face

CMA-1M Mini

[!WARNING] Experimental research model, generations are fully unreliable. CMA-1M Mini exists only as a test bed for understanding how Channel-Mixing Attention works, where it helps, and where its limits and failure modes appear. Do not treat its output as factual, safe, coherent, or suitable for production or real-world decisions.

CMA-1M Mini is a 958,692-parameter base causal language model built to test Channel-Mixing Attention (CMA) at very small scale. It combines causal grouped-query token attention with content-dependent mixing across each token's hidden channels. The model uses a lossless byte-level tokenizer, tied embeddings, native BF16 weights, and a 2,048-token context window.

Parameters958,692
ArchitectureDecoder-only CMA causal LM
Context2,048 byte tokens
Vocabulary260 tokens: 256 bytes + PAD/BOS/EOS/UNK
Weight formatBF16 Safetensors
Intended interfacePlain-text completion

This is a pretrained base model, not a chat or instruction model. Give it ordinary text to continue; no chat template or role markers are required.

Quick start

The architecture is provided as custom Transformers code, so trust_remote_code=True is required. PyTorch 2.5 or newer is recommended.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "User01110/CMA-1M-Mini"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = (
    torch.bfloat16
    if device == "cuda" and torch.cuda.is_bf16_supported()
    else torch.float32
)

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

prompt = "The process of photosynthesis"
inputs = tokenizer(prompt, return_tensors="pt")
inputs = {name: tensor.to(device) for name, tensor in inputs.items()}

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

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

The tokenizer automatically prepends <bos> during normal encoding. It does not append <eos> to a prompt; generation ends when the model emits EOS or reaches the requested length. If you deliberately use add_special_tokens=False, prepend BOS yourself.

Generation options

The included generation defaults are deterministic decoding with a repetition penalty of 1.2. Override them per request as needed.

GoalRecommended settings
Reproducible completiondo_sample=False
Balanced samplingdo_sample=True, temperature=0.8, top_p=0.9, top_k=50
More varied textdo_sample=True, temperature=1.0, top_p=0.95
Reduce loopsrepetition_penalty=1.1 to 1.2
Beam searchdo_sample=False, num_beams=4
Output lengthSet max_new_tokens; keep prompt + output within 2,048 tokens

Example with sampling:

with torch.inference_mode():
    output = model.generate(
        **inputs,
        max_new_tokens=128,
        do_sample=True,
        temperature=0.8,
        top_p=0.9,
        top_k=50,
        repetition_penalty=1.15,
    )

For the high-level pipeline API:

import torch
from transformers import pipeline

generator = pipeline(
    "text-generation",
    model="User01110/CMA-1M-Mini",
    tokenizer="User01110/CMA-1M-Mini",
    trust_remote_code=True,
    dtype="auto",
    device=0 if torch.cuda.is_available() else -1,
)

result = generator(
    "In a distant future,",
    max_new_tokens=80,
    do_sample=True,
    temperature=0.8,
    top_p=0.9,
)
print(result[0]["generated_text"])

To score text rather than generate it:

encoded = tokenizer("CMA models text one byte at a time.", return_tensors="pt")
encoded = {name: tensor.to(device) for name, tensor in encoded.items()}

with torch.inference_mode():
    result = model(**encoded, labels=encoded["input_ids"])

print(float(result.loss))

Tokenizer and context

  • Every UTF-8 byte has a token, so ordinary text cannot become out-of-vocabulary.
  • The four control tokens are <pad> (0), <bos> (1), <eos> (2), and <unk> (3).
  • The context limit is 2,048 byte tokens, not 2,048 words or subword tokens.
  • Non-ASCII text usually consumes multiple byte tokens per character.
  • For long inputs, explicitly keep the most recent 2,048 tokens rather than relying on implicit truncation.
  • The tokenizer has no arithmetic-specific splitting, chat template, or hidden prompt transformation.

Architecture

ComponentConfiguration
Hidden width / layers128 / 6
Token attention4 query heads, 2 key-value heads
Position encodingContiguous-half rotary embeddings, no scaling
CMA layout8 channel slots x 16 channels
CMA routing2 heads, expansion 2, content-dependent softmax mixing
CMA initialization90% diagonal routing prior with a dense base path
Feed-forward gateSiLU-gated routed values
NormalizationRMSNorm
EmbeddingsInput and output weights tied
Attention runtimeNative PyTorch scaled-dot-product attention

For each token, CMA projects dense values, reshapes them into channel slots, and learns a softmax mixing matrix between those slots. A bounded learned coefficient controls the routed difference from the dense base value, so routing enriches rather than replaces the fallback path.

The exported generation implementation does not maintain a KV cache. This keeps the custom model compact and straightforward, but long autoregressive generations will recompute the active context and are slower than cached generation.

Training data

The model was pretrained as a general causal language model on the following mixture. Percentages describe the trained-token mixture.

SourceShare
FineWeb-Edu 100BT45%
DCLM-Baseline 1.025%
DCLM-Edu10%
Cosmopedia v210%
FineMath 4+10%

No benchmark-specific prompts, task detectors, arithmetic vocabulary, or inference-time answer rules are built into the model.

Evaluation

Evaluation is zero-shot. The four lm-eval tasks use normalized accuracy when provided by lm-eval 0.4.12. ArithMark-2 uses raw continuation log-likelihood sums. Weights are evaluated in BF16 with FP32 likelihood softmax and an automatic BOS prefix.

BenchmarkAccuracy
HellaSwag29.35%
ARC-Easy29.29%
ARC-Challenge21.76%
PIQA54.62%
ArithMark-227.44%
Open SLM Leaderboard-style average34.23%

The combined score is (HellaSwag + mean(ARC-Easy, ARC-Challenge) + PIQA + ArithMark-2) / 4. This is a report-only reproduction of the leaderboard formula, not an official leaderboard submission. WikiText-103 normalized validation BPB is 1.6974. Exact machine-readable results are available in benchmark_results.json.

Intended use and limitations

CMA-1M Mini is intended for architecture research, educational experiments, lightweight language-model tooling, and controlled comparisons at tiny scale.

  • At fewer than one million parameters, generations are short-range and frequently incoherent; the model should not be treated as a knowledge source.
  • It is not instruction-tuned, conversationally aligned, tool-using, or safety-tuned.
  • Training data is predominantly English even though byte tokenization can represent any UTF-8 text.
  • Outputs may reproduce biases, inaccuracies, or undesirable patterns from public training corpora.
  • Do not use it for consequential medical, legal, financial, or safety decisions.
  • Loading custom code executes files from the repository. Review the code or pin a trusted revision in security-sensitive environments.

Repository contents

  • model.safetensors — BF16 model weights
  • modeling_cma.py — Transformers-compatible CMA implementation
  • config.json and generation_config.json — architecture and decoding defaults
  • tokenizer.json and tokenizer_config.json — deterministic byte tokenizer
  • benchmark_results.json — exact evaluation metrics and protocol metadata
  • training_config.json — reproducibility configuration

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

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

GPU в ailist

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

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

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

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

0 моделей