ciphermosaic commited on
Commit
937171c
Β·
verified Β·
1 Parent(s): 696e2b8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +198 -12
README.md CHANGED
@@ -1,15 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: ByteBot
3
- emoji: πŸ’¬
4
- colorFrom: yellow
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 6.5.1
8
- app_file: app.py
9
- pinned: false
10
- hf_oauth: true
11
- hf_oauth_scopes:
12
- - inference-api
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ---
14
 
15
- An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
 
1
+ # πŸ€– Qwen Alpaca GGUF
2
+
3
+ A fine tuned **Qwen2.5-0.5B-Instruct** language model trained on the **tatsu-lab/alpaca** instruction dataset. The model was fine tuned using **Unsloth**, quantized to **GGUF (Q4_K_M)**, and can be run locally with **Ollama** or **llama.cpp**.
4
+
5
+ ---
6
+
7
+ ## πŸš€ Model Details
8
+
9
+ | Property | Value |
10
+ |----------|-------|
11
+ | Base Model | Qwen2.5-0.5B-Instruct |
12
+ | Fine Tuning | LoRA |
13
+ | Framework | Unsloth |
14
+ | Dataset | tatsu-lab/alpaca |
15
+ | Format | GGUF |
16
+ | Quantization | Q4_K_M |
17
+ | Inference | Ollama, llama.cpp |
18
+ | Language | English |
19
+
20
+ ---
21
+
22
+ ## ✨ Features
23
+
24
+ - Instruction following chatbot
25
+ - Lightweight 0.5B parameter model
26
+ - GGUF format for efficient CPU inference
27
+ - Optimized using Q4_K_M quantization
28
+ - Compatible with Ollama
29
+ - Compatible with llama.cpp
30
+ - Easy local deployment
31
+
32
+ ---
33
+
34
+ ## πŸ“¦ Model File
35
+
36
+ ```
37
+ Qwen2.5-0.5B-Instruct.Q4_K_M.gguf
38
+ ```
39
+
40
+ ---
41
+
42
+ # πŸ›  Fine Tuning Pipeline
43
+
44
+ ```
45
+ Base Model
46
+ β”‚
47
+ β–Ό
48
+ Qwen2.5-0.5B-Instruct
49
+ β”‚
50
+ β–Ό
51
+ Alpaca Instruction Dataset
52
+ β”‚
53
+ β–Ό
54
+ LoRA Fine Tuning
55
+ β”‚
56
+ β–Ό
57
+ Unsloth
58
+ β”‚
59
+ β–Ό
60
+ Merge LoRA Adapters
61
+ β”‚
62
+ β–Ό
63
+ GGUF Conversion
64
+ β”‚
65
+ β–Ό
66
+ Q4_K_M Quantization
67
+ β”‚
68
+ β–Ό
69
+ Inference using Ollama / llama.cpp
70
+ ```
71
+
72
+ ---
73
+
74
+ # πŸ“š Dataset
75
+
76
+ This model was fine tuned using the **tatsu-lab/alpaca** instruction dataset.
77
+
78
+ The dataset contains thousands of instruction and response pairs designed to improve instruction following ability.
79
+
80
+ ---
81
+
82
+ # ⚑ Run with Ollama
83
+
84
+ Create a Modelfile
85
+
86
+ ```text
87
+ FROM ./Qwen2.5-0.5B-Instruct.Q4_K_M.gguf
88
+ ```
89
+
90
+ Create the model
91
+
92
+ ```bash
93
+ ollama create fineqwen -f Modelfile
94
+ ```
95
+
96
+ Run the model
97
+
98
+ ```bash
99
+ ollama run fineqwen
100
+ ```
101
+
102
+ ---
103
+
104
+ # πŸ–₯ Example Terminal
105
+
106
+ ```text
107
+ $ ollama create fineqwen -f Modelfile
108
+
109
+ transferring model...
110
+ creating new layer...
111
+ writing manifest...
112
+ success
113
+
114
+ $ ollama run fineqwen
115
+
116
+ >>> Explain Transformers in simple words.
117
+
118
+ Transformers are neural networks designed to process sequences using
119
+ self-attention, allowing them to understand relationships between words
120
+ efficiently.
121
+ ```
122
+
123
+ ---
124
+
125
+ # πŸ¦™ Run using llama.cpp
126
+
127
+ ```bash
128
+ llama-cli \
129
+ -hf ciphermosaic/qwen-alpaca-gguf \
130
+ --jinja
131
+ ```
132
+
133
+ or
134
+
135
+ ```bash
136
+ llama-cli \
137
+ -m Qwen2.5-0.5B-Instruct.Q4_K_M.gguf
138
+ ```
139
+
140
  ---
141
+
142
+ # 🌐 Hugging Face Space
143
+
144
+ Interactive chatbot available on Hugging Face Spaces.
145
+
146
+ ---
147
+
148
+ # πŸ“Š Quantization
149
+
150
+ This model uses
151
+
152
+ ```
153
+ Q4_K_M
154
+ ```
155
+
156
+ Benefits
157
+
158
+ - Smaller model size
159
+ - Faster inference
160
+ - Lower RAM usage
161
+ - Minimal quality loss
162
+
163
+ ---
164
+
165
+ # 🧰 Tech Stack
166
+
167
+ - Python
168
+ - Hugging Face Transformers
169
+ - Unsloth
170
+ - PEFT (LoRA)
171
+ - GGUF
172
+ - llama.cpp
173
+ - Ollama
174
+ - Hugging Face Hub
175
+ - Gradio
176
+
177
+ ---
178
+
179
+ # πŸ“ Repository Structure
180
+
181
+ ```
182
+ .
183
+ β”œβ”€β”€ Modelfile
184
+ β”œβ”€β”€ Qwen2.5-0.5B-Instruct.Q4_K_M.gguf
185
+ β”œβ”€β”€ README.md
186
+ β”œβ”€β”€ config.json
187
+ ```
188
+
189
+ ---
190
+
191
+ # πŸ‘¨β€πŸ’» Author
192
+
193
+ **CipherMosaic**
194
+
195
+ GitHub: https://github.com/CipherMosaic
196
+
197
+ Hugging Face: https://huggingface.co/ciphermosaic
198
+
199
  ---
200
 
201
+ ## ⭐ If you found this project useful, consider giving it a star!