/ Модель

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

Контекст
32 768 токенов
Параметры
1 млрд
Лицензия
Своя лицензия
Архитектура
loop_moe · MoE
Базовая модель
Accordion-6B-A0.5B-Base-32K
Библиотека
transformers
Опубликована
22 окт 2026

Accordion-6B-A0.5B-SFT

Генерация текстаТекст → текст7 профессий
91скачиваний за 30 дней0лайковвеса обновлены27 окт 2026

Описание модели

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

Дообученная MoE-языковая модель Accordion для диалоговой генерации и задач на рассуждение с настраиваемым вычислительным бюджетом.

Accordion-6B-A0.5B-SFT — языковая модель семейства Accordion, разработанная авторами проекта Accordion. Это 24-слойная MoE-модель примерно с 6 млрд параметров, из которых около 0,54 млрд активны на токен. Она дообучена на reasoning-диалогах на базе Accordion-6B-A0.5B-Base-32K и поддерживает контекст до 32 768 токенов.

Модель предназначена для генерации ответов в диалоге и решения задач на рассуждение, математику и код. Особенность архитектуры — повторное выполнение выбранных средних слоёв: при настройке параметра loop_k можно выбрать один из пяти вычислительных бюджетов, от 24 до 36 исполнений слоёв на токен, используя те же веса. В опубликованных авторами оценках чат-формата результаты на GSM8K и MATH500 улучшались при увеличении бюджета, хотя на некоторых базовых бенчмарках после SFT такого улучшения не было.

Модель ориентирована преимущественно на английский язык; код и математика также представлены в обучении. Авторы отмечают, что она не прошла настройку безопасности и может выдавать ошибочные, предвзятые или вредоносные тексты. Для поддержки layer looping нужны эталонная реализация Hugging Face с trust_remote_code или плагин vLLM проекта Accordion-Loop; стандартные движки могут не поддерживать архитектуру. Лицензия указана как other, поэтому условия использования следует проверять в карточке модели.

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

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

Ограничения

Модель преимущественно обучена на английском языке, не настроена на безопасность и может выдавать неверные, предвзятые или вредоносные ответы. Layer looping требует специальной поддержки в среде инференса; лицензия обозначена как other, поэтому условия использования нужно уточнить в карточке.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

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

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

Accordion-6B-A0.5B-SFT

Paper · Project page · Code · All models

Accordion: one set of weights, five inference depths (Low, Medium, High, XHigh, Ultra: 24 to 36 layer executions)

Accordion is a 24-layer Mixture-of-Experts language model (≈6.0B total parameters, ≈0.54B active non-embedding parameters per token) trained so that one set of weights serves five inference compute budgets. During training, each micro-batch samples $k \in {0, 3, 6, 9, 12}$ and the first $k$ layers of the middle window (layers 7–18) each run a second time in place (layer looping: each layer has its own self-loop; the second pass is scaled by a zero-initialised per-channel $\tanh(g)$ gate and reuses the same router, with a separate expert-selection bias). At inference you pick $k$, i.e. 24 to 36 layer executions per token, with no change to the weights. This differs from whole-model recurrence (e.g. Ouro), which repeats the entire layer stack.

This is the SFT model: Base-32K fine-tuned for 8,614 steps on reasoning-style conversations (thinking traces rendered as <think>…</think>), at 32K context with the five budgets mixed.

Model family

ModelStageContext
Accordion-6B-A0.5B-Base-8Kpre-training 3T + mid-training 0.15T + annealing 0.45T tokens8K
Accordion-6B-A0.5B-Base-32KBase-8K + 50B tokens of 32K long-context training32K
Accordion-6B-A0.5B-SFTBase-32K + supervised fine-tuning (reasoning traces)32K
Accordion-6B-A0.5B-RLSFT + RL (IF / math / code experts → grouped merge → 10 steps of multi-teacher on-policy distillation)32K

All four keep the five budgets: training and RL always mix $k \in {0,3,6,9,12}$.

Architecture

Layers24 (layers 7–18 loopable)
Hidden size1536
AttentionGQA, 12 query / 4 KV heads, head dim 128, QK-RMSNorm, RoPE θ = 500,000
MoE128 routed experts, top-8 (sigmoid scores, aux-loss-free bias for selection) + 1 shared expert, expert FFN 384
Vocabulary128,000 (DeepSeek-V3 tokenizer)
Budgets$k$ ∈ {0, 3, 6, 9, 12} (Low / Medium / High / XHigh / Ultra) → 24 / 27 / 30 / 33 / 36 layer executions
Weightsbf16; expert_bias* buffers kept in fp32

Each layer execution keeps its own KV cache, so the KV cache grows with $k$ (×1.5 at $k$=12).

Usage

The modeling code ships with the checkpoint (trust_remote_code=True). Tested with transformers 4.57.1 and 5.17.0, torch 2.14. The budget is chosen per call with loop_k (default: config.loop_k = 0).

Generation uses the model's own loop_generate (greedy or nucleus sampling, left-padded batches). model.generate() is not supported, because every layer execution needs its own KV-cache slot.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "btzyd/Accordion-6B-A0.5B-SFT"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).cuda().eval()

messages = [{"role": "user", "content": "Solve the following math problem. Make sure to put the answer "
             "(and only answer) inside \\boxed{}.\n\nWhat is the sum of the first 10 positive odd numbers?"}]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)["input_ids"].cuda()
out = model.loop_generate(ids, max_new_tokens=4096, loop_k=12, do_sample=True, temperature=0.6, top_p=0.95,
                          stop_token_ids=(tok.eos_token_id,))
print(tok.decode(out[0], skip_special_tokens=True))   # "<think>\n...\n</think>\n\n... \boxed{100}"

Prompt format. There are no role tokens. The chat template renders <|end▁of▁sentence|> + user text + "\n\n"; the model answers with <think>\n…\n</think>\n\n followed by the final answer and ends the turn with <|end▁of▁sentence|>. A system message is rendered like a user turn, and earlier assistant turns are appended verbatim, each followed by <|end▁of▁sentence|>. Our evaluations used temperature 0.6 / top-p 0.95 and 8K–30K new tokens. Reasoning can be long, so allow a generous max_new_tokens.

vLLM. The accordion-vllm plugin serves this model with one budget per engine, set by LOOPMOE_K:

pip install vllm==0.24.0 "git+https://github.com/btzyd/Accordion-Loop#subdirectory=vllm_plugin"
LOOPMOE_K=12 vllm serve btzyd/Accordion-6B-A0.5B-SFT --trust-remote-code --dtype bfloat16 --max-model-len 32768

Notes:

  • The tokenizer has only three special tokens: <|begin▁of▁sentence|> (0, never seen in training — do not add it), <|end▁of▁sentence|> (1, document separator / end of turn) and <|▁pad▁|> (2). Every document in training was preceded by token 1, so prefix inputs with it, as the examples do.
  • Budgets other than the five trained ones (e.g. $k$=5, or looping an arbitrary set of layers via loop_layers_active) run, but were never trained and are generally worse.

Evaluation

Same weights, five budgets. Chat-format evaluation with vLLM (bf16), temperature 0.6, top-p 0.95, one sample per problem (16 for AIME); answers are taken after </think>.

$k$=036912
Layer executions2427303336
GSM8K83.4085.6788.7887.7288.63
MATH50083.4084.8087.4086.8089.20
AIME24 (avg@16)30.0034.7939.5843.5443.75
AIME25 (avg@16)26.8828.9632.9236.8831.88
HumanEval+79.8878.0579.2779.8881.71
MBPP+69.5867.7273.0270.9072.75
LiveCodeBench (454)26.6531.9434.5836.3437.89
IFEval (prompt, strict)62.1164.8865.9963.4060.07
IFBench17.3320.3320.3319.3323.00
MMLU-Redux60.8863.4765.8266.1765.16

Few-shot base-style benchmarks no longer improve with $k$ after SFT (five-cluster average 49.22 / 48.71 / 48.27 at $k$ = 0 / 6 / 12); the chat-style evaluations above do.

Single training run, single seed; paired-bootstrap intervals are in the paper. Scripts to reproduce this table are in Accordion-Loop (eval/chat).

Limitations

  • A research model at small scale (0.5B active parameters); it is not safety-tuned and can produce wrong, biased or harmful text.
  • Mostly English, with some code and math; other languages were not a training target.
  • Only the HF reference implementation and the vLLM plugin in Accordion-Loop support layer looping; standard inference engines will not load this architecture.

Citation

@misc{zhang2026accordionelasticdepthinferencefixedprefix,
      title={Accordion: Elastic-Depth Inference via Fixed-Prefix Layer Looping},
      author={Yudong Zhang and Wei Ding and Kaili Zheng and Yuchen Ding and Zhenyu Zhang},
      year={2026},
      eprint={2610.32492},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2610.32492},
}

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

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

GPU в ailist

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

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

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

Класс архитектуры
LoopMoEForCausalLM
Ревизия весов
4680e89

0 моделей