/ Модель

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

Лицензия
Apache 2.0
Архитектура
m2r · dense
Библиотека
pytorch
Опубликована
4 сен 2026

amx-reasoning-v1

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

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

94скачиваний за 30 дней0лайковвеса обновлены4 сен 2026

Бенчмарки

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

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

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

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

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

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

gdiamos/amx-reasoning-v1 — небольшая причинная языковая модель из проекта m2-reasoning, обученная разработчиком репозитория на одном ядре Intel Emerald Rapids с использованием AMX и oneDNN. Модель содержит 7 492 448 параметров и обучена на 4 909 998 080 токенах. Её архитектура M2RForCausalLM сочетает скользящее оконное внимание и линейное внимание с затуханием состояния; в модели 6 слоёв с размерностью d_model 256.

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

В README указана лицензия Apache-2.0. Для загрузки через AutoModelForCausalLM стандартной поддержки Transformers недостаточно: в репозитории есть собственный исходный код архитектуры и пример запуска.

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

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

Ограничения

Модель склонна к зацикливанию и повторению текста; она ненадёжна в фактических ответах, следовании инструкциям и рассуждениях. У модели не было обучения выравниванию, безопасности или предпочтениям.

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

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

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

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

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

Открыть на Hugging Face

gdiamos/amx-reasoning-v1

A 7,492,448-parameter causal language model trained on 4,909,998,080 tokens, from the m2-reasoning project. Small enough to train on one CPU core -- this checkpoint was trained on a single Intel Emerald Rapids core using AMX through oneDNN.

Running it

AutoModelForCausalLM.from_pretrained will not work: the architecture is not one transformers knows -- chunked sliding-window attention interleaved with log-decay linear attention, and a tied readout. The model's own source is included here instead, under m2r/, unmodified from the repository that trained it.

hf download gdiamos/amx-reasoning-v1 --local-dir amx-reasoning-v1
cd amx-reasoning-v1 && pip install -r requirements.txt && python example.py

or directly:

import sys, torch
from safetensors.torch import load_file
from tokenizers import Tokenizer
sys.path.insert(0, ".")                 # the folder you downloaded

from m2r.config import load
from m2r.model.torch_model import Model, swa_mask

cfg = load("training_config.yaml")
model = Model(cfg.model).to(torch.bfloat16)
model.load_state_dict(load_file("model.safetensors"))
model.eval()
tok = Tokenizer.from_file("tokenizer.json")
mask = swa_mask(cfg.model, dtype=torch.bfloat16)

# Pad to a whole number of blocks and read the last REAL position: the
# training forward chunks by `window` / the linear-attention chunk, and a
# prompt is whatever length it is. Right-padding is safe -- attention is
# causal and the MLP is position-wise.
PAD_TO = max(cfg.model.window, cfg.model.route_block or 1, 256)
ids = [1] + tok.encode("The capital of France is").ids    # 1 is BOS
for _ in range(60):
    n = len(ids)
    x = torch.tensor([ids + [0] * ((-n) % PAD_TO)])
    with torch.no_grad():
        h = model.body(x, mask)[:, n - 1]
    logits = (h @ model.emb.t().to(h.dtype)).float()[0] / 0.8
    v, i = logits.topk(40)
    ids.append(int(i[torch.multinomial(v.softmax(-1), 1)]))
print(tok.decode(ids[1:]))

Sample rather than take the argmax. At this size greedy decoding falls into a repetition loop within a few tokens, which says more about argmax than about the model.

example.py is exactly that script. BOS (id 1) matters: the model was trained with attention confined to document boundaries, keyed on that token, so a prompt without it is unlike anything it saw in training.

What is in this repo

file
model.safetensorsthe weights, bf16
config.jsonevery architecture field, machine readable
training_config.yamlthe run's config, and what example.py loads
tokenizer.jsona tokenizers BPE; Tokenizer.from_file loads it alone
m2r/the model source: config.py, model/torch_model.py, model/moe.py
example.pyload and generate
LICENSEApache 2.0

Architecture

d_model256
layers6
layer typeslin, swa, swa, lin, swa, lin
mixerssliding-window attention (window 256), log-decay linear attention (d_state 32)
MLP width640
vocabulary16384
readouttied to the embedding
parameters7,492,448 stored, 3,315,552 active per token

Attention is confined to document boundaries: a training window packs many documents, and without isolation sliding-window attention reaches into its neighbours while linear attention carries state across the entire window.

Training data

sourcetokensshare
reasoning_anneal.code_reasoning1,475,753,52830.1%
foundation.github_code1,175,719,14023.9%
foundation.web870,198,31817.7%
foundation.code_reasoning417,689,7728.5%
foundation.math367,413,3367.5%
reasoning_anneal.github_code260,043,4205.3%
reasoning_anneal.web77,672,2721.6%
reasoning_anneal.math65,010,3641.3%
foundation.task_induct29,460,0000.6%
foundation.task_shift29,460,0000.6%
foundation.task_add29,460,0000.6%
foundation.instruct_sft21,520,5300.4%
reasoning_anneal.instruct_sft21,519,5480.4%
reasoning_anneal.task_induct19,640,0000.4%
reasoning_anneal.task_shift19,640,0000.4%
reasoning_anneal.task_add19,640,0000.4%
reasoning_anneal.short_sft23,448,7840.1%
foundation.short_sft23,446,8200.1%
foundation.short_sft1,632,0840.0%
reasoning_anneal.short_sft1,632,0840.0%
total4,910,000,000

Metrics

These are the run's own validation numbers, on its fixed held-out set, as logged. They are a sampled loss -- a (1 + n_negatives)-way discrimination, not a full-vocabulary one -- except val_flat, which is full-vocabulary.

{
  "val_foundation": {
    "last_3": [
      3.140625,
      3.28125,
      3.28125
    ],
    "mean": 3.234375
  },
  "val_reasoning_anneal": {
    "last_3": [
      2.765625,
      2.703125,
      2.765625
    ],
    "mean": 2.7447916666666665
  },
  "val_flat": {
    "last_3": [
      3.3155245780944824,
      3.2603909969329834,
      3.385425329208374
    ],
    "mean": 3.3204469680786133
  },
  "val_loss": {
    "last_3": [
      2.765625,
      2.703125,
      2.765625
    ],
    "mean": 2.7447916666666665
  },
  "steps": 1198729,
  "tokens": 4909998080
}

Intended use and limitations

A research artifact. At this scale the model produces locally fluent text and is not reliable for factual questions, instruction following, or reasoning.

It degenerates into repetition. example.py as shipped, sampling at temperature 0.8 with top-k 40, produces something like

The capital of France is commonly used in enhancing enhancing productivity practices worldwide worldwide worldwide worldwide worldwide worldwide...

Greedy decoding is worse -- it loops within a few tokens. No repetition penalty is applied anywhere; adding one would hide the behaviour rather than change it. Treat fluent-looking spans as coincidence rather than capability.

It has had no alignment, safety, or preference training of any kind, and will reproduce the biases and errors of its training corpus.

License and provenance

Apache 2.0, for the weights and for the source in m2r/. The full text is in LICENSE.

The training data is a mixture of public code, web, math and instruction corpora, with per-source token counts in the table above. Those corpora carry their own terms, which the Apache licence on this model does not alter and does not extend to them.

Produced by tools/export_hf.py from run torch-20260831T204431-16k-4day at step 1198730.

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

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

GPU в ailist

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

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

Архитектура m2r неизвестна transformers в образе рантайма.

Класс архитектуры
M2RForCausalLM
Ревизия весов
0a75460

0 моделей