/ Модель

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

Лицензия
MIT
Базовая модель
GLM-4.7-Flash
Библиотека
gguf
Опубликована
6 авг 2026

GLM-4.7-Flash-APEX-GGUF

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

Myric/GLM-4.7-Flash-APEX-GGUF — это GGUF-квантизованная версия GLM-4.7-Flash от zai-org, подготовленная в репозитории Myric для запуска через llama.cpp.

683скачиваний за 30 дней2лайкавеса обновлены7 авг 2026

Бенчмарки

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

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

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

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

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

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

Модель предназначена прежде всего для генерации текста, агентного программирования и сценариев, где важны локальный запуск и поддержка спекулятивного декодирования. Доступны варианты APEX-i-quality размером 16,60 ГБ, APEX-i-compact размером 13,27 ГБ и APEX-i-mini размером 10,24 ГБ; все они сохраняют MTP draft head.

Модель использует MoE-архитектуру с 31,2 млрд общих параметров и примерно 3,6 млрд активных на токен: 64 маршрутизируемых эксперта с выбором top-4 и один общий эксперт. Архитектура основана на DeepSeek и использует MLA-внимание, 47 основных слоёв плюс один MTP-слой, а также контекст до 202 752 токенов. Квантизация выполнена из bf16-чекпойнта с использованием imatrix и смешанной точности: наиболее важные компоненты сохраняются на уровне около 6,4–6,9 бит на вес, а основная компрессия приходится на маршрутизируемые эксперты.

В агентном бенчмарке программирования варианты i-quality и i-compact набрали по 53 из 59 тестов, тогда как i-mini — 38 из 59; это показывает, что младшая версия заметно слабее на длинных композиционных задачах. i-quality обеспечивает лучший баланс качества и размера, а i-compact почти не уступает ему на измеренном сценарии. Для загрузки требуется llama.cpp версии b10251 или новее с поддержкой GLM-4.7-Flash MTP; старые версии могут не распознать число тензоров. Лицензия модели — MIT.

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

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

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

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

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

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

Открыть на Hugging Face

GLM-4.7-Flash — APEX GGUF

[!IMPORTANT] Requires llama.cpp b10251 or newer. These files keep the MTP (nextn) draft head, which older builds do not know how to create, so they refuse to load the file:

error loading model: done_getting_tensors: wrong number of tensors; expected 868, got 862

That is a loader version problem, not a corrupt download — the file has all 868 tensors, but a pre-b10251 build only asks for 862 because it has no GLM-4.7-Flash MTP support (#24868, commit 57c0921). Update llama.cpp and it loads. Open an issue here if you need an MTP-stripped build for an older runtime.

MoE-aware, mixed-precision APEX quantization of zai-org/GLM-4.7-Flash — 31.2B total / ~3.6B active, and the most-downloaded model in the GLM family by a wide margin.

Three tiers, all built from the bf16 checkpoint (no intermediate requantization), all imatrix-guided, all with the MTP draft head preserved and quantized so speculative decoding works out of the box.

Architecture, and why it quantizes well

Despite the GLM name this is a DeepSeek-lineage design — llama.cpp converts it via Glm4MoeLiteModel(DeepseekV2Model) to the deepseek2 GGUF architecture.

layers47 (+1 MTP), first_k_dense_replace=1
hidden2048, moe_intermediate_size 1536
experts64 routed, top-4, + 1 shared, noaux_tc sigmoid routing
attentionMLA — kv_lora_rank 512, qk_nope/rope 192/64, v_head_dim 256
context202,752 (rope_theta 1e6)
MTP1 nextn layer — a full MoE block + draft projections, 1.28B params

Two properties make it an unusually good APEX target:

  • Routed experts are 89% of all parameters (27.8B of 31.2B). Everything whose error compounds on every token — MLA attention, shared experts, embeddings — is only ~2.1B, so all of it stays at ~6.5–6.9 bpw for about 1.8GB while the entire remaining budget goes to experts.
  • moe_intermediate_size is 1536, cleanly divisible by 256, so all three expert matrices (gate/up/down) can use the full k-quant and IQ menu. Models with a non-256 expert dimension cannot: their ffn_down_exps is restricted to block-32/64/128 types.

MLA keeps long context affordable. Instead of caching full K and V per head, it caches one 576-dim latent per token per layer:

KV cache @ 198K ctx, bf16size
MLA (512+64 latent)11 GB
the same model as plain MHA342 GB

Tiers

tierfile sizebits/weightrouted-expert bpwnon-expert bpwwikitext PPLvs bf16
bf16 (reference)62.5 GB16.0016.0016.0012.112—
APEX-i-quality16.60 GB4.254.036.9212.746+5.2%
APEX-i-compact13.27 GB3.403.056.6513.837+14.2%
APEX-i-mini10.24 GB2.622.246.3915.801+30.5%

Allocation is by tensor role and layer band: edge layers keep more bits than the redundant middle, routed experts absorb the compression, and shared experts / MLA projections / embeddings stay high. The MTP draft head is pinned to Q4_K in every tier (see below).

On the PPL column: the imatrix is deliberately code-weighted (~70% multi-language code, 30% prose) and these numbers are measured on wikitext, so they are the pessimistic direction of that domain mismatch. The task benchmark below tracks quality much better — i-quality gives up 5.2% PPL but only 3.6 points of task score.

Agentic coding benchmark

Five hard from-scratch and fix-existing-code challenges driven through a real agentic loop (OpenCode), scored by partial credit over independently re-run pytest — never the agent's own self-report. MTP speculative decoding enabled (n_max=2). One run per tier.

challengebf16i-qualityi-compacti-mini
batch_scheduler10/1010/1010/1010/10
buddy_allocator7/115/115/115/11
circuit_breaker7/77/77/75/7
expr_parser_advanced20/2020/2020/207/20
inventory_fix_and_extend11/1111/1111/1111/11
test cases55/59 (92.7%)53/59 (89.1%)53/59 (89.1%)38/59 (70.4%)
challenges fully passed4/54/54/52/5
wall clock21.3 min8.9 min13.1 min11.5 min

This is a sweep, not a cutoff claim. Three sizes are shipped with their measured degradation so you can pick against your own budget — one model, one workload, one run per tier is not enough to assert a general "quantize no further than X bpw" threshold, and none is asserted here.

Read honestly:

  • i-quality and i-compact are indistinguishable (both 53/59) despite a 24% difference in expert precision and 3.3GB of file size. Between 4.03 and 3.05 bpw the compression is effectively free on this workload.
  • i-mini is genuinely weaker — 70.4%. It holds on the shorter challenges and degrades on the longest, most compositional one (expr_parser_advanced, 20/20 → 7/20). This is the one tier where PPL and task score agree that something real was lost. It is published because a 10.2GB file competes against other ~10GB models, not against the larger tiers here — but that comparison is not benchmarked, so judge it on its own numbers.
  • bf16's 2-test-case lead is a single run on one challenge and is within plausible run-to-run variance for a stochastic agentic loop. Treat it as "bf16 is not clearly better than i-quality" rather than a measured 3.6-point gap.
  • Wall clock mixes decode speed with how long each tier flailed on the hard challenge. The cleanest same-work comparison is expr_parser_advanced, identical 20/20: bf16 404s vs i-quality 157s (2.6×).

MTP speculative decoding

The nextn draft head is preserved and quantized (not stripped). llama-imatrix never exercises it — a plain forward pass reports the whole MTP layer as unused — so it receives no imatrix data, and is pinned to Q4_K rather than an IQ type, which would be fitted against statistics that do not exist for it.

Measured on i-mini:

decode
without MTP78.7 t/s
with MTP (n_max=2)116.2 t/s (+48%)

Draft acceptance across tiers, from the benchmark runs:

tierdrafteracceptanceaccepted / verify step
bf16bf1658.5%—
i-qualityQ4_K65.2%—
i-compactQ4_K59.0%—
i-miniQ4_K64.5%1.29

Acceptance is ~59–65% for every quantized tier, from 4.03 down to 2.24 bpw experts — the speculative speedup survives aggressive quantization intact. Notably the bf16 file, whose draft head is also bf16, posts the lowest acceptance of the four: a low-precision drafter is not a compromise here, which matches independent results on other MoE checkpoints.

Enable it with:

llama-server -m GLM-4.7-Flash-APEX-i-quality.gguf \
  --spec-type draft-mtp --spec-draft-n-max 2 \
  --jinja -ngl 999 --ctx-size 32768

Plain decode speeds without MTP: i-quality 64.2 t/s, i-compact 71.4 t/s, i-mini 78.7 t/s.

Usage

# chat / agentic serving (add --spec-type draft-mtp for the MTP speedup)
llama-server -m GLM-4.7-Flash-APEX-i-quality.gguf --jinja -ngl 999 --ctx-size 32768

# one-shot
llama-cli -m GLM-4.7-Flash-APEX-i-quality.gguf --jinja -ngl 999 --ctx-size 8192 -st \
  -p "Write a Python LFU cache with O(1) get and put."

This is a reasoning model — it emits thinking before its answer, so allow a generous token budget or responses will be truncated mid-thought. For multi-turn agentic use, ZAI recommends Preserved Thinking mode; llama.cpp exposes --reasoning-preserve.

Requires llama.cpp b10251 or newer (see the note at the top): Glm4MoeLite conversion support plus GLM-4.7-Flash MTP support (upstream #24868).

Reproducing

  • Converted from the bf16 checkpoint with convert_hf_to_gguf.py (no intermediate requantization).
  • imatrix: llama-imatrix, ctx 512, over a ~70% multi-language code / 30% prose corpus, published at Myric/Laguna-S-2.1-imatrix-calibration-study (corpora/laguna_calib_codeweighted.txt). Expert coverage 100% except 9 expert stacks at 98.44% (63 of 64 experts observed).
  • Per-tensor allocation emitted as a --tensor-type-file consumed by stock llama-quantize; no kernel or C++ changes.
  • PPL: llama-perplexity on wikitext-2 test, ctx 512.

Attribution & licenses

Unofficial community quantization; not affiliated with or endorsed by ZAI.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
ce11887

0 моделей