sollamon commited on
Commit
ff4c025
Β·
verified Β·
1 Parent(s): 3b6a367

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +184 -0
README.md CHANGED
@@ -1,3 +1,187 @@
1
  ---
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ - code
5
  license: apache-2.0
6
+ library_name: llama.cpp
7
+ base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
8
+ tags:
9
+ - code
10
+ - code-assistant
11
+ - instruction-following
12
+ - python
13
+ - qwen2.5-coder
14
+ - minsore
15
+ - gguf
16
+ pipeline_tag: text-generation
17
  ---
18
+
19
+ # 🌢️ Pepper 1 Preview
20
+
21
+ **Lightweight instruction-following code assistant for Python, built on Qwen2.5-Coder-1.5B.**
22
+
23
+ Pepper is a 1.5B parameter code assistant designed for writing functions from natural-language descriptions. It runs on consumer hardware and is one of the few publicly available 1.5B models tuned specifically for instruction-following code generation.
24
+
25
+ > Part of the **Minsore** family Β· [minsore.com](https://minsore.com)
26
+
27
+ ---
28
+
29
+ ## ✨ Highlights
30
+
31
+ - 🧠 **Instruction-tuned** β€” writes functions from plain English descriptions
32
+ - 🐍 **Python-focused** β€” clean, idiomatic code without fluff
33
+ - ⚑ **Real-time** β€” designed for interactive use
34
+ - πŸ“¦ **Compact** β€” 1.5B params, ~1 GB in Q4_K_M
35
+ - 🎯 **Purpose-built** β€” trained for code generation, not chat
36
+ - πŸ†“ **Apache 2.0** β€” same license as base model
37
+
38
+ ---
39
+
40
+ ![Pepper comparison](assets/pepper_comparison.png)
41
+
42
+ ## πŸ“Š Benchmarks
43
+
44
+ Evaluated against 1–1.5B code models. All runs used `temperature=0.0`, `max_tokens=512`, `--chat-template none`.
45
+
46
+ | Benchmark | Pepper 1 Preview | Base Qwen 1.5B | Llama-3.2-1B-Code | Yi-Coder-1.5B |
47
+ |---|---:|---:|---:|---:|
48
+ | **HumanEval@50** | **82.0%** | 75.0% | 64.0% | 24.0% |
49
+ | **MBPP@50** | 26.0% | 20.0% | 16.0% | 38.0% |
50
+ | **LiveCodeBench@30** | 20.0% | 30.0% | 10.0% | 26.7% |
51
+ | **BigCodeBench@30** | 23.3% | 23.3% | 13.3% | 30.0% |
52
+
53
+ > πŸ“Œ **Key insight:** Pepper 1 Preview outperforms the base model on **HumanEval by +7 points** β€” the primary benchmark for instruction-following code generation. On MBPP, both models underperform the official numbers because this evaluation uses zero-shot prompting with `--chat-template none`. Yi-Coder tested without its native chat template β€” its HumanEval score reflects format mismatch, not model quality.
54
+
55
+ ---
56
+
57
+ ## πŸš€ Quick Start
58
+
59
+ ### llama.cpp
60
+
61
+ ```bash
62
+ llama-server -m pepper-1-preview.Q4_K_M.gguf \
63
+ --port 8080 \
64
+ -ngl 99 \
65
+ -c 4096 \
66
+ --chat-template chatml
67
+ ```
68
+
69
+ **Requirements:** any GPU with β‰₯2 GB VRAM (full offload), or partial CPU offload as fallback.
70
+
71
+ ### Chat request
72
+
73
+ ```bash
74
+ curl http://localhost:8080/v1/chat/completions \
75
+ -H "Content-Type: application/json" \
76
+ -d '{
77
+ "messages": [
78
+ {"role": "user", "content": "Write a Python function that checks if a number is prime."}
79
+ ],
80
+ "max_tokens": 512,
81
+ "temperature": 0.0
82
+ }'
83
+ ```
84
+
85
+ ### Python
86
+
87
+ ```python
88
+ import requests
89
+
90
+ def ask(prompt, max_tokens=512):
91
+ r = requests.post("http://localhost:8080/v1/chat/completions", json={
92
+ "messages": [{"role": "user", "content": prompt}],
93
+ "max_tokens": max_tokens,
94
+ "temperature": 0.0,
95
+ })
96
+ return r.json()["choices"][0]["message"]["content"]
97
+
98
+ print(ask("Write a Python function that reverses a string."))
99
+ # β†’ def reverse_string(s: str) -> str:
100
+ # return s[::-1]
101
+ ```
102
+
103
+ ---
104
+
105
+ ## βš™οΈ Recommended Settings
106
+
107
+ | Parameter | Value | Notes |
108
+ |---|---|---|
109
+ | `--chat-template` | `chatml` | **Required.** Pepper expects ChatML. |
110
+ | `n_predict` | 256–1024 | 512 is a good default |
111
+ | `temperature` | 0.0 | Deterministic; use 0.2 for variation |
112
+ | `repeat_penalty` | 1.1 | Prevents repetition |
113
+ | `-c` | 4096 | Longer context available but degrades |
114
+
115
+ ---
116
+
117
+ ## ⚠️ Limitations
118
+
119
+ - **Python-only** β€” not trained on other languages
120
+ - **No FIM support** β€” for fill-in-the-middle tasks, use [Quill](https://huggingface.co/minsore/quill-1-preview)
121
+ - **Not an agent** β€” does not support tool calling or multi-step planning
122
+ - **Weak on algorithmic tasks** β€” LiveCodeBench score below base Qwen
123
+ - **4K inference context** β€” long files are truncated
124
+ - **Occasional over-explanation** β€” may include comments when only code is requested
125
+
126
+ ---
127
+
128
+ ## 🧬 Training Details
129
+
130
+ | | |
131
+ |---|---|
132
+ | **Base model** | Qwen2.5-Coder-1.5B-Instruct |
133
+ | **Method** | QLoRA (r=16, Ξ±=16, LR=2e-5) |
134
+ | **Data** | CodeExercise-Python-27k, Tested-22k-Python-Alpaca, jinaai/code_exercises, Magicoder-OSS-Instruct-75K |
135
+ | **Epochs** | 1 |
136
+ | **Training context** | 1024 tokens |
137
+ | **Inference context** | 4096 tokens |
138
+
139
+ ---
140
+
141
+ ## πŸ“ Files
142
+
143
+ | File | Size | Description |
144
+ |---|---:|---|
145
+ | `pepper-1-preview.Q4_K_M.gguf` | ~1 GB | Ready to use (recommended) |
146
+ | `pepper-1-preview-f16.gguf` | ~3 GB | Full precision GGUF |
147
+ | `lora/` | ~50 MB | LoRA adapter for fine-tuning |
148
+
149
+ ---
150
+
151
+ ## πŸ—ΊοΈ Roadmap
152
+
153
+ - **Pepper 2** β€” improve MBPP and LiveCodeBench, add multi-language support
154
+ - **Quill 2** β€” extend FIM to JS/TS/Rust
155
+ - **Symphony** β€” flagship code model (3B)
156
+
157
+ ---
158
+
159
+ ## πŸ“œ License
160
+
161
+ Apache 2.0 β€” same as the base Qwen2.5-Coder-1.5B model.
162
+
163
+ ---
164
+
165
+ ## πŸ™ Credits
166
+
167
+ - Base model: [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) by Alibaba Cloud
168
+ - Training framework: [Unsloth](https://github.com/unslothai/unsloth)
169
+ - Inference: [llama.cpp](https://github.com/ggerganov/llama.cpp)
170
+
171
+ ---
172
+
173
+ ## πŸ“¬ Contact
174
+
175
+ **Minsore** β€” Ukrainian AI lab building open language models.
176
+
177
+ - 🌐 [minsore.com](https://minsore.com)
178
+ - πŸ€— [huggingface.co/Minsore](https://huggingface.co/minsore)
179
+ - πŸ’¬ Built by [@Sollamon](https://huggingface.co/Sollamon)
180
+
181
+ ---
182
+
183
+ <div align="center">
184
+
185
+ **⭐ If Pepper is useful, star the repo and share your results.**
186
+
187
+ </div>