/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-Coder-7B-Instruct
Библиотека
transformers
Опубликована
10 ноя 2026

qwen2.5-coder-7b-instruct-phi-lattice-v2

Генерация текстаТекст → текст10 профессий
1 345скачиваний за 30 дней0лайковвеса обновлены13 ноя 2026

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

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

4-битная версия Qwen2.5-Coder-7B-Instruct для генерации, анализа и исправления кода при меньшем объёме памяти.

Это 4-битная версия модели Qwen/Qwen2.5-Coder-7B-Instruct, подготовленная автором репозитория с использованием квантования phi-lattice v2. Модель с архитектурой Qwen2 dense и примерно 7,1 млрд параметров предназначена для генерации кода и диалогового взаимодействия. Репозиторий включает упакованные 4-битные веса, загрузчик и ядро Triton; таблицы токенов и нормализации сохранены в BF16. Контекст составляет 32 768 токенов, заявлена поддержка интерфейса вызова инструментов.

Квантованный архив занимает около 5,3 ГиБ против 14,18 ГиБ у исходных BF16-шардов. В README приведены результаты HumanEval и сравнения квантования, однако они не показывают убедительного превосходства над базовой моделью. Для запуска доступны режимы с низким потреблением памяти, Triton и восстановлением BF16. Лицензия — Apache-2.0.

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

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

Ограничения

Качество квантованной версии зависит от режима запуска; приведённая оценка HumanEval находится в пределах статистической погрешности базовой модели. Число языков программирования и естественных языков в источниках не определено.

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

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

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

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

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

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

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

Открыть на Hugging Face

qwen2.5-coder-7b-instruct-phi-lattice-v2

4-bit phi-lattice v2 build of Qwen/Qwen2.5-Coder-7B-Instruct (7.62B parameters, 28 transformer layers, 6,525,288,448 quantized linear weights across 196 linear layers, 255 / 255 stored tensors).

lm_head and embed_tokens stay BF16. They are the token tables (tie_word_embeddings is false, so both are stored). Norms stay BF16.

  1. qwen25_coder_7b_phi_v2_packed_4bit.pt (5,385.8 MiB) plus phi_loader.py and phi_lut_gemm.py. The archive is true 4-bit uint8 nibbles plus fp16 group scales (3,306.0 MiB for the 196 linears, 2,079.8 MiB for the BF16 token tables and norms). mode="low_vram_4bit" and mode="triton_4bit" keep that archive resident. Upstream BF16 shards are 14.18 GiB.
  2. The codebook used to unpack the nibbles is stored inside the archive as codebook.

Archive sha256: 0a7aec0875ad28826b1d585f54d2e984b737b88ec857911cc7ef7b5d83cd5819 (5,647,392,174 bytes). Every quantized layer has K % 64 == 0.


1. Repository layout and memory

qwen2.5-coder-7b-instruct-phi-lattice-v2/
├── qwen25_coder_7b_phi_v2_packed_4bit.pt   # 5,385.8 MiB packed archive (255/255 tensors)
├── phi_loader.py                           # low_vram_4bit, triton_4bit, unrolled_bf16
├── phi_lut_gemm.py                         # fused Triton 4-bit LUT-GEMM
├── run_text_evals.py                       # MMLU, GSM8K, IFEval, HellaSwag, one task at a time
├── config.json and tokenizer files
└── README.md
CheckpointDiskResidentLinear weights (6.53B)Versus upstream BF16
Upstream BF16 shards14.18 GiB14.18 GiB12,446.3 MiB1.00x
Packed 4-bit (low_vram_4bit / triton_4bit)5,385.8 MiB5,385.8 MiB3,306.0 MiB (3.76x)2.70x

Two quality numbers appear below. They are different measurements.

The packed file in this repo scores 19.28 dB SQNR against the upstream tensors. Exact zeros in its indices: 886,957,441 (13.59%).


2. Crystallizer comparison, not the bytes in the file

This second number, 18.64 dB, is not a second reading of the archive. It is a separate in-memory comparison of phi-lattice v1, phi-lattice v2, and a uniform 4-bit quantizer on the original BF16 weights. Perplexity below is a sanity check on four short texts, not a benchmark. The is_prime sample is greedy and capped at 64 new tokens. NVIDIA L4.

Method4-bit SQNR4-bit exact sparsityPerplexity (4 texts)
Baseline BF16Reference0.00%14.995
Uniform18.93 dB0.00%16.978
phi-lattice v118.63 dB8.54% (557,537,535)16.437
phi-lattice v218.64 dB8.54% (557,403,128)16.317

Unrounded, v2 is 18.6386 dB and v1 is 18.6326 dB, a difference of +0.006 dB. The zero counts differ by 134,407 weights, 0.002% of the 6.53B linears. The table rounds both SQNR figures to the same hundredth and both sparsities to 8.54%.

On Gemma 3 270M the same comparison moved SQNR: v2 19.48 dB, v1 18.65 dB (+0.83 dB), Uniform 18.69 dB (+0.79 dB). The gain depends on the architecture. On this coder it does not show up in SQNR.

The four-text perplexity moves the other way from SQNR. Uniform has the best SQNR (18.93 dB) and the worst perplexity (16.978). v2 pays about 0.3 dB of SQNR against Uniform, keeps the 8.5% zeros, and scores 16.317. SQNR by itself does not predict that gap. Baseline and v2 both started a correct is_prime. The v2 sample was cut at the 64-token cap.

Text benchmarks for this archive:

python3 run_text_evals.py --target qwen25-coder-base --task mmlu
python3 run_text_evals.py --target qwen25-coder-v2 --task mmlu

qwen25-coder-v2 unrolls this repo. qwen25-coder-base is Qwen/Qwen2.5-Coder-7B-Instruct. Omit --task to run MMLU, GSM8K, IFEval, and HellaSwag one at a time.

HumanEval

humaneval_instruct, greedy, chat template on, 164 tasks, pass@1. The file is evals/humaneval_qwen25_coder.json.

ModelRunpass@1stderrsolved
Base Qwen/Qwen2.5-Coder-7B-InstructNVIDIA L4, BF160.84150.0286138 / 164
phi-lattice v2NVIDIA A100, archive unpacked to BF160.85370.0277140 / 164

v2 solved two more tasks. The difference is 0.012, smaller than either stderr, so the scores sit inside the same error bar.

v2 was scored from unrolled_bf16: the packed archive is unpacked once, then generation matches the base run. low_vram_4bit dequantizes on every token and was not used for this number.


3. Quick start

PyTorch or Triton

import importlib.util
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer

repo_id = "ununununununununununununununununununun/qwen2.5-coder-7b-instruct-phi-lattice-v2"

loader_path = hf_hub_download(repo_id=repo_id, filename="phi_loader.py")
spec = importlib.util.spec_from_file_location("phi_loader", loader_path)
phi_loader = importlib.util.module_from_spec(spec)
spec.loader.exec_module(phi_loader)

# "triton_4bit"   fused LUT-GEMM on CUDA
# "low_vram_4bit" PyTorch dequant inside each linear
# "unrolled_bf16" unpacks all 255 tensors into BF16 linears
model = phi_loader.load_qwen25_coder_from_packed_4bit(
    repo_id=repo_id,
    mode="low_vram_4bit",
    device="cuda",
    dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained(repo_id)

mode="triton_4bit" reads phi_lut_gemm.py from the same repo. Every packed layer has K % 64 == 0.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей