Text Generation
Transformers
Safetensors
GGUF
English
code
qwen2
python
code-generation
qwen2.5
qwen
llama.cpp
unsloth
qlora
lora
small-models
edge-ai
local-ai
minsore
ukrainian
experimental
0.5b
generation
Eval Results (legacy)
text-generation-inference
Instructions to use minsore/Quill-Gen-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minsore/Quill-Gen-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minsore/Quill-Gen-1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minsore/Quill-Gen-1") model = AutoModelForCausalLM.from_pretrained("minsore/Quill-Gen-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use minsore/Quill-Gen-1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf minsore/Quill-Gen-1:Q4_K_M # Run inference directly in the terminal: llama cli -hf minsore/Quill-Gen-1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf minsore/Quill-Gen-1:Q4_K_M # Run inference directly in the terminal: llama cli -hf minsore/Quill-Gen-1:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf minsore/Quill-Gen-1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf minsore/Quill-Gen-1:Q4_K_M
Use Docker
docker model run hf.co/minsore/Quill-Gen-1:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use minsore/Quill-Gen-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minsore/Quill-Gen-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minsore/Quill-Gen-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/minsore/Quill-Gen-1:Q4_K_M
- SGLang
How to use minsore/Quill-Gen-1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "minsore/Quill-Gen-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minsore/Quill-Gen-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "minsore/Quill-Gen-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minsore/Quill-Gen-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use minsore/Quill-Gen-1 with Ollama:
ollama run hf.co/minsore/Quill-Gen-1:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use minsore/Quill-Gen-1 with Docker Model Runner:
docker model run hf.co/minsore/Quill-Gen-1:Q4_K_M
- Lemonade
How to use minsore/Quill-Gen-1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull minsore/Quill-Gen-1:Q4_K_M
Run and chat with the model
lemonade run user.Quill-Gen-1-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,186 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+

|
| 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.
|