/ Модель

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

Контекст
131 072 токена
Параметры
1,9 млрд
Лицензия
Apache 2.0
Архитектура
mellum · MoE
Базовая модель
Mellum2-12B-A2.5B-Base
Библиотека
transformers
Опубликована
19 ноя 2026

Quark-12B-A2.5B-v0.7

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

Модель NeutronAI для контекстного автодополнения кода методом fill-in-the-middle на Python, TypeScript, JavaScript и C++.

385скачиваний за 30 дней0лайковвеса обновлены21 ноя 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Quark-12B-A2.5B-v0.7 — модель автодополнения кода от NeutronAI, дообученная на базе JetBrains/Mellum2-12B-A2.5B-Base. Это MoE-модель с 12 млрд параметров всего и 2,5 млрд активных параметров на токен; метаданные указывают 1,9 млрд параметров. Она предназначена для заполнения пропуска в коде: получает код до и после курсора и генерирует отсутствующий фрагмент. Поддерживает Python, TypeScript, JavaScript и C++; может использовать контекст репозитория в виде сигнатур из связанных файлов. Контекст модели составляет до 131 072 токенов.

Модель обучена методом supervised fine-tuning для fill-in-the-middle на примерах из открытых репозиториев. В описанном авторами тесте на выполнении тестов целевых репозиториев она показала результаты, близкие к Qwen2.5-Coder-14B при меньших вычислениях на токен. Это специализированная модель автодополнения, а не чат-модель: она не предназначена для следования инструкциям. Длинные пропуски заполняет менее надёжно, JavaScript — её слабейший язык; сгенерированный код следует проверять. Лицензия — Apache 2.0.

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

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

Ограничения

Это модель автодополнения, а не чат-модель, и она не предназначена для следования инструкциям. Длинные пропуски и JavaScript обрабатывает менее надёжно; сгенерированный код требует проверки, а для специфичных деталей репозитория нужен релевантный контекст.

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

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

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

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

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

Открыть на Hugging Face

Quark-12B-A2.5B v0.7

Quark is NeutronAI's tab-completion model: you give it the code before and after the cursor, and it writes the missing middle. It is a fine-tune of JetBrains' Mellum2-12B-A2.5B-Base, a mixture-of-experts model with 12B parameters in total but only 2.5B active per token, so it runs about as fast as a 2.5B model. On our test-based benchmark it matches Qwen2.5-Coder-14B, a dense model with about six times the compute per token.

  • Languages: Python, TypeScript, JavaScript, C++
  • Task: fill-in-the-middle (FIM) with optional repository context (signatures from the repo's other files)
  • License: Apache 2.0, the same as the base model
  • GGUF: neutronai-code/Quark-12B-A2.5B-v0.7-GGUF

Results: scored by real tests, not text matching

Most FIM benchmarks check whether the completion matches the original text. Ours checks whether the code still works. Each completion is spliced into the real repository, and the repository's own test suite decides pass or fail.

Benchmark: 600 holes (short and long) from 10 recent GitHub repositories that no model here was trained on. The prompt includes about 4k characters of repository context. Every model gets the same prompts, with greedy decoding.

ModelActive paramsPass ratePythonTypeScriptJavaScriptC++Short holesLong holes
Qwen2.5-Coder-14B (base)14.7B60.5%68.958.947.563.371.646.4
Quark-12B-A2.5B v0.72.5B59.8%67.257.246.765.870.446.4
Quark-12B-A2.5B v0.62.5B59.8%69.456.744.265.869.947.2
Qwen2.5-Coder-7B (base)7.6B54.7%62.256.738.356.763.044.2
Mellum2-12B-A2.5B-Base (our base)2.5B54.5%64.454.435.059.263.643.0
Quark-1.5B v0.51.5B52.2%65.649.438.350.062.439.2
DeepSeek-Coder-V2-Lite-Base2.4B47.0%53.350.038.341.758.232.8
Qwen2.5-Coder-3B (base)3.1B43.8%50.643.929.248.352.532.8
StarCoder2-3B3B42.5%43.947.232.543.351.930.6
Qwen2.5-Coder-1.5B (base)1.5B36.3%47.237.824.230.043.926.8
Mellum-4b-base4B35.8%40.638.925.035.045.124.2
  • Quark matches a 14B dense model at about a sixth of the compute per token. Qwen2.5-Coder-14B is 0.7 points ahead, but head to head the two are even: v0.7 wins 56 holes and loses 60. Quark is ahead on C++ and ties on long holes.
  • Against DeepSeek-Coder-V2-Lite, a mixture-of-experts model of about the same active size (16B total, 2.4B active), v0.7 is 12.8 points ahead.
  • The GGUF keeps the score. The Q4_K_M GGUF (8.1 GB) passes 60.8% on the same benchmark; against these bf16 weights it wins 28 holes and loses 22, within noise.
  • Against its own base model, v0.7 wins 65 holes and loses 33. Against Qwen2.5-Coder-7B it wins 81 and loses 50.
  • Codestral-22B-v0.1 is not in the table. With raw FIM prompts its completions usually ran past the end of the hole (median 1,372 characters, against 83 for Quark), so its score (25.3%) says more about our setup than the model.
  • Second check on unseen code: on 1,126 more holes from 21 other repositories Quark was never trained on, v0.7 passes 58.9%, close to its benchmark score.
  • v0.7 trained for twice as long as v0.6 and ties it, so this is the plateau for this recipe. Doubling the repository context to 8k characters also gives no gain (60.2%).

Prompt format

Quark uses Mellum's FIM tokens with the suffix first:

<fim_suffix>{code after the cursor}<fim_prefix>{code before the cursor}<fim_middle>

With repository context, put each related file first as <filename>{path}\n{its signatures}\n, then the current file's path, then the FIM part:

<filename>src/rates.py
def tax_multiplier(region: str) -> float:
class Invoice:
    def total(self) -> float:
<filename>src/billing.py
<fim_suffix>{suffix}<fim_prefix>{prefix}<fim_middle>

The context Quark was trained on is one-line signatures (functions, classes, members, constants) from the repo's other files, with bodies cut to {...}, ordered most relevant first. The model then writes the middle and ends with <|endoftext|>. Also stop on <filename>, <fim_prefix> and <fim_suffix>.

def quark_prompt(prefix: str, suffix: str, path: str = "", context: list[tuple[str, str]] = ()) -> str:
    """context: (path, signatures) pairs for related files, most relevant first."""
    ctx = "".join(f"<filename>{p}\n{text.rstrip()}\n" for p, text in context)
    head = f"{ctx}<filename>{path}\n" if ctx else ""
    return f"{head}<fim_suffix>{suffix}<fim_prefix>{prefix}<fim_middle>"

Usage

vLLM (what we benchmark with)

vllm serve neutronai-code/Quark-12B-A2.5B-v0.7 --max-model-len 8192
import requests

prompt = quark_prompt(prefix="def is_even(n: int) -> bool:\n    return ", suffix="\n\nprint(is_even(4))\n")
r = requests.post("http://localhost:8000/v1/completions", json={
    "model": "neutronai-code/Quark-12B-A2.5B-v0.7", "prompt": prompt, "max_tokens": 256, "temperature": 0,
    "stop": ["<|endoftext|>", "<filename>", "<fim_prefix>", "<fim_suffix>"], "skip_special_tokens": False,
})
print(r.json()["choices"][0]["text"])

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

name = "neutronai-code/Quark-12B-A2.5B-v0.7"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, dtype="bfloat16", device_map="auto")
ids = tok(quark_prompt("def is_even(n: int) -> bool:\n    return ", "\n"), return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True))

The bf16 weights are 24 GB. For laptops, use the GGUF.

Training

  • Method: supervised FIM fine-tuning with LoRA (rank 32, on the attention layers and on all 64 experts; 435M trainable parameters), merged into the base weights.
  • Data: about 179k FIM examples from 265 open-source repositories under permissive licenses (MIT, Apache 2.0, BSD, ISC). Python, TypeScript, JavaScript and C++, about evenly split.
    • Hole types: whole statements and blocks (short and long), mid-line completions, random spans, holes where the right answer is empty, and whole-file completion.
    • Half of the examples carry repository context in the format above.
    • The benchmark repositories are excluded, and their code was checked against the training data.
  • Two stages:
    • Stage 1 (v0.6): one epoch over 59.6k examples.
    • Stage 2 (v0.7): one epoch over 119.3k new examples, continued from v0.6.
    • Both: learning rate 1e-4, effective batch size 16, sequences up to 4,096 tokens.
  • Hardware: NVIDIA A100 80GB and RTX Pro 6000 (96GB).

Limitations

  • Long holes (a whole function body or block) pass about 46% of the time; short ones about 70%.
  • JavaScript is the weakest language (47%).
  • When the code needed comes from a repository name that isn't in the prompt's context, Quark usually can't guess it. Give it good context.
  • It is a completion model, not a chat model: it doesn't follow instructions.
  • Like any code model, it can write code that looks right but is wrong. Review what you accept.

About NeutronAI

NeutronAI builds open coding models. Quark is the fast tab-completion line; Hadron is the reasoning and repository-editing line. Code: github.com/neutronai-code/neutron-ai.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
MellumForCausalLM
Ревизия весов
2950f87

0 моделей