nachikethreddyy commited on
Commit
59dc3c4
ยท
verified ยท
1 Parent(s): a112945

Update README for GGUF format

Browse files
Files changed (1) hide show
  1. README.md +35 -208
README.md CHANGED
@@ -7,241 +7,68 @@ base_model: Qwen/Qwen3-8B
7
  tags:
8
  - text-generation
9
  - fine-tune
10
- - lora
11
  - coding
12
- - software-engineering
13
- - qwen
14
- - mlx
15
  - gguf
16
- - quantized
 
 
17
  pipeline_tag: text-generation
18
  inference: true
19
  model_creator: nachikethreddyy
20
  ---
21
 
22
- # Qwen3.5-8B Distilled
23
 
24
- Fine-tuned **Qwen3.5-8B** model for software engineering and coding tasks. Available in **HuggingFace**, **MLX (Mac)**, and **GGUF** formats.
25
 
26
- ## ๐Ÿ“ Repository Structure
27
 
28
- ```
29
- qwen3.5-8b-distilled/
30
- โ”œโ”€โ”€ README.md # This file
31
- โ”œโ”€โ”€ model-00001-of-00004.safetensors # HF Full Precision (root level)
32
- โ”œโ”€โ”€ model-00002-of-00004.safetensors
33
- โ”œโ”€โ”€ model-00003-of-00004.safetensors
34
- โ”œโ”€โ”€ model-00004-of-00004.safetensors
35
- โ”œโ”€โ”€ config.json
36
- โ”œโ”€โ”€ tokenizer.json
37
- โ”œโ”€โ”€ tokenizer_config.json
38
- โ”œโ”€โ”€ generation_config.json
39
- โ”‚
40
- โ”œโ”€โ”€ variants/q8/ # HuggingFace Q8 Quantized
41
- โ”‚ โ”œโ”€โ”€ model.safetensors
42
- โ”‚ โ”œโ”€โ”€ config.json
43
- โ”‚ โ””โ”€โ”€ tokenizer.json
44
- โ”‚
45
- โ””โ”€โ”€ gguf/ # GGUF Format (Ollama, llama.cpp)
46
- โ””โ”€โ”€ qwen3-distilled-f16.gguf
47
- ```
48
-
49
- ---
50
-
51
- ## ๐Ÿš€ Quick Start by Format
52
-
53
- ### **HuggingFace Format (Python - Any OS)**
54
-
55
- #### Full Precision (Highest Quality)
56
- ```python
57
- from transformers import AutoModelForCausalLM, AutoTokenizer
58
-
59
- model = AutoModelForCausalLM.from_pretrained(
60
- "nachikethreddyy/qwen3.5-8b-distilled",
61
- torch_dtype="auto",
62
- device_map="auto"
63
- )
64
- tokenizer = AutoTokenizer.from_pretrained("nachikethreddyy/qwen3.5-8b-distilled")
65
-
66
- inputs = tokenizer("Write a Python function", return_tensors="pt")
67
- outputs = model.generate(**inputs, max_length=200)
68
- print(tokenizer.decode(outputs[0]))
69
- ```
70
-
71
- #### Q8 Quantized (Faster, 46% Smaller)
72
- ```python
73
- from transformers import AutoModelForCausalLM, BitsAndBytesConfig
74
-
75
- q8_config = BitsAndBytesConfig(load_in_8bit=True)
76
- model = AutoModelForCausalLM.from_pretrained(
77
- "nachikethreddyy/qwen3.5-8b-distilled",
78
- quantization_config=q8_config,
79
- device_map="auto"
80
- )
81
- tokenizer = AutoTokenizer.from_pretrained("nachikethreddyy/qwen3.5-8b-distilled")
82
- ```
83
-
84
- ---
85
-
86
- ### **MLX Format (Mac M1/M2/M3/M4)**
87
-
88
- ```python
89
- from mlx_lm import load, generate
90
-
91
- # Load from main repo (auto-downloads HF format)
92
- model, tokenizer = load("nachikethreddyy/qwen3.5-8b-distilled")
93
-
94
- response = generate(
95
- model,
96
- tokenizer,
97
- prompt="Write a Python function to",
98
- max_tokens=200,
99
- verbose=True
100
- )
101
- print(response)
102
- ```
103
-
104
- ---
105
 
106
- ### **GGUF Format (Ollama, llama.cpp, LM Studio)**
107
 
108
- #### Ollama
109
  ```bash
110
- ollama run nachikethreddyy/qwen3.5-8b-distilled:gguf
111
- # Or create a Modelfile pointing to gguf/qwen3-distilled-f16.gguf
112
  ```
113
 
114
- #### llama.cpp
115
  ```bash
116
- ./llama-cli -m gguf/qwen3-distilled-f16.gguf \
117
- -p "Write a Python function" \
118
- -n 200
 
 
119
  ```
120
 
121
- #### LM Studio (GUI)
122
  1. Download [LM Studio](https://lmstudio.ai)
123
- 2. Search: `nachikethreddyy/qwen3.5-8b-distilled`
124
- 3. Select the GGUF variant
125
- 4. Run!
126
-
127
- ---
128
-
129
- ## ๐Ÿ“Š Model Variants Comparison
130
-
131
- | Format | Size | Quantization | Location | Best For |
132
- |--------|------|--------------|----------|----------|
133
- | **HuggingFace (Root)** | 16.39 GB | Full Precision (BF16) | `model-*.safetensors` | Python, PyTorch, max quality |
134
- | **HuggingFace (Q8)** | 8.80 GB | INT8 (8-bit) | `variants/q8/` | Production, balanced |
135
- | **GGUF F16** | 16 GB | Float16 | `gguf/qwen3-distilled-f16.gguf` | Ollama, llama.cpp, LM Studio |
136
- | **MLX** | Native | Optimized | Auto-loaded | Apple Silicon (fastest) |
137
-
138
- ---
139
 
140
- ## ๐Ÿ’ป Hardware Requirements
141
-
142
- | Setup | CPU RAM | GPU VRAM | Recommended |
143
- |-------|---------|----------|-------------|
144
- | Full Precision | 24GB+ | 16GB+ | High-end GPU, research |
145
- | Q8 Quantized | 12GB+ | 8GB+ | **Production (recommended)** |
146
- | MLX (Mac) | 8GB+ | Shared | **MacBook M1+ (best Mac option)** |
147
- | GGUF | 8GB+ | 4-8GB+ | Local inference, CPU-friendly |
148
-
149
- ---
150
-
151
- ## ๐Ÿ“š Model Details
152
-
153
- ### Architecture
154
- - **Model Type:** Qwen3 (Transformer-based)
155
- - **Base Model:** Qwen/Qwen3-8B
156
- - **Parameters:** 8 billion
157
- - **Hidden Size:** 4,096
158
- - **Attention Heads:** 32
159
- - **Layers:** 36
160
- - **Vocab Size:** 151,669 tokens
161
- - **Max Context:** 131,072 tokens
162
-
163
- ### Training
164
- - **Method:** LoRA Fine-tuning (r=16, alpha=32)
165
- - **Data:** 256 curated coding/engineering examples
166
- - **Validation:** 33 examples
167
- - **Framework:** MLX (Apple Silicon optimized)
168
- - **Max Sequence:** 1536 tokens
169
- - **Iterations:** 1600 (~3-4 epochs)
170
- - **Training Time:** ~5 hours on Mac M4 Pro
171
-
172
- ---
173
-
174
- ## ๐ŸŽฏ Use Cases
175
-
176
- โœ… Code generation (Python, JavaScript, TypeScript)
177
- โœ… Technical documentation and tutorials
178
- โœ… Software architecture discussions
179
- โœ… Algorithm explanations
180
- โœ… Code review and debugging
181
- โœ… AI/LLM concept explanations
182
-
183
- ---
184
-
185
- ## โš ๏ธ Limitations
186
-
187
- - **Optimized for technical tasks:** May underperform on general conversation
188
- - **Context trained on 1536 tokens:** Can extrapolate but with degraded performance
189
- - **Potential hallucinations:** Like all LLMs, may generate plausible-sounding but incorrect code
190
- - **Knowledge cutoff:** Limited to Qwen3-8B base model knowledge
191
- - **May reflect training data biases**
192
-
193
- ---
194
-
195
- ## ๐Ÿ”ง Advanced Usage
196
-
197
- ### vLLM (Production Serving)
198
- ```bash
199
- python -m vllm.entrypoints.openai_api_server \
200
- --model nachikethreddyy/qwen3.5-8b-distilled \
201
- --quantization bitsandbytes
202
- ```
203
-
204
- ### Further Fine-tuning
205
  ```python
206
- from peft import LoraConfig, get_peft_model
207
- from transformers import AutoModelForCausalLM
208
-
209
- base_model = AutoModelForCausalLM.from_pretrained(
210
- "nachikethreddyy/qwen3.5-8b-distilled"
211
- )
212
 
213
- config = LoraConfig(
214
- r=8,
215
- lora_alpha=16,
216
- target_modules=["q_proj", "v_proj"]
217
  )
218
-
219
- model = get_peft_model(base_model, config)
220
  ```
221
 
222
- ---
 
 
 
 
 
223
 
224
  ## ๐Ÿ“„ License
225
-
226
  Apache 2.0 (inherited from Qwen/Qwen3-8B)
227
 
228
  ---
229
-
230
- ## ๐Ÿ™ Acknowledgments
231
-
232
- - **Base Model:** [Qwen Team](https://huggingface.co/Qwen)
233
- - **Fine-tuning:** MLX Framework
234
- - **Inference Frameworks:** Transformers, Ollama, llama.cpp, LM Studio
235
-
236
- ---
237
-
238
- ## ๐Ÿ“ž Support
239
-
240
- - **Model Page:** https://huggingface.co/nachikethreddyy/qwen3.5-8b-distilled
241
- - **Discussions:** Open a discussion on the model page
242
- - **Issues:** Report bugs or request features
243
-
244
- ---
245
-
246
- **Last Updated:** June 19, 2024
247
- **Status:** Production Ready โœ…
 
7
  tags:
8
  - text-generation
9
  - fine-tune
 
10
  - coding
 
 
 
11
  - gguf
12
+ - llama.cpp
13
+ - ollama
14
+ - lm-studio
15
  pipeline_tag: text-generation
16
  inference: true
17
  model_creator: nachikethreddyy
18
  ---
19
 
20
+ # Qwen3.5-8B Distilled - GGUF Format
21
 
22
+ Fine-tuned **Qwen3.5-8B** for software engineering & coding tasks. **GGUF-optimized** version for local inference.
23
 
24
+ ## ๐Ÿ“ฆ What's Included
25
 
26
+ | Variant | Size | Format | Best For |
27
+ |---------|------|--------|----------|
28
+ | **Full Precision (BF16)** | 16.39 GB | Safetensors | Maximum quality, research |
29
+ | **Q8 Quantized** | 8.8 GB | Safetensors | Balanced speed/quality |
30
+ | **GGUF F16** | 15.3 GB | GGUF | Ollama, llama.cpp, LM Studio |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ ## ๐Ÿš€ Quick Start
33
 
34
+ ### Ollama
35
  ```bash
36
+ ollama run nachikethreddyy/qwen3.5-8b-distilled-GGUF:F16
 
37
  ```
38
 
39
+ ### llama.cpp
40
  ```bash
41
+ # Install
42
+ brew install llama.cpp
43
+
44
+ # Run
45
+ llama-cli -hf nachikethreddyy/qwen3.5-8b-distilled-GGUF:F16
46
  ```
47
 
48
+ ### LM Studio
49
  1. Download [LM Studio](https://lmstudio.ai)
50
+ 2. Search: `nachikethreddyy/qwen3.5-8b-distilled-GGUF`
51
+ 3. Download & run!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
+ ### Transformers (Full/Q8)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ```python
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
 
 
 
 
 
56
 
57
+ model = AutoModelForCausalLM.from_pretrained(
58
+ "nachikethreddyy/qwen3.5-8b-distilled-GGUF",
59
+ device_map="auto"
 
60
  )
 
 
61
  ```
62
 
63
+ ## ๐Ÿ“Š Training Details
64
+ - **Base:** Qwen/Qwen3-8B
65
+ - **Method:** LoRA Fine-tuning (r=16, alpha=32)
66
+ - **Data:** 256 coding examples
67
+ - **Framework:** MLX
68
+ - **Iterations:** 1600
69
 
70
  ## ๐Ÿ“„ License
 
71
  Apache 2.0 (inherited from Qwen/Qwen3-8B)
72
 
73
  ---
74
+ **For MLX/Apple Silicon:** See [qwen3.5-8b-distilled-MLX](https://huggingface.co/nachikethreddyy/qwen3.5-8b-distilled-MLX)