sollamon commited on
Commit
37cdf38
Β·
verified Β·
1 Parent(s): 2d49116

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +183 -0
README.md CHANGED
@@ -1,3 +1,186 @@
1
  ---
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ - code
5
  license: apache-2.0
6
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
+ base_model: Qwen/Qwen2.5-Coder-0.5B-Base
9
+ tags:
10
+ - code
11
+ - python
12
+ - code-generation
13
+ - text-generation
14
+ - qwen2.5
15
+ - qwen
16
+ - llama.cpp
17
+ - gguf
18
+ - unsloth
19
+ - qlora
20
+ - lora
21
+ - small-models
22
+ - edge-ai
23
+ - local-ai
24
+ - minsore
25
+ - ukrainian
26
+ - experimental
27
+ - 0.5b
28
+ - generation
29
+ model-index:
30
+ - name: Quill Gen 1
31
+ results:
32
+ - task:
33
+ type: text-generation
34
+ name: Code Generation
35
+ dataset:
36
+ type: openai_humaneval
37
+ name: HumanEval@50
38
+ metrics:
39
+ - type: pass@1
40
+ value: 80.0
41
+ name: Pass@1
42
  ---
43
+
44
+ # 🟒 Quill Gen 1
45
+
46
+ Lightweight Python code generation model built on Qwen2.5-Coder-0.5B.
47
+
48
+ Quill Gen 1 is a 0.5B parameter experimental model for generating Python functions from natural-language descriptions. It is the younger sibling of Pepper 1 Preview β€” same task, one third the size. Trained as an experiment in small-model code generation, it reaches 80% on HumanEval@50 while running comfortably on consumer hardware.
49
+
50
+ > ⚠️ **This is NOT a FIM model.** Quill Gen 1 cannot do fill-in-the-middle completion. For autocomplete use [Quill 1 Preview](https://huggingface.co/Minsore/quill-1-preview).
51
+
52
+ Part of the Minsore family Β· minsore.com
53
+
54
+ ## ✨ Highlights
55
+
56
+ - 🧠 **Instruction-tuned** β€” writes Python functions from plain descriptions
57
+ - πŸ“¦ **Tiny** β€” 0.5B params, ~400 MB in Q4_K_M
58
+ - 🎯 **Purpose-built** β€” code generation only, not chat, not FIM
59
+ - ⚑ **Fast** β€” designed for low-VRAM setups
60
+ - πŸ§ͺ **Experimental** β€” a proof of concept for small-model generation
61
+ - πŸ†“ Apache 2.0 β€” same license as base model
62
+
63
+ ## πŸ“Š Benchmarks
64
+
65
+ ![Quill Gen comparison](assets/quill_gen_1_benchmarks.png)
66
+
67
+ Evaluated against 0.5B–1.5B code models. All runs used `temperature=0.0`, `max_tokens=512`, `--chat-template none`.
68
+
69
+ | Benchmark | Quill Gen 1 | Pepper 1 Preview | Quill 1 Preview | Qwen2.5-Coder 0.5B |
70
+ |---|---|---|---|---|
71
+ | HumanEval@50 | **80.0%** | 82.0% | 54.0% | 52.0% |
72
+ | HumanEval-Infilling (EditSim) | 0.161 | β€” | **0.423** | 0.045 |
73
+ | HumanEval-Infilling (Exact Match) | 0% | β€” | **16%** | 0% |
74
+ | Delulu FIM (EditSim) | 0.048 | β€” | **0.318** | 0.035 |
75
+
76
+ > πŸ“Œ **Key insight:** Quill Gen 1 reaches **80% HumanEval@50** β€” nearly matching Pepper 1 Preview (82%) at **one third the parameter count**. On FIM-specific tasks it underperforms significantly, which is expected: this model was trained for generation, not autocomplete.
77
+
78
+ ## πŸš€ Quick Start
79
+
80
+ ### llama.cpp
81
+
82
+ ```bash
83
+ llama-server -m quill-gen-1.Q4_K_M.gguf \
84
+ --port 8080 \
85
+ -ngl 99 \
86
+ -c 768 \
87
+ --chat-template none
88
+ ```
89
+
90
+ **Requirements:** any GPU with β‰₯2 GB VRAM (full offload), or partial CPU offload as fallback.
91
+
92
+ ### Request
93
+
94
+ ```bash
95
+ curl http://localhost:8080/completion \
96
+ -H "Content-Type: application/json" \
97
+ -d '{
98
+ "prompt": "### Instruction:\nWrite a Python function that checks if a number is prime.\n\n### Response:\n",
99
+ "n_predict": 256,
100
+ "temperature": 0.0
101
+ }'
102
+ ```
103
+
104
+ ### Python
105
+
106
+ ```python
107
+ import requests
108
+
109
+ def generate(instruction, max_tokens=256):
110
+ prompt = f"### Instruction:\n{instruction}\n\n### Response:\n"
111
+ r = requests.post("http://localhost:8080/completion", json={
112
+ "prompt": prompt,
113
+ "n_predict": max_tokens,
114
+ "temperature": 0.0,
115
+ "stop": ["### Instruction:", "<|endoftext|>"],
116
+ })
117
+ return r.json()["content"]
118
+
119
+ print(generate("Write a Python function that reverses a string."))
120
+ # β†’ def reverse_string(s):
121
+ # return s[::-1]
122
+ ```
123
+
124
+ ## βš™οΈ Recommended Settings
125
+
126
+ | Parameter | Value | Notes |
127
+ |---|---|---|
128
+ | `--chat-template` | `none` | Required. Quill Gen 1 is not a chat model |
129
+ | `n_predict` | 128–256 | Works best on short completions |
130
+ | `temperature` | `0.0` | Deterministic; use `0.2` for variation |
131
+ | `repeat_penalty` | `1.1` | Prevents repetition |
132
+ | `-c` | `768` | Matches training context length |
133
+
134
+ ## ⚠️ Limitations
135
+
136
+ - **Generation only** β€” does not support fill-in-the-middle, tool calling, or chat
137
+ - **Python-only** β€” trained exclusively on Python code
138
+ - **Small context** β€” 768 tokens; long files are truncated
139
+ - **Weak on FIM** β€” EditSim 0.16, Exact Match 0% (use Quill 1 instead)
140
+ - **Occasional over-explanation** β€” may include comments when only code is requested
141
+ - **Number looping** β€” may repeat large integers on some prompts (use `repeat_penalty=1.1`)
142
+
143
+ ## 🧬 Training Details
144
+
145
+ | | |
146
+ |---|---|
147
+ | Base model | Qwen2.5-Coder-0.5B-Base |
148
+ | Method | QLoRA (r=16, Ξ±=16) |
149
+ | Data | FIM-converted Python instruction data |
150
+ | Epochs | 1 |
151
+ | Context | 768 tokens |
152
+ | Optimizer | `paged_adamw_8bit` |
153
+
154
+ ## πŸ“ Files
155
+
156
+ | File | Size | Description |
157
+ |---|---|---|
158
+ | `quill-gen-1.Q4_K_M.gguf` | ~400 MB | Ready to use (recommended) |
159
+ | `quill-gen-1-f16.gguf` | ~1 GB | Full precision GGUF |
160
+ | `lora/` | ~35 MB | LoRA adapter for fine-tuning |
161
+
162
+ ## πŸ—ΊοΈ Roadmap
163
+
164
+ - **Quill 2** β€” FIM autocomplete, fixed suffix handling, JS/TS/Rust support
165
+ - **Pepper 2** β€” improved MBPP and LiveCodeBench
166
+ - **Symphony** β€” flagship agentic code model (3B MoE)
167
+
168
+ ## πŸ“œ License
169
+
170
+ Apache 2.0 β€” same as the base Qwen2.5-Coder-0.5B model.
171
+
172
+ ## πŸ™ Credits
173
+
174
+ - Base model: [Qwen2.5-Coder-0.5B-Base](https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B-Base) by Alibaba Cloud
175
+ - Training framework: Unsloth
176
+ - Inference: llama.cpp
177
+
178
+ ## πŸ“¬ Contact
179
+
180
+ Minsore β€” Ukrainian AI lab building open language models.
181
+
182
+ - 🌐 [minsore.com](https://minsore.com)
183
+ - πŸ€— [huggingface.co/Minsore](https://huggingface.co/Minsore)
184
+ - πŸ’¬ Built by [@Sollamon](https://huggingface.co/Sollamon)
185
+
186
+ ⭐ If Quill Gen 1 is useful, star the repo and share your results.