Danny-Dasilva commited on
Commit
f209f08
·
verified ·
1 Parent(s): 6ca7304

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Bonsai-27B-antidoom-1bit-Q1_0.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Bonsai-27B-dspark-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Bonsai-27B-mmproj-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Bonsai-27B-antidoom-1bit-Q1_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d555fb399a1ac537c8f44b69544576bc13755c9451875c798128037d274dfb7
3
+ size 4667606144
Bonsai-27B-dspark-Q4_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25e73f9f7ab5d1f7f1336711496dbc12da674e639ec88d579dc8683045befb1b
3
+ size 1787468768
Bonsai-27B-mmproj-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb561d41a7bbeb0fcf04883c8af11078ef6cae0a66862a0b68443cfca495269d
3
+ size 629246880
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: prism-ml/Bonsai-27B-gguf
3
+ license: apache-2.0
4
+ pipeline_tag: text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - bonsai
9
+ - qwen3_5
10
+ - antidoom
11
+ - ftpo
12
+ - anti-repetition
13
+ - 1-bit
14
+ - q1_0
15
+ - gguf
16
+ - speculative-decoding
17
+ - dspark
18
+ - llama.cpp
19
+ - blackwell
20
+ ---
21
+
22
+ # Bonsai-27B-antidoom-1bit-DSpark
23
+
24
+ A **[DSpark](https://github.com/PrismML-Eng/Bonsai-demo)-accelerated + [antidoom](https://github.com/Liquid4All/antidoom)
25
+ (FTPO anti-repetition)** build of [`prism-ml/Bonsai-27B`](https://huggingface.co/prism-ml/Bonsai-27B-gguf) —
26
+ the 1-bit (`Q1_0`, 1.125 bpw g128) quantization of the Qwen3.5-27B hybrid-attention model.
27
+
28
+ Runs in the **[PrismML-Eng/llama.cpp](https://github.com/PrismML-Eng/llama.cpp)** fork (CUDA, the
29
+ Q1_0 hybrid-attention kernels). Benchmarked on a single **RTX 5090 (32 GB, Blackwell sm_120)**.
30
+
31
+ ## Contents
32
+ | File | What |
33
+ |---|---|
34
+ | `Bonsai-27B-antidoom-1bit-Q1_0.gguf` | antidoom-tuned 1-bit model (4.5 GB) |
35
+ | `Bonsai-27B-dspark-Q4_1.gguf` | DSpark speculative drafter (from prism-ml) |
36
+ | `Bonsai-27B-mmproj-Q8_0.gguf` | vision projector (from prism-ml) |
37
+
38
+ ## Run with DSpark (fastest)
39
+ ```bash
40
+ build/bin/llama-server \
41
+ -m Bonsai-27B-antidoom-1bit-Q1_0.gguf \
42
+ -md Bonsai-27B-dspark-Q4_1.gguf \
43
+ --spec-type draft-dspark --spec-draft-n-max 4 \
44
+ -ngl 999 -ngld 999 -fa on -c 16384 -np 1
45
+ ```
46
+
47
+ ## Benchmark (RTX 5090, greedy, bs=1, 256 tok)
48
+ | Config | tok/s | accept | note |
49
+ |---|---|---|---|
50
+ | **DSpark, code prompt** | **186.2** | 78.6% | **1.16× over native** |
51
+ | Native (llama-bench tg256) | 161.2 | — | reference |
52
+ | Native (llama-server decode) | 157.5 | — | |
53
+ | DSpark, prose prompt | 132.8 | 51% | low-accept workloads slower |
54
+
55
+ DSpark speedup is workload-dependent: on predictable content (code, high accept) it beats native;
56
+ the 1-bit target is so bandwidth-cheap (3.5 GB) that low-accept drafting overhead can dominate.
57
+ The 5090 exceeds prism-ml's published H100 native (104.8 t/s) — this 1-bit model is memory-bandwidth-bound.
58
+
59
+ ## Antidoom (FTPO) pass — what was done
60
+ Bonsai-27B is unusually **doom-loop resistant** (it self-corrects repetition and stays coherent even
61
+ under forced long generation), so runaway-repetition pairs were surfaced by **priming**: contexts that
62
+ have already begun repeating a phrase, sent to the raw completion endpoint, where the model continues
63
+ the loop. Antidoom's own detector + chosen-token sampler then extracted **40 FTPO preference pairs**
64
+ (rejected = the loop-continuation token, chosen = coherent escapes). FTPO trained a LoRA
65
+ (r=32, q/k/v/o + gate/up/down, 12 epochs, lr 3e-5) on the FP16 unpacked model:
66
+
67
+ - **chosen-win (prefers the coherent escape over continuing the loop): 0.11 → 0.66** (early-stopped).
68
+ - LoRA merged (CPU) into FP16, re-quantized to `Q1_0`. Note the aggressive 1-bit format partially
69
+ dilutes the LoRA's fine adjustments, so the anti-repetition effect is strongest at higher precision.
70
+
71
+ Output remains coherent at 1-bit. This is a demonstration of the antidoom method on a
72
+ 1-bit hybrid-attention target, packaged with the shipped DSpark drafter.
73
+
74
+ ## Provenance
75
+ Base weights, DSpark drafter and mmproj are from [prism-ml](https://huggingface.co/prism-ml)
76
+ (re-quantized after the antidoom LoRA merge for the model weights; drafter/mmproj copied unchanged).
77
+ Built with [antidoom](https://github.com/Liquid4All/antidoom) and the PrismML llama.cpp fork.