Text Generation
GGUF
English
llama.cpp
unsloth
lora
reasoning
chain-of-thought
distillation
claude
claude-opus
qwen
qwen3.8
dense
mtp
speculative-decoding
conversational
rico03 commited on
Commit
5b05972
Β·
verified Β·
1 Parent(s): 9e4699c

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,8 @@ 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
+ qwen3.8-27b-opus-distill.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
37
+ qwen3.8-27b-opus-distill.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ qwen3.8-27b-opus-distill.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
39
+ qwen3.8-27b-opus-distill.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
40
+ qwen3.8-27b-opus-distill.f16.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - lordx64/reasoning-distill-claude-opus-4-7-max
5
+ - Jackrong/Claude-opus-4.7-TraceInversion-5000x
6
+ - Jackrong/Claude-opus-4.6-TraceInversion-9000x
7
+ language:
8
+ - en
9
+ base_model: Qwen/Qwen3.8-27B
10
+ pipeline_tag: text-generation
11
+ library_name: gguf
12
+ tags:
13
+ - gguf
14
+ - llama.cpp
15
+ - unsloth
16
+ - lora
17
+ - reasoning
18
+ - chain-of-thought
19
+ - distillation
20
+ - claude
21
+ - claude-opus
22
+ - qwen
23
+ - qwen3.8
24
+ - dense
25
+ - mtp
26
+ - speculative-decoding
27
+ ---
28
+
29
+ # Qwen3.8-27B-Claude-Opus-Reasoning-Distilled-GGUF
30
+
31
+ ![License](https://img.shields.io/badge/license-apache--2.0-blue)
32
+ ![Base Model](https://img.shields.io/badge/base-Qwen3.8--27B-orange)
33
+ ![Method](https://img.shields.io/badge/method-LoRA%20%2F%20Unsloth-purple)
34
+ ![Teacher](https://img.shields.io/badge/distilled%20from-Claude%20Opus-black)
35
+ ![MTP](https://img.shields.io/badge/MTP-verified%20working-brightgreen)
36
+
37
+ GGUF quantizations of [rico03/Qwen3.8-27B-Claude-Opus-Reasoning-Distilled](https://huggingface.co/rico03/Qwen3.8-27B-Claude-Opus-Reasoning-Distilled) β€” a LoRA fine-tune of **Qwen/Qwen3.8-27B** distilled on reasoning traces from **Claude Opus 4.6/4.7**, merged to 16-bit and quantized for local inference with llama.cpp / Ollama / LM Studio.
38
+
39
+ **MTP (Multi-Token Prediction) head verified working for self-speculative decoding β€” see below, ~1.6Γ— speedup.**
40
+
41
+ ## 🧠 What this is
42
+
43
+ Qwen3.8-27B is natively vision-language with a hybrid attention stack (16/64 full-attention layers, 48/64 Gated DeltaNet/linear-attention layers) plus a Multi-Token Prediction head. This fine-tune targets **only the text reasoning path**; the vision tower is present in the merge (unmodified base weights) but was not targeted by LoRA.
44
+
45
+ - **Base model:** [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) (dense, 27B, hybrid linear+full attention, MTP head)
46
+ - **Method:** LoRA (r=32, alpha=32) via [Unsloth](https://github.com/unslothai/unsloth), merged to 16-bit, converted with [llama.cpp](https://github.com/ggml-org/llama.cpp) (latest build β€” required for hybrid Gated DeltaNet operator support)
47
+ - **Training data:** ~21.5K examples combining real Opus extended-thinking traces and reconstructed-reasoning traces over genuine Opus outputs (see Dataset Composition below)
48
+
49
+ ## πŸ“Š Training Details
50
+
51
+ | | |
52
+ |---|---|
53
+ | Steps trained | 150 (partial run β€” pipeline validation, not full convergence) |
54
+ | Epochs | 0.126 (~12.6% of one epoch, ~2,700 of 21,490 examples) |
55
+ | Effective batch size | 18 (per-device 6 Γ— grad accum 3) |
56
+ | Final train loss (avg) | 0.728 |
57
+ | Sequence length | 8192 (99.7% of dataset uncut; 0.3% longest examples excluded rather than truncated) |
58
+ | Trainable params (LoRA) | 233,455,616 (0.85% of 27.6B) |
59
+
60
+ > **Status: pipeline-validation run, not a fully converged model.** 150 steps at batch 18 covers ~12.6% of one epoch β€” enough to confirm the training pipeline works end-to-end (LoRA on hybrid attention, masking, chat template, checkpointing, merge, GGUF conversion, MTP preservation), not enough for the model to have generalized across the full dataset. A full run (1+ epoch, ~1,194+ steps) is needed before this should be treated as a finished distillation.
61
+
62
+ ## πŸ“š Dataset Composition
63
+
64
+ | Source | Examples | What it is |
65
+ |---|---:|---|
66
+ | [lordx64/reasoning-distill-claude-opus-4-7-max](https://huggingface.co/datasets/lordx64/reasoning-distill-claude-opus-4-7-max) | 8,124 | Genuine Claude Opus 4.7 extended-thinking traces (verified `model`/`usage` fields per row) |
67
+ | [Jackrong/Claude-opus-4.7-TraceInversion-5000x](https://huggingface.co/datasets/Jackrong/Claude-opus-4.7-TraceInversion-5000x) | 4,800 | Real Opus 4.7 outputs (`teacher_model` field), reasoning trace reconstructed post-hoc by a smaller "trace inversion" model |
68
+ | [Jackrong/Claude-opus-4.6-TraceInversion-9000x](https://huggingface.co/datasets/Jackrong/Claude-opus-4.6-TraceInversion-9000x) | 8,700 | Same trace-inversion method, Opus 4.6 |
69
+
70
+ **Transparency note:** ~62% of the dataset has a *genuine* final answer from Opus but a *reconstructed* reasoning trace, not Opus's actual internal thinking. The lordx64 subset (~38%) is the closest to authentic Opus thinking style. Full details on the [base LoRA repo](https://huggingface.co/rico03/Qwen3.8-27B-Claude-Opus-Reasoning-Distilled).
71
+
72
+ ## ⚑ MTP / Speculative Decoding
73
+
74
+ The Multi-Token Prediction head from the base model (`blk.64.nextn.*`) survives the LoRA merge and GGUF conversion intact and is functional for self-speculative decoding β€” verified on Q8_0:
75
+
76
+ | Mode | Generation speed (H100 NVL) |
77
+ |---|---:|
78
+ | Standard decoding | 64.6 tok/s |
79
+ | `--spec-type draft-mtp` | **104.2 tok/s** (~1.6Γ— speedup) |
80
+
81
+ ```bash
82
+ llama-cli -m qwen3.8-27b-opus-distill.Q8_0.gguf -p "your prompt" -ngl 99 --spec-type draft-mtp
83
+ ```
84
+
85
+ No separate draft model needed β€” the MTP head inside this same GGUF file acts as the draft. Output quality is unaffected (MTP proposes candidate tokens that the main model verifies; it doesn't change what gets generated, only how fast). Requires a recent llama.cpp build with `--spec-type draft-mtp` support.
86
+
87
+ ## πŸ“¦ Available Quantizations
88
+
89
+ | File | Size | Notes |
90
+ |---|---:|---|
91
+ | `qwen3.8-27b-opus-distill.f16.gguf` | 51 GB | Full precision, source for further quantization |
92
+ | `qwen3.8-27b-opus-distill.Q8_0.gguf` | 28 GB | Near-lossless, recommended if VRAM allows |
93
+ | `qwen3.8-27b-opus-distill.Q6_K.gguf` | 21 GB | Good quality/size trade-off |
94
+ | `qwen3.8-27b-opus-distill.Q5_K_M.gguf` | 19 GB | |
95
+ | `qwen3.8-27b-opus-distill.Q4_K_M.gguf` | 16 GB | Practical for single consumer GPU (24GB card) |
96
+
97
+ All quants verified to generate coherent output (Q8_0 sanity-tested with a technical prompt before upload). MTP speculative decoding available on all quants sharing the same architecture.
98
+
99
+ **⚠️ Requires a recent llama.cpp build.** This model uses Qwen3.8's hybrid Gated DeltaNet + Gated Attention architecture β€” older llama.cpp builds will not load it correctly. Build from source (`main` branch) if your package manager's version is stale.
100
+
101
+ ## πŸš€ Usage
102
+
103
+ ### llama.cpp
104
+
105
+ ```bash
106
+ ./llama-cli -m qwen3.8-27b-opus-distill.Q8_0.gguf -p "Explain the difference between TCP and UDP." -ngl 99 --temp 1.0 --top-p 0.95 --top-k 20
107
+ ```
108
+
109
+ With MTP speculative decoding (faster, same output distribution):
110
+
111
+ ```bash
112
+ ./llama-cli -m qwen3.8-27b-opus-distill.Q8_0.gguf -p "Explain the difference between TCP and UDP." -ngl 99 --temp 1.0 --top-p 0.95 --top-k 20 --spec-type draft-mtp
113
+ ```
114
+
115
+ ### Ollama / LM Studio
116
+
117
+ Download the `.gguf` file matching your VRAM budget from the Files tab and point Ollama/LM Studio at it directly (Modelfile/import instructions per their respective docs).
118
+
119
+ Thinking is on by default (`<think>...</think>` block before the final answer), matching the base Qwen3.8 chat template.
120
+
121
+ ## ⚠️ Known Limitations
122
+
123
+ - **This checkpoint is a pipeline-validation run (150 steps, ~12.6% of one epoch), not a fully converged fine-tune.** Expect it to show the target `<think>` format and some stylistic shift, but not robust generalization across task domains.
124
+ - Dataset partially composed of reconstructed (not captured) reasoning traces β€” see Dataset Composition above
125
+ - Text-only fine-tune; vision tower weights are present in the merge (unmodified base) but untested/unused in this GGUF export
126
+ - Requires latest llama.cpp for hybrid attention + MTP support (see note above)
127
+
128
+ ## πŸ™ Acknowledgments
129
+
130
+ Training methodology based on the [Jackrong fine-tuning guide](https://github.com/Jackrong). Thanks to lordx64 and Jackrong for the source reasoning datasets, and the llama.cpp team for hybrid-architecture support.
131
+
132
+ ---
133
+
134
+ Maintained by rico03
qwen3.8-27b-opus-distill.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d88819a7bbbd1ee6cee2169eec16e8cc51de759cb6aff2f621e60564ec9a7ac6
3
+ size 16810714336
qwen3.8-27b-opus-distill.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41c5bdc6719eb2f49fc28dffed471c57135de976774131045c1b57c1dbed382c
3
+ size 19535701216
qwen3.8-27b-opus-distill.Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f20a86da392455d4e41eb1a4049750fc7eab234d96483866047fb84c7ecbef16
3
+ size 22430999776
qwen3.8-27b-opus-distill.Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09379075cf890ebbef92886f40b58ebd0969422b7c32a4e764bf063a10c0dbea
3
+ size 29047084256
qwen3.8-27b-opus-distill.f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb7e0fd4e23c97aea5199a5784e60875a8c8be07865217d265743eab6ed96a3b
3
+ size 54657733856