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
Document measured Q4TP CPU and 16 GB policy
Browse files
README.md
CHANGED
|
@@ -23,9 +23,10 @@ language:
|
|
| 23 |
This repository contains the **text tower** of
|
| 24 |
[zai-org/GLM-5.3-Flash](https://huggingface.co/zai-org/GLM-5.3-Flash),
|
| 25 |
converted directly from the official FP8 checkpoint to one memory-mapped CMF
|
| 26 |
-
file. The same artifact
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
The upstream model is a 320B/18B-active native multimodal MoE. This release is
|
| 31 |
text-generation only: it intentionally omits the vision tower and the optional
|
|
@@ -94,29 +95,54 @@ marker. `cortiq verify` independently checks every payload hash.
|
|
| 94 |
## Models larger than VRAM
|
| 95 |
|
| 96 |
The 155.68 GiB file does not need to fit in VRAM. CMF keeps weights mmap-backed
|
| 97 |
-
in host memory
|
| 98 |
-
experts
|
| 99 |
-
cache misses are completed exactly on CPU and accumulated
|
| 100 |
-
|
|
|
|
| 101 |
|
| 102 |
Useful controls:
|
| 103 |
|
| 104 |
```bash
|
| 105 |
cortiq gpu
|
| 106 |
CMF_GPU=0 cortiq run glm-5.3-flash-q4tp.cmf --prompt "CPU check" --no-think
|
| 107 |
-
CMF_GPU_VRAM_MB=
|
| 108 |
-
|
|
|
|
| 109 |
CMF_GPU_ADAPTER=0 cortiq run glm-5.3-flash-q4tp.cmf \
|
| 110 |
--prompt "select adapter 0" --no-think
|
| 111 |
-
CMF_GLM_DYNAMIC_MOE=
|
| 112 |
-
--prompt "force
|
| 113 |
```
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
## Scope and license
|
| 122 |
|
|
@@ -125,4 +151,3 @@ This CMF is a redistribution/quantization of the official
|
|
| 125 |
The upstream model card is MIT-licensed. Refer to the upstream repository for
|
| 126 |
model limitations, intended use, citation, and the authoritative training and
|
| 127 |
benchmark description.
|
| 128 |
-
|
|
|
|
| 23 |
This repository contains the **text tower** of
|
| 24 |
[zai-org/GLM-5.3-Flash](https://huggingface.co/zai-org/GLM-5.3-Flash),
|
| 25 |
converted directly from the official FP8 checkpoint to one memory-mapped CMF
|
| 26 |
+
file. The same artifact is mmap-backed for CPU and Cortiq's portable GPU
|
| 27 |
+
backends; inference does not require Python, PyTorch, a CUDA toolkit, or
|
| 28 |
+
full-model GPU residency. This release was validated on CPU and Vulkan;
|
| 29 |
+
Metal validation is still pending.
|
| 30 |
|
| 31 |
The upstream model is a 320B/18B-active native multimodal MoE. This release is
|
| 32 |
text-generation only: it intentionally omits the vision tower and the optional
|
|
|
|
| 95 |
## Models larger than VRAM
|
| 96 |
|
| 97 |
The 155.68 GiB file does not need to fit in VRAM. CMF keeps weights mmap-backed
|
| 98 |
+
in host memory and detects the available adapter budget. When dynamic pooling
|
| 99 |
+
is enabled, routed experts use a bounded global GPU pool: resident experts run
|
| 100 |
+
on the GPU, while cache misses are completed exactly on CPU and accumulated
|
| 101 |
+
into the same MoE result. Q4TP automatic mode and systems without a supported
|
| 102 |
+
adapter use the same file on CPU.
|
| 103 |
|
| 104 |
Useful controls:
|
| 105 |
|
| 106 |
```bash
|
| 107 |
cortiq gpu
|
| 108 |
CMF_GPU=0 cortiq run glm-5.3-flash-q4tp.cmf --prompt "CPU check" --no-think
|
| 109 |
+
CMF_GPU_VRAM_MB=16000 CMF_GLM_DYNAMIC_MOE=1 \
|
| 110 |
+
cortiq run glm-5.3-flash-q4tp.cmf \
|
| 111 |
+
--prompt "bounded forced GPU pool" --no-think
|
| 112 |
CMF_GPU_ADAPTER=0 cortiq run glm-5.3-flash-q4tp.cmf \
|
| 113 |
--prompt "select adapter 0" --no-think
|
| 114 |
+
CMF_GLM_DYNAMIC_MOE=0 cortiq run glm-5.3-flash-q4tp.cmf \
|
| 115 |
+
--prompt "force exact CPU MoE" --no-think
|
| 116 |
```
|
| 117 |
|
| 118 |
+
For this **Q4TP** artifact, automatic mode deliberately keeps the MoE on exact
|
| 119 |
+
CPU. On the measured host, forcing Q4TP expert pooling was substantially slower
|
| 120 |
+
than CPU execution. Automatic dynamic pooling is therefore reserved for Q2TP
|
| 121 |
+
gate/up tensors on supported Vulkan devices with at least a 14 GB detected
|
| 122 |
+
budget. Explicit `CMF_GLM_DYNAMIC_MOE=1` remains available for bounded-memory
|
| 123 |
+
compatibility testing; `CMF_GLM_DYNAMIC_MOE=0` always disables it.
|
| 124 |
+
|
| 125 |
+
Measured on an RTX 3090 with dual AMD EPYC 7H12 CPUs and 32 CPU worker threads:
|
| 126 |
+
|
| 127 |
+
| execution path | steady decode | notes |
|
| 128 |
+
|---|---:|---|
|
| 129 |
+
| Q4TP CPU, final run A | 1.912 tok/s | exact path, zero GPU submissions |
|
| 130 |
+
| Q4TP CPU, final run B | 2.350 tok/s | exact path, zero GPU submissions |
|
| 131 |
+
| Q4TP CPU, final run C | 2.207 tok/s | exact path, zero GPU submissions |
|
| 132 |
+
| Q4TP CPU, three-run mean | **2.156 tok/s** | 1.26% below the earlier 2.184 tok/s baseline |
|
| 133 |
+
| Q4TP forced dynamic Vulkan | **0.634 tok/s** | 40-token run, 42 submissions/token, 13.9 GB pool |
|
| 134 |
+
|
| 135 |
+
The CPU result varies with NUMA placement; the three-run spread is reported
|
| 136 |
+
instead of presenting one noisy maximum. Forced Vulkan was about 3.4× slower,
|
| 137 |
+
which is why it is not the Q4TP default.
|
| 138 |
+
|
| 139 |
+
A bounded compatibility run with
|
| 140 |
+
`CMF_GPU_VRAM_MB=16000 CMF_GLM_DYNAMIC_MOE=1` completed successfully, emitted
|
| 141 |
+
`Hello`, and used a 9.9 GB/792-slot expert pool. Process VRAM samples peaked at
|
| 142 |
+
10,260 MiB on the 24 GB test card. This proves that the dynamic pool respects a
|
| 143 |
+
16,000 MB budget; the one-token run is not a throughput claim. CPU-only systems
|
| 144 |
+
and smaller adapters remain valid through the exact CPU fallback. Metal will be
|
| 145 |
+
tested from this same immutable artifact.
|
| 146 |
|
| 147 |
## Scope and license
|
| 148 |
|
|
|
|
| 151 |
The upstream model card is MIT-licensed. Refer to the upstream repository for
|
| 152 |
model limitations, intended use, citation, and the authoritative training and
|
| 153 |
benchmark description.
|
|
|