Text Generation
cortiq
English
Chinese
cmf
quantized
q2tp
q4tp
mixed-precision
Mixture of Experts
hybrid-attention
2-bit
4-bit precision
Instructions to use infosave/GLM-5.3-Flash-cmf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- cortiq
How to use infosave/GLM-5.3-Flash-cmf with cortiq:
# one Rust binary, no additional dependencies cargo install cortiq-cli # or a prebuilt binary from github.com/infosave2007/cmf/releases hf download infosave/GLM-5.3-Flash-cmf --include "*.cmf" --local-dir . ls *.cmf # some repos ship more than one quantization
cortiq run FILE.cmf --prompt "What is the capital of France?"
cortiq serve FILE.cmf --port 8080 # OpenAI-compatible server
- Notebooks
- Google Colab
- Kaggle
Refresh GLM Q2TP and Q4TP performance evidence
Browse files
README.md
CHANGED
|
@@ -126,36 +126,50 @@ CMF_GLM_DYNAMIC_MOE=0 cortiq run glm-5.3-flash-q2tp.cmf \
|
|
| 126 |
|
| 127 |
Automatic mode deliberately keeps both profiles on the exact CPU MoE path. On
|
| 128 |
the measured host, bounded Vulkan expert pooling was slower for both Q2TP and
|
| 129 |
-
Q4TP. Explicit `CMF_GLM_DYNAMIC_MOE=1`
|
| 130 |
-
experimentation; `CMF_GLM_DYNAMIC_MOE=0`
|
| 131 |
-
pool is limited to 20–40% of the configured
|
| 132 |
-
explicit `CMF_GLM_EXPERT_SLOTS` value cannot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
Measured on an RTX 3090 with dual AMD EPYC 7H12 CPUs and 32 CPU worker threads:
|
| 135 |
|
| 136 |
| execution path | steady decode | notes |
|
| 137 |
|---|---:|---|
|
| 138 |
-
| Q2TP CPU32,
|
| 139 |
-
| Q2TP
|
| 140 |
-
| Q2TP forced dynamic Vulkan,
|
| 141 |
-
|
|
| 142 |
-
| Q4TP
|
| 143 |
-
| Q4TP
|
| 144 |
-
| Q4TP
|
| 145 |
-
| Q4TP forced dynamic Vulkan |
|
| 146 |
-
|
| 147 |
-
The Q4TP CPU result varies with NUMA placement; the
|
| 148 |
-
instead of presenting one noisy maximum.
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
|
|
|
|
|
|
| 152 |
`CMF_GPU_VRAM_MB=16000 CMF_GLM_DYNAMIC_MOE=1` completed successfully with the
|
| 153 |
-
official-template answer `4`.
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
|
|
|
|
|
|
| 159 |
|
| 160 |
## Scope and license
|
| 161 |
|
|
|
|
| 126 |
|
| 127 |
Automatic mode deliberately keeps both profiles on the exact CPU MoE path. On
|
| 128 |
the measured host, bounded Vulkan expert pooling was slower for both Q2TP and
|
| 129 |
+
Q4TP, so it is not selected automatically. Explicit `CMF_GLM_DYNAMIC_MOE=1`
|
| 130 |
+
remains available for compatibility and experimentation; `CMF_GLM_DYNAMIC_MOE=0`
|
| 131 |
+
always disables it. The GLM-specific pool is limited to 20–40% of the configured
|
| 132 |
+
physical-memory envelope, and an explicit `CMF_GLM_EXPERT_SLOTS` value cannot
|
| 133 |
+
bypass that cap.
|
| 134 |
+
|
| 135 |
+
The final runtime pass also reduces dispatch overhead without changing model
|
| 136 |
+
bytes or arithmetic. Q4TP combines compatible shared-input projection groups
|
| 137 |
+
into one tiled dispatch (only when every member uses Q4TP), while retaining
|
| 138 |
+
independent routed and shared-expert accumulation. Q2TP batches all selected
|
| 139 |
+
expert gate/up rows and the weighted down rows through the existing bounded
|
| 140 |
+
worker path, reusing thread-local scratch. The Q2TP CPU MoE cadence fell from
|
| 141 |
+
about 1,577 serial jobs per token to 527–530; greedy output and the official
|
| 142 |
+
template oracle remained unchanged.
|
| 143 |
|
| 144 |
Measured on an RTX 3090 with dual AMD EPYC 7H12 CPUs and 32 CPU worker threads:
|
| 145 |
|
| 146 |
| execution path | steady decode | notes |
|
| 147 |
|---|---:|---|
|
| 148 |
+
| Q2TP CPU32, explicit CPU | **2.955 tok/s** | 20-token clean run, 4,071 allocations/token, 530 pool dispatches/token, zero GPU submissions |
|
| 149 |
+
| Q2TP automatic (warm CPU32) | **3.063 tok/s** | 20-token clean run, exact CPU path, zero GPU submissions/uploads |
|
| 150 |
+
| Q2TP forced dynamic Vulkan, normal budget | 1.240 tok/s | 752 slots / 6,392 MB pool, 42 submissions/token, 7,564 MiB peak |
|
| 151 |
+
| Q2TP forced dynamic Vulkan, 16,000-MB target | 1.302 tok/s | 512 slots / 4,352 MB pool, 42 submissions/token, 6,563 MiB peak |
|
| 152 |
+
| Q4TP CPU32, final runs A/B | **2.685 / 2.648 tok/s** | mean **2.666 tok/s**, 5,248 allocations/token, zero GPU submissions |
|
| 153 |
+
| Q4TP automatic | same exact CPU path | no dynamic pool, zero GPU submissions/uploads |
|
| 154 |
+
| Q4TP forced dynamic Vulkan, normal budget | 1.278 tok/s | 512 slots / 6,400 MB pool, 42 submissions/token, 6,731 MiB peak |
|
| 155 |
+
| Q4TP forced dynamic Vulkan, 16,000-MB target | 1.430 tok/s | 344 slots / 4,300 MB pool, 42 submissions/token, 6,475 MiB peak |
|
| 156 |
+
|
| 157 |
+
The Q4TP CPU result varies with NUMA placement; the final A/B mean is reported
|
| 158 |
+
instead of presenting one noisy maximum. A warm Q4TP regression run measured
|
| 159 |
+
2.614 tok/s and remained within that accepted spread. Forced Vulkan remains an
|
| 160 |
+
explicit compatibility path: it is slower than exact CPU for both profiles,
|
| 161 |
+
which is why neither profile selects it automatically.
|
| 162 |
+
|
| 163 |
+
For both profiles, bounded compatibility runs with
|
| 164 |
`CMF_GPU_VRAM_MB=16000 CMF_GLM_DYNAMIC_MOE=1` completed successfully with the
|
| 165 |
+
official-template answer `4`. The Q2TP 4,352-MB/512-slot pool peaked at 6,563
|
| 166 |
+
MiB, and the Q4TP 4,300-MB/344-slot pool peaked at 6,475 MiB, both safely below
|
| 167 |
+
the simulated 16,000-MB target. These samples were taken on the physical
|
| 168 |
+
24,576-MiB (24-GB) RTX 3090; the 16,000-MB value is an explicit software
|
| 169 |
+
budget, not the card's capacity. The automatic Q2TP normal-budget run also
|
| 170 |
+
emitted `4`, stayed on exact CPU, and peaked at 331 MiB of VRAM. CPU-only
|
| 171 |
+
systems and smaller adapters remain valid through the same exact fallback.
|
| 172 |
+
Metal will be tested from these immutable artifacts.
|
| 173 |
|
| 174 |
## Scope and license
|
| 175 |
|