infosave commited on
Commit
ea719eb
·
verified ·
1 Parent(s): 4cbf776

Document measured Q4TP CPU and 16 GB policy

Browse files
Files changed (1) hide show
  1. README.md +42 -17
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 runs on CPU and on Cortiq's portable GPU backends
27
- (Vulkan for NVIDIA/AMD/Intel, DX12, and Metal); inference does not require
28
- Python, PyTorch, a CUDA toolkit, or full-model GPU residency.
 
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, detects the available adapter budget, and manages routed
98
- experts through a bounded global GPU pool. Resident experts run on the GPU;
99
- cache misses are completed exactly on CPU and accumulated into the same MoE
100
- result. Systems without a supported adapter use the same file on CPU.
 
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=13500 cortiq run glm-5.3-flash-q4tp.cmf \
108
- --prompt "bounded GPU memory" --no-think
 
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=1 cortiq run glm-5.3-flash-q4tp.cmf \
112
- --prompt "force dynamic expert pool" --no-think
113
  ```
114
 
115
- The automatic dynamic-MoE policy enables on supported Vulkan devices with at
116
- least a 14 GB detected budget. Smaller cards and CPU-only machines remain
117
- valid targets through the exact fallback. RTX 3090 dynamic-pool and constrained
118
- 16 GB measurements are still in progress and will be added without inventing
119
- unmeasured throughput. Metal validation will use this same uploaded artifact.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.