Downloads · 30 days
15
1% of all-time downloads
icecubetr/GLM-5.2-504B-Code-GGUF
GLM-5.2-504B-Code-GGUF is a text generation model from icecubetr. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as mit.
This is a quantized version of the GLM-5.2-REAP-504B-GGUF model. The model has been converted from BF16 to GGUF format with importance matrix optimization.
Downloads · 30 days
15
1% of all-time downloads
All-time downloads
1.6K
Public
Repo size
144 GB
Likes
1
Public
Click a slice to open those files.
.gguf753 MB · 100%
From the Hugging Face model README
This is a quantized version of the GLM-5.2-REAP-504B-GGUF model. The model has been converted from BF16 to GGUF format with importance matrix optimization.
| file | bits | size | notes |
|---|---|---|---|
GLM-5.2-504B-Code-IQ2_XXS.gguf | 2.29 | ~140 GB | smallest |
| file | notes |
|---|---|
GLM-5.2-REAP-504B-imatrix.gguf | imatrix file created with code.txt dataset, saved after 80/146 chunks of calibration data |
llama-quant.cpp | modified llama.cpp file for leaving indexer tensors unquantized |
llama-cli -m GLM-5.2-504B-Code-IQ2_XXS.gguf -p "Hello"
llama-server -m GLM-5.2-504B-Code-IQ2_XXS.gguf --host 0.0.0.0 --port 8080
Anti-loop (recommended):
min_p=0.05, repetition_penalty=1.05min_p=0.05, repetition_penalty=1.10Start at 1.05; go to 1.10 if you see loops — a higher repetition penalty trades a little risk of
over-penalizing legitimate repetition (e.g. in code) for near-zero looping.
Conciseness: a brevity system prompt — "Be concise. Think only as much as the task needs, then answer and stop." — halves median length (1267 → 507 tokens). Note it does not reduce looping (that's the sampler's job); combine the two for short, low-loop output.
This model has been quantized using llama.cpp's llama-quantize tool with importance matrix (--imatrix) for optimal quantization. The quantization target was IQ2_XXS (2-bit quantization).
| Metric | Value |
|---|---|
| Original Model Size (BF16) | 956,419.32 MiB (16.00 BPW) |
| Quantized Model Size | 136,813.06 MiB (2.29 BPW) |
| Compression Ratio | ~7:1 |
| Total Tensors | 1809 |
| Tensors with Fallback | 79 |
| Tensor Pattern | Quantization Method | Original Format | Notes |
|---|---|---|---|
*attn_k_b.weight | iq4_nl | bf16 | Fallback from IQ2_XXS (ncols=192 not divisible by 256) |
*attn_kv_a_mqa.weight | iq2_xxs | bf16 | |
*attn_output.weight | iq2_xxs | bf16 | |
*attn_q_a.weight | iq2_xxs | bf16 | |
*attn_q_b.weight | iq2_xxs | bf16 | |
*attn_v_b.weight | iq2_xxs | bf16 | |
*ffn_down_exps.weight | iq2_xxs | bf16 | |
*ffn_down_shexp.weight | iq2_xxs | bf16 | |
*ffn_gate_exps.weight | iq2_xxs | bf16 | |
*ffn_gate_shexp.weight | iq2_xxs | bf16 | |
*ffn_up_exps.weight | iq2_xxs | bf16 | |
*ffn_up_shexp.weight | iq2_xxs | bf16 | |
blk.0.ffn_down.weight | q2_K | bf16 | Dense layers (blocks 0-2) |
blk.1.ffn_down.weight | q2_K | bf16 | Dense layers (blocks 0-2) |
blk.2.ffn_down.weight | q2_K | bf16 | Dense layers (blocks 0-2) |
output.weight | q5_K | bf16 | Output projection |
token_embd.weight | q2_K | bf16 | Token embeddings |
*_norm.weight and *_norm.bias tensors*_gate_inp.weight tensors (e.g., ffn_gate_inp.weight)exp_probs_b.bias tensorsblk.78.nextn.enorm.weightblk.78.nextn.hnorm.weightblk.78.nextn.shared_head_norm.weightindexer.attn_k.weight tensorsindexer.attn_q_b.weight tensorsindexer.proj.weight tensorsblk.78.attn_kv_a_mqa.weightblk.78.attn_output.weightblk.78.attn_q_a.weightblk.78.attn_q_b.weightblk.78.attn_v_b.weightblk.78.ffn_down_exps.weightblk.78.ffn_down_shexp.weightblk.78.ffn_gate_exps.weightblk.78.ffn_gate_shexp.weightblk.78.ffn_up_exps.weightblk.78.ffn_up_shexp.weightblk.78.nextn.eh_proj.weight| Method | Bits | Description |
|---|---|---|
| IQ2_XXS | ~2 | Extremely low-bit quantization with importance matrix optimization |
| IQ4_NL | ~4 | Non-linear 4-bit quantization with higher quality |
| Q2_K | ~2 | K-quant 2-bit quantization for dense layers |
| Q5_K | ~5 | K-quant 5-bit quantization (used for output layer) |
Fallback Quantization: 79 tensors required fallback quantization because:
attn_k_b.weight tensors have ncols=192 (not divisible by 256, required for IQ2_XXS), falling back to IQ4_NLIndexer Tensors: All indexer.* tensors were kept in BF16 format as they are critical for the model's routing/indexing mechanism and no importance data was available.
Final Layer: blk.78 (the final transformer block) was largely left unquantized to preserve output quality, as importance data was missing for these tensors.
Dense Layers: The first three blocks (blk.0 to blk.2) use dense FFN layers instead of MoE, which were quantized with Q2_K.
Importance Matrix: Quantization used an importance matrix from 80 chunks of calibration data, optimizing which tensors receive more bits based on their importance to model performance.