File size: 5,320 Bytes
3b6a367
ff4c025
 
 
3b6a367
ff4c025
 
 
 
 
 
 
 
 
 
 
3b6a367
ff4c025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd6ab75
 
ff4c025
 
 
 
 
 
 
bd6ab75
 
 
ff4c025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
language:
  - en
  - code
license: apache-2.0
library_name: llama.cpp
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
tags:
  - code
  - code-assistant
  - instruction-following
  - python
  - qwen2.5-coder
  - minsore
  - gguf
pipeline_tag: text-generation
---

# 🌢️ Pepper 1 Preview

**Lightweight instruction-following code assistant for Python, built on Qwen2.5-Coder-1.5B.**

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.

> Part of the **Minsore** family Β· [minsore.com](https://minsore.com)

---

## ✨ Highlights

- 🧠 **Instruction-tuned** β€” writes functions from plain English descriptions
- 🐍 **Python-focused** β€” clean, idiomatic code without fluff
- ⚑ **Real-time** β€” designed for interactive use
- πŸ“¦ **Compact** β€” 1.5B params, ~1 GB in Q4_K_M
- 🎯 **Purpose-built** β€” trained for code generation, not chat
- πŸ†“ **Apache 2.0** β€” same license as base model

---

![Pepper comparison](assets/pepper_comparison.png)

## πŸ“Š Benchmarks

Evaluated against 1–1.5B code models. All runs used `temperature=0.0`, `max_tokens=512`, `--chat-template none`.

| Benchmark | Pepper 1 Preview | Base Qwen 1.5B | Llama-3.2-1B-Code | Yi-Coder-1.5B |
|---|---:|---:|---:|---:|
| **HumanEval@50** | **82.0%** | 75.0% | 64.0% | 24.0% |
| **MBPP@50** | 26.0% | 20.0% | 16.0% | 38.0% |
| **LiveCodeBench@30** | 20.0% | 30.0% | 10.0% | 26.7% |
| **BigCodeBench@30** | 23.3% | 23.3% | 13.3% | 30.0% |

> πŸ“Œ **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.

---

## πŸš€ Quick Start

### llama.cpp

```bash
llama-server -m pepper-1-preview.Q4_K_M.gguf \
  --port 8080 \
  -ngl 99 \
  -c 4096 \
  --chat-template chatml
```

**Requirements:** any GPU with β‰₯2 GB VRAM (full offload), or partial CPU offload as fallback.

### Chat request

```bash
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Write a Python function that checks if a number is prime."}
    ],
    "max_tokens": 512,
    "temperature": 0.0
  }'
```

### Python

```python
import requests

def ask(prompt, max_tokens=512):
    r = requests.post("http://localhost:8080/v1/chat/completions", json={
        "messages": [{"role": "user", "content": prompt}],
        "max_tokens": max_tokens,
        "temperature": 0.0,
    })
    return r.json()["choices"][0]["message"]["content"]

print(ask("Write a Python function that reverses a string."))
# β†’ def reverse_string(s: str) -> str:
#       return s[::-1]
```

---

## βš™οΈ Recommended Settings

| Parameter | Value | Notes |
|---|---|---|
| `--chat-template` | `chatml` | **Required.** Pepper expects ChatML. |
| `n_predict` | 256–1024 | 512 is a good default |
| `temperature` | 0.0 | Deterministic; use 0.2 for variation |
| `repeat_penalty` | 1.1 | Prevents repetition |
| `-c` | 4096 | Longer context available but degrades |

---

## ⚠️ Limitations

- **Python-only** β€” not trained on other languages
- **No FIM support** β€” for fill-in-the-middle tasks, use [Quill](https://huggingface.co/minsore/quill-1-preview)
- **Not an agent** β€” does not support tool calling or multi-step planning
- **Weak on algorithmic tasks** β€” LiveCodeBench score below base Qwen
- **4K inference context** β€” long files are truncated
- **Occasional over-explanation** β€” may include comments when only code is requested

---

## 🧬 Training Details

| | |
|---|---|
| **Base model** | Qwen2.5-Coder-1.5B-Instruct |
| **Method** | QLoRA fine-tuning on curated Python code data |
| **Context** | 4096 tokens (inference) |

---

## πŸ“ Files

| File | Size | Description |
|---|---:|---|
| `pepper-1-preview.Q4_K_M.gguf` | ~1 GB | Ready to use with `llama.cpp` |
| `model.safetensors` | ~3 GB | Full precision (transformers) |
| `config.json`, `tokenizer.json` | β€” | Config for transformers |

---

## πŸ—ΊοΈ Roadmap

- **Pepper 2** β€” improve MBPP and LiveCodeBench, add multi-language support
- **Quill 2** β€” extend FIM to JS/TS/Rust
- **Symphony** β€” flagship code model (3B)

---

## πŸ“œ License

Apache 2.0 β€” same as the base Qwen2.5-Coder-1.5B model.

---

## πŸ™ Credits

- Base model: [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) by Alibaba Cloud
- Training framework: [Unsloth](https://github.com/unslothai/unsloth)
- Inference: [llama.cpp](https://github.com/ggerganov/llama.cpp)

---

## πŸ“¬ Contact

**Minsore** β€” Ukrainian AI lab building open language models.

- 🌐 [minsore.com](https://minsore.com)
- πŸ€— [huggingface.co/Minsore](https://huggingface.co/minsore)
- πŸ’¬ Built by [@Sollamon](https://huggingface.co/Sollamon)

---

<div align="center">

**⭐ If Pepper is useful, star the repo and share your results.**

</div>