neroued commited on
Commit
f1c4e21
·
verified ·
1 Parent(s): 74b6d32

docs: sync model card with NInfer master

Browse files
Files changed (2) hide show
  1. README.md +124 -1
  2. artifact-manifest.json +59 -0
README.md CHANGED
@@ -1,3 +1,126 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: ninfer
3
+ pipeline_tag: image-text-to-text
4
+ inference: false
5
+ license: mit
6
+ base_model:
7
+ - zai-org/GLM-5.3-Flash
8
+ - nvidia/GLM-5.3-Flash-NVFP4
9
+ base_model_relation: quantized
10
+ tags:
11
+ - ninfer
12
+ - glm5next
13
+ - nvfp4
14
+ - q8
15
+ - mtp
16
+ - blackwell
17
+ - dgx-spark
18
+ - multimodal
19
+ - conversational
20
+ - cuda
21
  ---
22
+
23
+ # GLM-5.3-Flash for NInfer
24
+
25
+ A mixed-precision NInfer v3 artifact of
26
+ [GLM-5.3-Flash](https://huggingface.co/zai-org/GLM-5.3-Flash), converted from
27
+ [NVIDIA's NVFP4 checkpoint](https://huggingface.co/nvidia/GLM-5.3-Flash-NVFP4).
28
+ It includes Text, Vision, native MTP and an additional full-vocabulary Q4 draft head.
29
+
30
+ The native NInfer architecture is GLM5Next, combining KDA linear attention, Kpool sparse MLA,
31
+ mHC and MoE. The artifact includes the source tokenizer, GLM chat template and processor resources.
32
+ Use it directly with [NInfer](https://github.com/Neroued/ninfer) for CLI generation or
33
+ OpenAI-/Anthropic-compatible serving on **two DGX Sparks**.
34
+
35
+ ## Download
36
+
37
+ ```bash
38
+ hf download neroued/GLM-5.3-Flash-NInfer \
39
+ --include 'glm5_3_flash.ninfer*' \
40
+ --local-dir models/GLM-5.3-Flash-NInfer
41
+ ```
42
+
43
+ The complete artifact is **178.33 GiB** across six files:
44
+
45
+ ```text
46
+ glm5_3_flash.ninfer
47
+ glm5_3_flash.ninfer.part-0001
48
+ glm5_3_flash.ninfer.part-0002
49
+ glm5_3_flash.ninfer.part-0003
50
+ glm5_3_flash.ninfer.part-0004
51
+ glm5_3_flash.ninfer.part-0005
52
+ ```
53
+
54
+ Keep all parts beside the entry file and place the complete set on each node. Pass only
55
+ `glm5_3_flash.ninfer` to NInfer; rank-specific weight slicing happens during loading.
56
+ File sizes and the artifact identity are in [artifact-manifest.json](artifact-manifest.json).
57
+
58
+ ## Representation
59
+
60
+ | Weights | Stored representation |
61
+ |---|---|
62
+ | Main routed experts and first three dense MLP layers | Imported NVIDIA NVFP4, with calibrated scales |
63
+ | KDA Q/K/V/O, MLA output and shared-expert projections | Q8 A16 |
64
+ | MTP routed experts | Block-FP8 converted from source BF16 |
65
+ | Main head, embedding, mHC, Vision and other retained parameters | BF16; source FP32 KDA/control fields remain FP32 |
66
+ | Optimized MTP head | Additional full-vocabulary Q4 A16; Main head stays BF16 |
67
+
68
+ The [`glm5next` recipe](https://github.com/Neroued/ninfer/blob/master/tools/convert/official_recipes.py)
69
+ retains imported Main NVFP4 codes/scales and performs the additional quantization above.
70
+ The optimized draft head does not crop the vocabulary.
71
+
72
+ ## Run on two Sparks
73
+
74
+ Build the current NInfer revision on both nodes with NCCL development dependencies installed:
75
+
76
+ ```bash
77
+ cmake --preset dgx-spark-release -DNINFER_ENABLE_DISTRIBUTED=ON
78
+ cmake --build build/dgx-spark-release -j
79
+ ```
80
+
81
+ Full dependency and checkout instructions are in the [build guide](https://github.com/Neroued/ninfer#build).
82
+ From the repository root, prepare the deployment config:
83
+
84
+ ```bash
85
+ cp examples/configs/spark2-glm5_3-flash.toml ninfer.local.toml
86
+ # Edit coordinator/worker artifact paths, worker executable paths and network addresses.
87
+ ./build/dgx-spark-release/apps/ninfer-serve --config ninfer.local.toml
88
+ ```
89
+
90
+ The [example](https://github.com/Neroued/ninfer/blob/master/examples/configs/spark2-glm5_3-flash.toml)
91
+ uses TP2 with attention DP2, FP8 KV, Vision, MTP3, the optimized head, CUDA Graph decode and up to
92
+ eight active requests. Its logical context limit is **1,048,576 tokens**. The coordinator launches
93
+ both workers, using SSH for the remote node. Clients connect to its single HTTP endpoint.
94
+
95
+ Experts use TP by default (`ep = 1`); set `ep = 2` to select whole-expert EP while retaining TP2
96
+ and attention DP2 elsewhere. Keep all six artifact files on each node. The complete artifact does
97
+ not fit on one Spark. Runtime allocations also include workspace and the shared KV/State pool;
98
+ read the startup capacity estimate for the selected configuration.
99
+
100
+ For CLI use, run `apps/ninfer --config ninfer.local.toml --prompt "..." --max-tokens 2048` on the
101
+ coordinator. Detailed startup and network instructions are in the
102
+ [deployment guide](https://github.com/Neroued/ninfer/tree/master/examples/configs).
103
+
104
+ ## Model options
105
+
106
+ - Thinking stays enabled. Supported reasoning efforts are `low`, `high` and `max`; the template
107
+ supplies the default. `--no-thinking` and effort `none` are unsupported.
108
+ - Native MTP supports 1..5 drafts. `--proposal-head optimized` selects the Q4 draft head;
109
+ the target head stays BF16. Draft count can be adjusted for workload and concurrency.
110
+ - Latent KV uses `--kv-dtype bf16` or `fp8`. The Kpool indexer uses FP8 by default;
111
+ `NINFER_KPOOL_INDEXER_BF16=1` selects BF16 indexer storage independently.
112
+ - Vision, tool calls, constrained output, streaming and prefix reuse use the same public Engine
113
+ and protocol endpoints as text generation. Enable Vision at startup for image/video input.
114
+ - GLM uses its own chat template and tool framing; retain the included GLM frontend resources.
115
+
116
+ DFlash and DFlash2 are not used by this architecture. NInfer returns generated tool calls to the
117
+ client; it does not execute them.
118
+
119
+ ## Sources and license
120
+
121
+ The primary conversion source is
122
+ [nvidia/GLM-5.3-Flash-NVFP4](https://huggingface.co/nvidia/GLM-5.3-Flash-NVFP4), revision
123
+ `da920bb0b9f4a06727223a349e55468e38352348`, based on
124
+ [zai-org/GLM-5.3-Flash](https://huggingface.co/zai-org/GLM-5.3-Flash).
125
+ The model weights use the upstream [MIT license](https://huggingface.co/zai-org/GLM-5.3-Flash/blob/main/LICENSE).
126
+ [NInfer](https://github.com/Neroued/ninfer) is Apache-2.0-licensed software.
artifact-manifest.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact": {
3
+ "entry": "glm5_3_flash.ninfer",
4
+ "container_version": 3,
5
+ "artifact_id": "7f4725ce4f784697a7fe0d57a81e5de2",
6
+ "name": "glm5.3-flash",
7
+ "architecture": "Glm5NextForCausalLM",
8
+ "components": [
9
+ "text",
10
+ "vision",
11
+ "mtp"
12
+ ],
13
+ "total_file_bytes": 191484328832,
14
+ "payload_bytes": 191481699200,
15
+ "files": [
16
+ {
17
+ "name": "glm5_3_flash.ninfer",
18
+ "bytes": 32000000000
19
+ },
20
+ {
21
+ "name": "glm5_3_flash.ninfer.part-0001",
22
+ "bytes": 32000000000
23
+ },
24
+ {
25
+ "name": "glm5_3_flash.ninfer.part-0002",
26
+ "bytes": 32000000000
27
+ },
28
+ {
29
+ "name": "glm5_3_flash.ninfer.part-0003",
30
+ "bytes": 32000000000
31
+ },
32
+ {
33
+ "name": "glm5_3_flash.ninfer.part-0004",
34
+ "bytes": 32000000000
35
+ },
36
+ {
37
+ "name": "glm5_3_flash.ninfer.part-0005",
38
+ "bytes": 31484328832
39
+ }
40
+ ]
41
+ },
42
+ "recipe": "glm5next",
43
+ "sources": [
44
+ {
45
+ "repo_id": "nvidia/GLM-5.3-Flash-NVFP4",
46
+ "revision": "da920bb0b9f4a06727223a349e55468e38352348",
47
+ "role": "Primary checkpoint and frontend resources"
48
+ }
49
+ ],
50
+ "object_counts_by_format": {
51
+ "q4_g64_fp16": 1,
52
+ "q8_g32_fp16": 166,
53
+ "bf16": 954,
54
+ "nvfp4": 90,
55
+ "fp32": 145,
56
+ "fp8_e4m3fn_block128x128_bf16": 2
57
+ },
58
+ "optimized_proposal_domain": "full"
59
+ }