Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
license: apache-2.0
|
7 |
+
library_name: transformers
|
8 |
+
base_model:
|
9 |
+
- mistralai/Mistral-Nemo-Base-2407 # lightweight student
|
10 |
+
- Qwen/Qwen3-235B-A22B # thinking + non-thinking teacher
|
11 |
+
tags:
|
12 |
+
- distillation
|
13 |
+
- /think
|
14 |
+
- /nothink
|
15 |
+
- reasoning-transfer
|
16 |
+
- arcee-ai
|
17 |
+
|
18 |
+
---
|
19 |
+
|
20 |
+
[](https://hf.co/QuantFactory)
|
21 |
+
|
22 |
+
|
23 |
+
# QuantFactory/Homunculus-GGUF
|
24 |
+
This is quantized version of [arcee-ai/Homunculus](https://huggingface.co/arcee-ai/Homunculus) created using llama.cpp
|
25 |
+
|
26 |
+
# Original Model Card
|
27 |
+
|
28 |
+
|
29 |
+

|
30 |
+
|
31 |
+
# Arcee **Homunculus-12B**
|
32 |
+
|
33 |
+
**Homunculus** is a 12 billion-parameter instruction model distilled from **Qwen3-235B** onto the **Mistral-Nemo** backbone.
|
34 |
+
It was purpose-built to preserve Qwen’s two-mode interaction style—`/think` (deliberate chain-of-thought) and `/nothink` (concise answers)—while running on a single consumer GPU.
|
35 |
+
|
36 |
+
---
|
37 |
+
|
38 |
+
## ✨ What’s special?
|
39 |
+
|
40 |
+
| Feature | Detail |
|
41 |
+
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
42 |
+
| **Reasoning-trace transfer** | Instead of copying just final probabilities, we align *full* logit trajectories, yielding more faithful reasoning. |
|
43 |
+
| **Total-Variation-Distance loss** | To better match the teacher’s confidence distribution and smooth the loss landscape. |
|
44 |
+
| **Tokenizer replacement** | The original Mistral tokenizer was swapped for Qwen3's tokenizer. |
|
45 |
+
| **Dual interaction modes** | Use `/think` when you want transparent step-by-step reasoning (good for analysis & debugging). Use `/nothink` for terse, production-ready answers. Most reliable in the system role field. | |
|
46 |
+
|
47 |
+
---
|
48 |
+
|
49 |
+
## Benchmark results
|
50 |
+
|
51 |
+
| Benchmark | Score |
|
52 |
+
| --------- | ----- |
|
53 |
+
| GPQADiamond (average of 3) | 57.1% |
|
54 |
+
| mmlu | 67.5% |
|
55 |
+
|
56 |
+
## 🔧 Quick Start
|
57 |
+
|
58 |
+
```python
|
59 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
60 |
+
|
61 |
+
model_id = "arcee-ai/Homunculus"
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
63 |
+
model = AutoModelForCausalLM.from_pretrained(
|
64 |
+
model_id,
|
65 |
+
torch_dtype="auto",
|
66 |
+
device_map="auto"
|
67 |
+
)
|
68 |
+
|
69 |
+
# /think mode - Chain-of-thought reasoning
|
70 |
+
messages = [
|
71 |
+
{"role": "system", "content": "You are a helpful assistant. /think"},
|
72 |
+
{"role": "user", "content": "Why is the sky blue?"},
|
73 |
+
]
|
74 |
+
output = model.generate(
|
75 |
+
tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt"),
|
76 |
+
max_new_tokens=512,
|
77 |
+
temperature=0.7
|
78 |
+
)
|
79 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
80 |
+
|
81 |
+
# /nothink mode - Direct answers
|
82 |
+
messages = [
|
83 |
+
{"role": "system", "content": "You are a helpful assistant. /nothink"},
|
84 |
+
{"role": "user", "content": "Summarize the plot of Hamlet in two sentences."},
|
85 |
+
]
|
86 |
+
output = model.generate(
|
87 |
+
tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt"),
|
88 |
+
max_new_tokens=128,
|
89 |
+
temperature=0.7
|
90 |
+
)
|
91 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
92 |
+
```
|
93 |
+
|
94 |
+
## 💡 Intended Use & Limitations
|
95 |
+
|
96 |
+
Homunculus is designed for:
|
97 |
+
|
98 |
+
* **Research** on reasoning-trace distillation, Logit Imitation, and mode-switchable assistants.
|
99 |
+
* **Lightweight production** deployments that need strong reasoning at <12 GB VRAM.
|
100 |
+
|
101 |
+
### Known limitations
|
102 |
+
|
103 |
+
* May inherit biases from the Qwen3 teacher and internet-scale pretraining data.
|
104 |
+
* Long-context (>32 k tokens) use is experimental—expect latency & memory overhead.
|
105 |
+
|
106 |
+
---
|
107 |
+
|