cutterdalton-webai commited on
Commit
f486032
·
verified ·
1 Parent(s): 144a3cc

feat: add Q4_0 GGUF for Snapdragon NPU (GenieX)

Browse files

Adds a Q4_0 build quantized from the F16 GGUF with llama-quantize (no imatrix), and documents it in the model card with GenieX usage and context-window guidance.

Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +30 -5
  3. TwIL-LM3-Pro-Q4_0.gguf +3 -0
.gitattributes CHANGED
@@ -44,3 +44,4 @@ TwIL-LM3-Pro-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
44
  TwIL-LM3-Pro-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
45
  TwIL-LM3-Pro-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
46
  TwIL-LM3-Pro-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
 
 
44
  TwIL-LM3-Pro-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
45
  TwIL-LM3-Pro-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
46
  TwIL-LM3-Pro-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
47
+ TwIL-LM3-Pro-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -92,7 +92,7 @@ assistant — there is no safety or preference tuning here beyond what Granite 4
92
  | Language | English |
93
  | Tokenizer vocabulary size | 100,352 |
94
  | Context window | 131,072 tokens |
95
- | Checkpoint precision | bfloat16 (6.82 GiB), plus Q4\_K\_M / Q5\_K\_M / Q6\_K / Q8\_0 / F16 GGUF builds |
96
  | Post-training | LoRA SFT → checkpoint fusion → WiSE-FT (α = 0.15) → MGPO reinforcement learning (β = 0.02, step 2580) |
97
  | Reasoning format | Emits a `<think>…</think>` block before the answer (default chat template) |
98
  | Evaluated decoding | Greedy, 2048 new tokens (one retry at 4096), `max_seq_len` 8192 |
@@ -423,6 +423,7 @@ as EOS, so run it in conversation mode (`-cnv`).
423
 
424
  | file | quant | size | bits/weight | notes |
425
  |---|---|---:|---:|---|
 
426
  | `TwIL-LM3-Pro-Q4_K_M.gguf` | Q4_K_M | 2.09 GiB | 4.91 | recommended default; runs on CPU or 4 GB of VRAM |
427
  | `TwIL-LM3-Pro-Q5_K_M.gguf` | Q5_K_M | 2.43 GiB | 5.71 | a little more headroom than Q4_K_M |
428
  | `TwIL-LM3-Pro-Q6_K.gguf` | Q6_K | 2.80 GiB | 6.57 | close to Q8_0 quality at about three-quarters the size |
@@ -439,14 +440,38 @@ budget large — 2048 tokens or more — since the model emits a `<think>` block
439
  and a short budget truncates it, which costs far more accuracy than the quantization does.
440
 
441
  F16 and Q8_0 were produced directly by `convert_hf_to_gguf.py` from the released bf16 weights; the
442
- K-quants (Q4_K_M, Q5_K_M, Q6_K) were quantized from the F16 build with `llama-quantize`, without
443
- an importance matrix. F16 is not bit-identical to the released weights: bf16 and f16 carry the
444
  same 16 bits but trade exponent range against mantissa precision, so the conversion is a
445
  narrowing one, in practice negligible for inference.
446
 
447
  The published Track A and Track B numbers were measured on the **bf16** weights through vLLM, not
448
- on any of these GGUF builds, so expect small deviations — most likely at Q4_K_M — that have not
449
- been quantified here.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
 
451
  ## How it was built
452
 
 
92
  | Language | English |
93
  | Tokenizer vocabulary size | 100,352 |
94
  | Context window | 131,072 tokens |
95
+ | Checkpoint precision | bfloat16 (6.82 GiB), plus Q4\_0 / Q4\_K\_M / Q5\_K\_M / Q6\_K / Q8\_0 / F16 GGUF builds |
96
  | Post-training | LoRA SFT → checkpoint fusion → WiSE-FT (α = 0.15) → MGPO reinforcement learning (β = 0.02, step 2580) |
97
  | Reasoning format | Emits a `<think>…</think>` block before the answer (default chat template) |
98
  | Evaluated decoding | Greedy, 2048 new tokens (one retry at 4096), `max_seq_len` 8192 |
 
423
 
424
  | file | quant | size | bits/weight | notes |
425
  |---|---|---:|---:|---|
426
+ | `TwIL-LM3-Pro-Q4_0.gguf` | Q4_0 | 1.98 GiB | 4.65 | for the Snapdragon Hexagon NPU via GenieX (see below) |
427
  | `TwIL-LM3-Pro-Q4_K_M.gguf` | Q4_K_M | 2.09 GiB | 4.91 | recommended default; runs on CPU or 4 GB of VRAM |
428
  | `TwIL-LM3-Pro-Q5_K_M.gguf` | Q5_K_M | 2.43 GiB | 5.71 | a little more headroom than Q4_K_M |
429
  | `TwIL-LM3-Pro-Q6_K.gguf` | Q6_K | 2.80 GiB | 6.57 | close to Q8_0 quality at about three-quarters the size |
 
440
  and a short budget truncates it, which costs far more accuracy than the quantization does.
441
 
442
  F16 and Q8_0 were produced directly by `convert_hf_to_gguf.py` from the released bf16 weights; the
443
+ K-quants (Q4_K_M, Q5_K_M, Q6_K) and Q4_0 were quantized from the F16 build with `llama-quantize`,
444
+ without an importance matrix. F16 is not bit-identical to the released weights: bf16 and f16 carry the
445
  same 16 bits but trade exponent range against mantissa precision, so the conversion is a
446
  narrowing one, in practice negligible for inference.
447
 
448
  The published Track A and Track B numbers were measured on the **bf16** weights through vLLM, not
449
+ on any of these GGUF builds, so expect small deviations — most likely at Q4_K_M and Q4_0 — that
450
+ have not been quantified here.
451
+
452
+ ### Snapdragon NPU / GenieX
453
+
454
+ The Q4_0 build is the one to use with [GenieX](https://github.com/qualcomm/GenieX) on Snapdragon
455
+ devices (for example Snapdragon X Elite / X2 Elite), since Q4_0 has the best Hexagon NPU support in
456
+ its llama.cpp runtime.
457
+
458
+ ```bash
459
+ geniex infer webAI-Official/TwIL-LM3-Pro:Q4_0 --nctx 16384
460
+ ```
461
+
462
+ ```python
463
+ from geniex import AutoModelForCausalLM
464
+
465
+ model = AutoModelForCausalLM.from_pretrained(
466
+ "webAI-Official/TwIL-LM3-Pro", precision="Q4_0", n_ctx=16384
467
+ )
468
+ ```
469
+
470
+ Set the context explicitly: GenieX defaults to a 4,096-token window for GGUF models, which is too
471
+ short for this model's `<think>` blocks (1,902 tokens on average on Track A). The GGUF carries the
472
+ full 131,072-token context, and on the NPU GenieX stores the KV cache in Q8_0, at about 42 KiB per
473
+ token — roughly 0.7 GiB at 16k and 1.3 GiB at 32k on top of the weights. As above, scores were
474
+ measured inside an 8,192-token window, and this build has not yet been benchmarked on device.
475
 
476
  ## How it was built
477
 
TwIL-LM3-Pro-Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db09635d997275fc07d0df12ea3ab43aa7fe03fa612e061d904581583e9dbbcf
3
+ size 2129118656