GLM-5.3-Flash-34B-A17B

N7 recovery LoRA for the experimental 0.1.0 text model

Text-only MoE ยท 24 of 288 experts ยท Q5_K_M base ยท GGUF adapters ยท MIT

Install N7 ยท N5 ยท N5 โ†’ N7 ยท Cumulative N7 ยท Base model ยท SHA-256 ยท License


N7 repeats itself less, but accuracy remains low. On the same 50 tasks, responses with loops fell from 30 to 7. Only one N7 response passed the strict check. Manual review found at least five correct solutions when format errors were allowed.

What changed in N7

N7 is the third and final checkpoint of round 7. Training continued from N5 on logic, mathematics, Python, Russian and English. Round 6 was a separate experiment. This update ships as small GGUF adapters. If you already have the 23.36 GiB base from this repository, reuse it.

Results on the same 50 tasks

Each run used ten tasks per subject, direct answers, greedy decoding and a 512-token output limit. The strict grader checked final answers or tested a single Python expression. All strictly correct answers also finished normally. Loops and token-limit hits can overlap.

Model and grading method Correct out of 50 Responses with loops Hit the token limit Empty responses
0.1.0, before recovery training ยท strict 0/50 (0%) 30 30 0
Round 5 ยท strict 1/50 (2%) 9 10 2
N7, phase 3 ยท strict 1/50 (2%) 7 9 0
N7, phase 3 ยท manual review of the same responses At least 5/50 (โ‰ฅ10%) 7 9 0

Compared with 0.1.0, N7 produced 23 fewer responses with loops and 21 fewer that reached the limit. Compared with round 5, it produced two fewer loops and eliminated both empty responses. Strict accuracy stayed at 1/50.

What the manual review counted

Subject Strict passes Correct solutions identified Evidence
Logic 0/10 2/10 The model named the middle book, ยซัะฟั€ะฐะฒะพั‡ะฝะธะบยป, with extra words. It also answered โ€œOn Tuesdayโ€ where the grader expected โ€œTuesdayโ€.
Python 0/10 2/10 Both answers wrapped the requested expression in a function. The returned expressions passed 5/5 tests for cyclic indexing and 4/4 for reversing a list.
English 1/10 1/10 The model chose affect.
Mathematics 0/10 0/10 No correct numerical solution was found.
Russian 0/10 0/10 No additional correct answer was identified.

The five include the strict pass and four answers that missed the requested format. Some were already correct in earlier runs. The manual count is a lower bound from reviewing the same outputs. The strict rows provide the like-for-like comparison.

I selected N7 manually. It fell short of the automatic threshold of five strict passes, so the extra 25-task check was skipped. For the 50-task comparison, I ran 0.1.0 on its own and then with each adapter separately. After merging N7, I repeated the five examples above and reproduced their answers, including the format errors. A full evaluation of the merged GGUF is still pending.

At a glance

Property Value
Release author biscet
Release 0.1.0 base with optional N5 and N7 adapters
Base model Z.ai GLM-5.3-Flash, text backbone
GGUF architecture glm5-next
Parameters in the file 34.24 billion
Active parameters About 17.33 billion with top-8 routing, including non-routed weights
Routed experts 24 per MoE layer, with 8 selected per token
Already merged into the base Shared AZ ฮฑ=1, Geo3K c=1, RCO c=1
Recovery training Rank-8 LoRA on output.weight, alpha 8, scale 1
Base file Q5_K_M GGUF, 25,081,554,496 bytes (23.36 GiB)

REAP configuration

I used the published expert saliency statistics for the full GLM-5.3-Flash FP8 model. I kept 24 of the 288 routed experts in each of the 42 MoE layers. The router selects 8 experts per token in each layer. The expert map lists their original IDs in the exact slot order used by this GGUF. Expert map ยท Published expert statistics

Downloads

The root GGUF contains the 0.1.0 weights, tokenizer and default chat template. Choose one N7 installation method below.

File Description
GLM-5.3-Flash-34B-A17B-Q5_K_M.gguf Required 0.1.0 base, 23.36 GiB
N5.gguf Cumulative checkpoint through round 5, 2.54 MB
N5-to-N7.gguf Increment from N5 to N7, 5.09 MB. Use with N5.
GLM-5.3-Flash-Recovery-LoRA.gguf Cumulative N7 checkpoint, 2.54 MB. Use alone on the base.
merge_n7.py Optional CPU tool for creating one standalone N7 GGUF locally
recipe/experts.json Original expert IDs for each of the 42 pruned text layers
recipe/merge.json Donor revisions, coefficients and checksums for the 0.1.0 base
templates/chat-direct.jinja Optional chat template used for the reported evaluation
SHA256SUMS SHA-256 checksums of the base and the three adapters
LICENSE MIT license and the original Z.ai copyright notice

Earlier evaluation of 0.1.0 on 45 prompts

This experiment compared donor weight transfers before recovery training. It used different questions and grading rules from the 50-task N7 evaluation.

Each configuration generated one deterministic response for each of 45 text prompts. Of those, 44 were graded automatically. The set covered mathematics, Python, Russian-language instructions, and general tasks. The context was 8,192 tokens, with a generation limit of 512 tokens, temperature=0, and seed=42. Thinking mode, prompt caching, speculative decoding, and repetition penalties were disabled.

Configuration Correct, finished responses Responses with loops Responses that hit the token limit
Shared AZ + Geo3K 8/44 23/45 23/45
Requantization control using the same tensors 6/44 23/45 24/45
Shared AZ + Geo3K + RCO 0.25 7/44 24/45 27/45
Shared AZ + Geo3K + RCO 1.0 8/44 20/45 21/45

The original AZ+Geo3K and final RCO 1.0 configurations both scored 0/14 on the Russian-language subset. Python answers were checked by running tests. Loops and token-limit hits were counted separately. These results cover a small set of tasks in direct-answer mode.

Install N7

Choose one method. Both start with this repository's original 0.1.0 GGUF. The local merge uses N5 and the N5 โ†’ N7 increment together. The single-adapter method uses cumulative N7 on its own. Adding N5 to cumulative N7 would apply the N5 update twice.

Start with the base

Use a llama-server build with glm5-next support and the Hugging Face CLI (hf). Run the following commands in the same shell. Set BASE to the location of your existing GGUF if needed. llama.cpp build instructions ยท Hugging Face CLI

REPO=biscet/GLM-5.3-Flash-34B-A17B
BASE=GLM-5.3-Flash-34B-A17B-Q5_K_M.gguf

Skip this download if you already have the base. Its SHA-256 is f01ca8d6ceb10d3a0858fc0ffb13151f677c0855002189f3b87e89206dc915d3.

hf download "$REPO" GLM-5.3-Flash-34B-A17B-Q5_K_M.gguf \
  --revision 40e301612816ae07d9fda5210261c8794ac4d5ea --local-dir .

Method 1 ยท Merge N5 and the N5 โ†’ N7 increment locally

Download both adapters (7.63 MB total) and the merge script. Use Python 3.10 or later and allow 24.06 GiB of additional disk space on a filesystem that supports hard links. The script checks the input hashes, combines both updates and rounds the output projection to F16 once. The resulting GGUF runs on its own.

hf download "$REPO" adapters/N5/N5.gguf adapters/N7/N5-to-N7.gguf \
  adapters/N7/merge_n7.py --local-dir .
python3 -m venv .venv-n7
. .venv-n7/bin/activate
python -m pip install numpy gguf
python adapters/N7/merge_n7.py --base "$BASE" \
  --n5 adapters/N5/N5.gguf --delta adapters/N7/N5-to-N7.gguf \
  --out GLM-5.3-Flash-34B-A17B-N7.gguf
llama-server -m GLM-5.3-Flash-34B-A17B-N7.gguf -c 8192 -ngl 99 --jinja

The incremental file represents ฮ”N7 โˆ’ ฮ”N5 at scale 1. Its rank is 16 because it stores two rank-8 terms. The script checks that the N5 terms cancel exactly before it computes the merged weights. Using --digest-only in place of --out FILE checks the result without writing a copy. The standalone file retains the base model's descriptive metadata. Its filename and SHA-256 distinguish it from the base.

Method 2 ยท Load cumulative N7 at runtime

This method downloads only 2.54 MB and needs no second copy of the base. Use a build that applies LoRA to the main glm5-next output projection. Check for build_lora_mm(model.output, cur) in the main decoder. A build using plain ggml_mul_mat there can load the adapter yet silently skip its effect. Use the local merge above if your build lacks this support. Example of a compatible output projection

hf download "$REPO" adapters/N7/GLM-5.3-Flash-Recovery-LoRA.gguf --local-dir .
llama-server -m "$BASE" --lora adapters/N7/GLM-5.3-Flash-Recovery-LoRA.gguf \
  -c 8192 -ngl 99 --jinja

If you already have the cumulative file and want a standalone GGUF, use the same merge script with --adapter adapters/N7/GLM-5.3-Flash-Recovery-LoRA.gguf in place of --n5 and --delta. Both input combinations produce the same merged weights.

Check the installation

Lower -ngl if the model exceeds available VRAM. To reproduce the direct-answer setup, download templates/chat-direct.jinja and add --chat-template-file templates/chat-direct.jinja --reasoning-effort low --chat-template-kwargs '{"clear_thinking":true}' to the server command.

Try the following prompt at temperature 0.

Choose 'affect' or 'effect' for this gap. Give just the word: The extra insulation could ___ the hall's acoustics.

The base chose effect. Cumulative N7 and the locally merged model both returned affect. Exact text can vary across builds. To verify the local merge, compare the output SHA-256 with c679e88fd7784a40f0e4a97c3966d51bece0a201d8a7b6e7da4f8a069a37f417.

Runtime and tooling changes for GLM-5.3-Flash

The glm5-next implementation in llama.cpp supports hybrid KDA and KPool-DSA attention, manifold-constrained hyper-connections (mHC), and MoE. I tested this GGUF with a ThunderLLM build based on llama.cpp that includes the changes below. GLM5-Next implementation in llama.cpp

llama.cpp and CUDA

  • KPool-DSA indexer. Indices for newly formed key pools are stored as a two-dimensional tensor, [kpool, n_new], and flattened before the cache read. This fixes a tensor-shape assertion that caused request processing to fail.
  • Top-8 normalization. GLM5-Next uses sum(weights) + 1e-20 as the denominator, with the original routing scale of 2.5. The previous implementation clamped the sum to a minimum of 6.1035e-5. All six CUDA checks for expert selection and weights passed.
  • CUDA for Volta. The test build includes sm70 specializations for Flash Attention with a head dimension of 256 and for the chunked gated-delta computation used by KDA. The build targets sm70 and sm86. Separate operator checks on Volta passed 29/29 KDA cases and 5/5 Q5 MUL_MAT_ID cases.

Conversion, chat template, and API

  • FP8 assembly. The assembly scripts select byte ranges from the original weights and preserve the correspondence between expert matrices, FP8 scales, router rows, and correction biases. For the LoRA transfer, the MLA projection kv_b_proj was mapped to separate K and V tensors in GGUF, with K transposed as required by the converter.
  • Chat history. The test used a separate Jinja template with clear_thinking=true. It keeps final answers in the conversation history and strips hidden reasoning from previous turns, including reasoning embedded in the text of an answer. The template also includes experimental medium and xhigh presets that add instructions to the native low and high modes, respectively. The benchmark reported here used direct-answer mode. Official GLM guidance on reasoning and chat history
  • LibreChat. The local interface uses a dedicated OpenAI-compatible endpoint. Its profile sends enable_thinking=false, removes client-side reasoning overrides, and omits reasoning_content from subsequent turns. The 45-task benchmark ran directly through the llama.cpp API. Custom endpoints in LibreChat

Separate experiments

  • MTP and DFlash. Separate drafts were tested with an earlier Q5 build. The DFlash experiment added capture of the contracted mHC state at the input of selected layers. Some short runs diverged from regular generation. The benchmark for this release used --spec-type none.
  • n-gram and state rollback. External tables were built from corpora ranging from 10 million to 1 billion tokens. In the experimental profile, draft length was configurable and rollback after token rejection used recurrent state on the GPU. Results varied with the prompt and context length.
  • JSON in ordinary chat. A separate server build tested automatic use of a grammar when the prompt explicitly asked for a JSON object. Five targeted checks passed, covering prompts in two languages and a request that supplied a JSON Schema.
  • Vision. An F16 projector was converted separately from the original weights. This GGUF and the benchmark in this card cover text generation.

How the model was built

The first three stages produced release 0.1.0 and retained the original GGUF tensor types. N7 changes only the output projection. The other 1,382 tensors are byte-identical to 0.1.0. Merge recipe

  1. Shared AZ. I replaced the gate, up, and down projections of the shared expert in each MoE layer at ฮฑ=1. This used 126 full BF16 matrices. The pruned model kept its own top-8 routing. GLM-5.3-Flash-AZ, pinned revision

  2. Geo3K. I selected 3,595 LoRA A/B pairs covering attention, dense layers, routers, shared experts, and the retained routed experts. Each routed expert kept its original identity, and each router used only the 24 corresponding rows of its B matrix. The merge used rank 16, alpha 32, and c=1. Of 708 target GGUF tensors, 675 changed. The donor names the base model but does not specify the exact training revision. Geo3K RL LoRA, step 20

  3. RCO 1.0. For the selected tensors, I read the matching byte ranges from the donor's before and after Q4_K_M revisions, dequantized them, and subtracted the earlier values from the later ones in FP32. This captures the difference between the two quantized releases. I added it to the AZ+Geo3K build with a coefficient of 1.0. After requantization, 202 attention tensors and 126 shared-expert tensors had changed. RCO-152E before the merge ยท RCO-152E after the merge

  4. N7 recovery training. Starting from round 5, I trained a rank-8 LoRA with alpha 8 on output.weight for three two-hour phases. Round 7 used a fresh Adam optimizer at a learning rate of 0.00005. Each update drew one example per subject from 9,246 training records. The loss covered up to 96 token positions per answer, including the end token. Round 7 added 5,947 updates, bringing the selected checkpoint to 7,817. I dequantized the original Q6_K output projection, added the cumulative update once in FP32 and stored the result in F16.

Next steps

  1. Compare next-token scores from the trainer, the server with a separate adapter and the merged GGUF on identical token sequences. Repeat the full 50-task evaluation on the merged file.
  2. Run a small controlled experiment on 100 verified examples. Compare an output-only adapter with LoRA in the attention layers of the final blocks. Measure both recall of training examples and performance on unseen variants, especially in mathematics and Russian.
  3. Evaluate the leading checkpoint on fresh tasks. Track strict passes, correct solutions with format errors, loops and unfinished answers separately. Use new results to decide whether to extend training or revisit expert selection.

Sources and license

The weights are distributed under the MIT license. Z.ai released the original model. The selected donor weights come from azampatti (Shared AZ), HollowMan6 (Geo3K), and lapadatbogdan (RCO). Shared AZ is based on Intel's W4A16 AutoRound conversion. Z.ai GLM-5.3-Flash, pinned revision ยท Intel W4A16 AutoRound, pinned revision ยท LICENSE

Remaining problems

N7 can copy the question or a format hint instead of solving the problem. It still loops, mixes languages in Russian replies and adds unwanted text or function wrappers. Mathematics and Russian each scored 0/10. The fine-tuning updated only the output layer. The contribution of expert pruning to these failures remains unmeasured.

Downloads last month
463
GGUF
Model size
34B params
Architecture
glm5-next
Hardware compatibility
Log In to add your hardware

5-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for biscet/GLM-5.3-Flash-34B-A17B

Collection including biscet/GLM-5.3-Flash-34B-A17B