/ Модель

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

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

Accordion-6B-A0.5B-RL

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

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

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

Accordion-6B-A0.5B-RL — англоязычная MoE-модель для диалогов, следования инструкциям, математики и кода с регулируемым бюджетом вычислений за счёт повторного выполнения слоёв.

Accordion-6B-A0.5B-RL — языковая модель семейства Accordion, разработанная авторами проекта Accordion. Это финальная версия после обучения с подкреплением: от SFT-модели обучили три экспертные модели для следования инструкциям, математики и кода, объединили их и дополнительно выполнили дистилляцию. Архитектура MoE содержит 24 слоя и около 6 млрд параметров, из которых активно примерно 0,54 млрд на токен; метаданные указывают 1 млрд параметров. Модель поддерживает контекст до 32 768 токенов.

Особенность модели — повторное выполнение выбранных средних слоёв: при настройке бюджета вычислений от 0 до 12 слоёв выполняются повторно, что даёт от 24 до 36 исполнений слоёв на токен при неизменных весах. Модель предназначена для диалогов, следования инструкциям, математических задач и генерации кода; README приводит результаты оценок на GSM8K и MATH500. Основной язык — английский. Для работы с повторением слоёв нужны эталонная реализация Hugging Face с trust_remote_code или плагин vLLM проекта Accordion-Loop; стандартные движки могут не поддерживать архитектуру. Модель не настроена на безопасность, может выдавать неверный, предвзятый или вредный текст. Лицензия указана как other.

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

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

Ограничения

Модель не настроена на безопасность и может генерировать неверный, предвзятый или вредный текст; обучение ориентировано преимущественно на английский, другие языки не были целевыми. Повторение слоёв поддерживают только эталонная реализация Hugging Face и плагин vLLM проекта Accordion-Loop.

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Accordion-6B-A0.5B-RL

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 RL model (final). Starting from the SFT model, three domain experts (instruction following, math, code) were trained with RL (verl, all five budgets mixed in every batch), merged by parameter-group task arithmetic, and refined with 10 steps of multi-teacher on-policy distillation from the three experts. Weights are the bf16 cast of the fp32 master weights; this is the same bf16 model that was evaluated with vLLM.

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-RL"
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-RL --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
GSM8K84.1587.3488.6389.5489.16
MATH50083.8084.8088.6089.6089.80
AIME24 (avg@16)34.5839.7940.8345.2145.21
AIME25 (avg@16)27.9232.7136.8835.8336.67
HumanEval+79.8878.0586.5982.9384.15
MBPP+69.5871.4371.4372.4973.81
LiveCodeBench (454)28.6329.7439.8737.8935.24
IFEval (prompt, strict)87.9988.9189.8389.8389.83
IFBench48.3350.6750.6752.6746.67
MMLU-Redux70.9873.6874.1375.1874.77

Compared with the SFT model the largest gains are in instruction following (IFEval +24 to +30, IFBench +24 to +33 points) and MMLU-Redux (+8 to +10); math and code change by a few points.

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
Ревизия весов
d362d0f

0 моделей