BoldingBuilds commited on
Commit
bea7e42
·
verified ·
1 Parent(s): 5889269

Model card

Browse files
Files changed (1) hide show
  1. README.md +140 -0
README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: fastino-community-license
4
+ license_link: https://huggingface.co/BoldingBuilds/Wildcat-Mini/blob/main/LICENSES/FASTINO-LICENSE.txt
5
+ base_model: prism-ml/Ternary-Bonsai-2-27B-gguf
6
+ pipeline_tag: zero-shot-classification
7
+ library_name: transformers
8
+ tags:
9
+ - decision-model
10
+ - system-one
11
+ - classification
12
+ - ternary
13
+ - 2-bit
14
+ - lora
15
+ ---
16
+
17
+ # Wildcat Mini
18
+
19
+ **Wildcat Mini is Ternary Bonsai 2 27B taught to answer decision questions.** Ask it to pick one option, answer
20
+ yes / no, or rate something on a scale, and it returns a probability for every answer, in the same format as
21
+ [d3-ultra](https://huggingface.co/vllm-sr/d3-ultra) and [Wildcat](https://huggingface.co/BoldingBuilds/Wildcat).
22
+ Its language weights stay in Bonsai's own ternary form, about 2 bits per weight, so the model loads in **7.4 GiB of
23
+ GPU memory**.
24
+
25
+ | | |
26
+ | --- | --- |
27
+ | **Language model** | [Ternary Bonsai 2 27B](https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf) (PrismML, Apache-2.0; Qwen3.8-27B family), PQ2_0 weights kept packed |
28
+ | **Decision head** | [d3](https://huggingface.co/vllm-sr/d3)'s readout, tokenizer and runtime (Apache-2.0) |
29
+ | **Training** | One LoRA (rank 16) taught by d3, then d3-ultra and Fastino GLiDE |
30
+ | **GPU memory** | 7.4 GiB loaded |
31
+ | **Download** | about 7.5 GiB |
32
+ | **License** | Fastino Community License (see below). Built with Fastino GLiDE. |
33
+
34
+ ## How it was made
35
+
36
+ 1. **Swap the language model.** d3's package (code, tokenizer, the 255-code answer readout) with every
37
+ language-model weight replaced by Ternary Bonsai 2 27B's. Both are Qwen3.8-27B shapes. On its own this scores
38
+ 41.9 on our sample: the readout does not fit Bonsai's weights yet.
39
+ 2. **Teach it.** One LoRA is trained in rounds to match a teacher's answer probabilities: first
40
+ [vllm-sr/d3](https://huggingface.co/vllm-sr/d3) on about 33,000 questions and then on the 36,559-question mix
41
+ below, and last on 12,000 of those with d3-ultra's and [Fastino GLiDE](https://huggingface.co/fastino/GLiDE)'s
42
+ answers combined. The questions come only from public training splits, checked against the Decision Index for
43
+ leaks. No Decision Index data was used for training.
44
+ 3. **Serve it ternary.** At run time the 2-bit codes stay packed on the GPU; a small Triton kernel unpacks each layer
45
+ just before its matmul. It scores the same as with the full 49 GB bf16 weights (60.23 vs 60.25 on our sample).
46
+
47
+ ## Results
48
+
49
+ Wildcat Mini has **not** been run on the full Decision Index or submitted to its board. All numbers below are from
50
+ **our own 2,000-row sample of the Decision Index public set**, the same rows for every model. This sample reads about
51
+ 2.7 points below the board's public score for d3-ultra, so compare rows with each other, not with the board.
52
+
53
+ | Model (same 2,000 public rows) | GPU memory | Index |
54
+ | --- | --- | --- |
55
+ | d3-ultra (bf16) | about 54 GB | 68.84 |
56
+ | Wildcat (3-bit d3-ultra) | 13.2 GiB | 69.39 |
57
+ | **Wildcat Mini (this model)** | **7.4 GiB** | **60.23** |
58
+ | Wildcat Mini, bf16 weights | about 49 GB | 60.25 |
59
+ | Ternary Bonsai 2 27B + d3 readout, not trained | 7.4 GiB | 41.91 |
60
+
61
+ **In short: about 9 points below d3-ultra on our sample, at a seventh of its memory.** If you have the memory for
62
+ Wildcat, use Wildcat.
63
+
64
+ **Speed.** Mini is slower than d3-ultra, because every layer is unpacked from ternary on the fly. On 750 sampled
65
+ public requests, one at a time:
66
+
67
+ | ms per request | median | p80 | mean |
68
+ | --- | --- | --- | --- |
69
+ | d3-ultra, RTX PRO 6000 | 168 | 1,067 | 932 |
70
+ | Wildcat Mini, RTX PRO 6000 | 173 | 1,878 | 1,393 |
71
+ | Wildcat Mini, RTX 3090 (2,000 sample rows) | 1,097 | 9,650 | 7,042 |
72
+
73
+ ## What was not tested
74
+
75
+ - **Cards smaller than 24 GB.** The weights take 7.4 GiB, but long requests need more memory on top. It was run on an
76
+ RTX 3090 (24 GB) and an RTX PRO 6000 (96 GB) only.
77
+ - **Images and video, Box and Track questions.** d3's runtime supports them; Mini was only measured on choice, yes / no
78
+ and score questions.
79
+ - AMD GPUs. The unpack kernel is Triton and was only run on NVIDIA (CUDA).
80
+
81
+ ## Run it
82
+
83
+ Needs an NVIDIA GPU, the packages in `requirements.txt`, plus `triton` and `accelerate`.
84
+
85
+ ```bash
86
+ hf download BoldingBuilds/Wildcat-Mini --local-dir wildcat-mini
87
+ ```
88
+
89
+ With the Decision Index kit:
90
+
91
+ ```bash
92
+ PYTHONPATH=wildcat-mini python -m decision_index run --engine d3_tern:D3TernEngine --option model=wildcat-mini \
93
+ --rows <rows.jsonl.gz> --out <run dir>
94
+ ```
95
+
96
+ The packed weights and the LoRA in `adapter/` load on their own. Nothing else needs passing.
97
+
98
+ ## Files
99
+
100
+ | File | What it is |
101
+ | --- | --- |
102
+ | `mini-base.safetensors` | the packed ternary language weights (2-bit codes + one fp16 scale per 128 weights) plus the other backbone tensors |
103
+ | `adapter/` | the LoRA (`adapter.safetensors`, `adapter.json`) |
104
+ | `readout.safetensors`, tokenizer, configs, `d3_*.py` | from d3, unchanged |
105
+ | `d3_tern.py` | the ternary engine and loader |
106
+ | `d3_q3.py` | shared helpers from Wildcat's engine (memory limits for long requests) |
107
+
108
+ ## Training data
109
+
110
+ The same public-train-split mix as Wildcat: intent and topic (CLINC150, BANKING77, DBpedia-14, LEDGAR); reading,
111
+ inference and paraphrase (SQuAD v2, BoolQ, SNLI, WANLI, VitaminC, PAWS, STS-B, PubMedQA, claim_stance +
112
+ Perspectrum); commonsense and science (HellaSwag, WinoGrande, PIQA, Social IQa, CommonsenseQA, Cosmos QA, ARC,
113
+ OpenBookQA, QASC, RuleTaker); maths and knowledge (GSM8K, AQuA-RAT, MATH, MMLU train, MedMCQA); ratings and taste
114
+ (Feedback Collection, HelpSteer2, WMT DA, GoEmotions, Civil Comments, New Yorker Caption Contest, iSarcasmEval);
115
+ tools and search (When2Call, Amazon ESCI); and questions generated here (MIT). Several are train splits of
116
+ benchmarks the Decision Index tests, so expect Mini to do relatively better there. Each source keeps its own
117
+ licence; no non-commercial data.
118
+
119
+ ## License
120
+
121
+ Wildcat Mini learned from Fastino GLiDE's answers, so it is a Derivative Work under the
122
+ [Fastino Community License](LICENSES/FASTINO-LICENSE.txt) and ships under it. In short:
123
+
124
+ - Free to use, change and share. Keep this license with any copy.
125
+ - **Commercial use:** show "Built with Fastino GLiDE" in the product's docs, about page or UI.
126
+ - **Companies with more than $10M yearly revenue** using it in production need a separate agreement with Fastino
127
+ (hello@fastino.ai). Evaluation, testing, benchmarking and research are not production.
128
+
129
+ Ternary Bonsai 2's weights, and d3's readout and runtime, are Apache-2.0 (`LICENSE`, `NOTICE`).
130
+
131
+ **Built with Fastino GLiDE.**
132
+
133
+ ## Credits
134
+
135
+ - **Ternary Bonsai 2 27B**: PrismML ([prism-ml/Ternary-Bonsai-2-27B-gguf](https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf)). Mini runs on their ternary weights.
136
+ - **d3** and **d3-ultra**: the vLLM Semantic Router team ([vllm-sr/d3](https://huggingface.co/vllm-sr/d3), [vllm-sr/d3-ultra](https://huggingface.co/vllm-sr/d3-ultra)). d3 supplies the readout, tokenizer and runtime; both were teachers.
137
+ - **Fastino GLiDE**: teacher ([fastino/GLiDE](https://huggingface.co/fastino/GLiDE)).
138
+ - **Qwen** (Alibaba Cloud): the base model family.
139
+ - The **Decision Index** (multimodalart) for the benchmark and kit.
140
+ - The authors of every public dataset in the training mix (above).