Text Generation
Transformers
GGUF
English
German
code
coding
tool-calling
code-generation
eu-trained
dpo
sft
qlora
conversational
Instructions to use SimpleLLM/kode-14b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SimpleLLM/kode-14b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SimpleLLM/kode-14b-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SimpleLLM/kode-14b-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SimpleLLM/kode-14b-GGUF 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 SimpleLLM/kode-14b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SimpleLLM/kode-14b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf SimpleLLM/kode-14b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf SimpleLLM/kode-14b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/SimpleLLM/kode-14b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use SimpleLLM/kode-14b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SimpleLLM/kode-14b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimpleLLM/kode-14b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SimpleLLM/kode-14b-GGUF:Q4_K_M
- SGLang
How to use SimpleLLM/kode-14b-GGUF 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 "SimpleLLM/kode-14b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimpleLLM/kode-14b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "SimpleLLM/kode-14b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimpleLLM/kode-14b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use SimpleLLM/kode-14b-GGUF with Ollama:
ollama run hf.co/SimpleLLM/kode-14b-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use SimpleLLM/kode-14b-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SimpleLLM/kode-14b-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SimpleLLM/kode-14b-GGUF with Docker Model Runner:
docker model run hf.co/SimpleLLM/kode-14b-GGUF:Q4_K_M
- Lemonade
How to use SimpleLLM/kode-14b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SimpleLLM/kode-14b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.kode-14b-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SimpleLLM/kode-14b-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SimpleLLM/kode-14b-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SimpleLLM/kode-14b-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SimpleLLM/kode-14b-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "SimpleLLM/kode-14b-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- de
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
+
base_model:
|
| 8 |
+
- Qwen/Qwen2.5-Coder-14B
|
| 9 |
+
- Qwen/Qwen2.5-Coder-32B
|
| 10 |
+
tags:
|
| 11 |
+
- code
|
| 12 |
+
- coding
|
| 13 |
+
- tool-calling
|
| 14 |
+
- code-generation
|
| 15 |
+
- eu-trained
|
| 16 |
+
- dpo
|
| 17 |
+
- sft
|
| 18 |
+
- qlora
|
| 19 |
+
pipeline_tag: text-generation
|
| 20 |
+
model-index:
|
| 21 |
+
- name: Kode
|
| 22 |
+
results: []
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Kode β EU-Trained Coding Models
|
| 26 |
+
|
| 27 |
+
**Kode** is a family of instruction-tuned coding models built for real-world software engineering tasks. Fine-tuned on **Qwen2.5-Coder** using DPO + SFT with Claude-generated training samples on A100 GPUs.
|
| 28 |
+
|
| 29 |
+
Kode is the backbone of [Kode CLI](https://github.com/kevco/kode), an open-source local alternative to Claude Code.
|
| 30 |
+
|
| 31 |
+
| Model | Parameters | VRAM | Best For |
|
| 32 |
+
|-------|-----------|------|----------|
|
| 33 |
+
| **kode-14b** | 14B | ~10 GB (Q8) / ~9 GB (Q4) | Consumer GPUs, fast iteration |
|
| 34 |
+
| **kode-32b** | 32B | ~19 GB (Q4) | Maximum quality, production use |
|
| 35 |
+
|
| 36 |
+
## Key Features
|
| 37 |
+
|
| 38 |
+
- πͺπΊ **Trained in the EU** β DSGVO/GDPR compliant, no data leaves Europe
|
| 39 |
+
- π§ **Tool-calling native** β Trained specifically for file operations, shell commands, code search
|
| 40 |
+
- π― **Production code focus** β Training data from real codebases, not synthetic benchmarks
|
| 41 |
+
- π **7 languages** β Rust, Go, TypeScript, Python, C#, SQL, CSS/Tailwind
|
| 42 |
+
- π **Runs locally** β 14B fits on a single consumer GPU (RTX 3080+)
|
| 43 |
+
|
| 44 |
+
## Supported Languages & Tasks
|
| 45 |
+
|
| 46 |
+
### Languages
|
| 47 |
+
Rust β’ Go β’ TypeScript β’ Python β’ C# β’ PostgreSQL β’ CSS/Tailwind
|
| 48 |
+
|
| 49 |
+
### Tasks
|
| 50 |
+
- **Code generation** β Complete functions, modules, and files from natural language
|
| 51 |
+
- **Code refactoring** β Improve existing code structure and performance
|
| 52 |
+
- **Code review** β Identify bugs, security issues, and improvements
|
| 53 |
+
- **Tool calling** β File I/O, shell commands, grep/search (Kode CLI integration)
|
| 54 |
+
- **Code completion** β Context-aware completions
|
| 55 |
+
|
| 56 |
+
## Training Details
|
| 57 |
+
|
| 58 |
+
### Base Model
|
| 59 |
+
[Qwen2.5-Coder](https://huggingface.co/Qwen/Qwen2.5-Coder-32B) (14B and 32B variants)
|
| 60 |
+
|
| 61 |
+
### Training Pipeline
|
| 62 |
+
1. **SFT (Supervised Fine-Tuning)** β Claude-generated training samples across 7 languages (~841 curated queries covering data structures, async, error handling, APIs, testing, and more)
|
| 63 |
+
2. **DPO (Direct Preference Optimization)** β Preference pairs from Claude evaluations of model outputs
|
| 64 |
+
3. **Tool-call SFT** β Specialized training for tool-calling patterns (read_file, write_file, bash_execute, grep, etc.)
|
| 65 |
+
|
| 66 |
+
### Infrastructure
|
| 67 |
+
- **GPU:** NVIDIA A100 80GB (2Γ for 32B full fine-tune, 1Γ for QLoRA)
|
| 68 |
+
- **Framework:** Transformers + PEFT + TRL + Unsloth
|
| 69 |
+
- **LoRA config (32B):** r=64, alpha=128, dropout=0.05, targeting all attention + MLP projections
|
| 70 |
+
- **Precision:** bfloat16
|
| 71 |
+
- **Sequence length:** 4096 tokens
|
| 72 |
+
|
| 73 |
+
### Training Data
|
| 74 |
+
- ~841 curated training queries across 7 programming languages
|
| 75 |
+
- Claude-generated reference solutions (chosen) vs. local model outputs (rejected) for DPO
|
| 76 |
+
- Bilingual prompts (English + German)
|
| 77 |
+
|
| 78 |
+
## Usage
|
| 79 |
+
|
| 80 |
+
### Ollama (Recommended)
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
# Install and run
|
| 84 |
+
ollama pull simplellm/kode-14b
|
| 85 |
+
ollama run simplellm/kode-14b
|
| 86 |
+
|
| 87 |
+
# Or the larger model
|
| 88 |
+
ollama pull simplellm/kode-32b
|
| 89 |
+
ollama run simplellm/kode-32b
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
### Ollama API
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
curl http://localhost:11434/api/chat -d '{
|
| 96 |
+
"model": "simplellm/kode-14b",
|
| 97 |
+
"messages": [
|
| 98 |
+
{"role": "user", "content": "Write a Rust function to find prime numbers using the Sieve of Eratosthenes"}
|
| 99 |
+
]
|
| 100 |
+
}'
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
### π€ Transformers
|
| 104 |
+
|
| 105 |
+
```python
|
| 106 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 107 |
+
|
| 108 |
+
model_name = "simplellm/kode-14b"
|
| 109 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
| 110 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 111 |
+
model_name,
|
| 112 |
+
torch_dtype="auto",
|
| 113 |
+
device_map="auto",
|
| 114 |
+
trust_remote_code=True,
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
messages = [
|
| 118 |
+
{"role": "system", "content": "You are a coding assistant. Respond with clean, production-ready code."},
|
| 119 |
+
{"role": "user", "content": "Write a thread-safe LRU cache in Rust using Arc and Mutex"},
|
| 120 |
+
]
|
| 121 |
+
|
| 122 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 123 |
+
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
| 124 |
+
outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.7, top_p=0.9)
|
| 125 |
+
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
### llama.cpp
|
| 129 |
+
|
| 130 |
+
```bash
|
| 131 |
+
# Download GGUF
|
| 132 |
+
wget https://huggingface.co/simplellm/kode-14b-GGUF/resolve/main/kode-14b-Q8_0.gguf
|
| 133 |
+
|
| 134 |
+
# Run
|
| 135 |
+
./llama-cli -m kode-14b-Q8_0.gguf -p "Write a Go HTTP server with middleware" -n 1024
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
### Hosted Inference
|
| 139 |
+
|
| 140 |
+
Try Kode without downloading at **[SimpleLLM.eu](https://simplellm.eu)** β EU-hosted, GDPR-compliant inference API.
|
| 141 |
+
|
| 142 |
+
## Quantized Versions
|
| 143 |
+
|
| 144 |
+
| Variant | Size | Quality | Speed |
|
| 145 |
+
|---------|------|---------|-------|
|
| 146 |
+
| kode-14b (FP16) | ~28 GB | Baseline | Baseline |
|
| 147 |
+
| kode-14b-Q8 | ~15 GB | Near-lossless | ~1.2Γ faster |
|
| 148 |
+
| kode-14b (Q4) | ~9 GB | Good | ~1.5Γ faster |
|
| 149 |
+
| kode-32b (native/FP16) | ~64 GB | Best | Slowest |
|
| 150 |
+
| kode-32b-Q4 | ~19 GB | Very good | Fast |
|
| 151 |
+
|
| 152 |
+
## Benchmarks
|
| 153 |
+
|
| 154 |
+
> π§ **Coming soon** β We are running HumanEval, MBPP, MultiPL-E, and tool-calling benchmarks. Results will be published here.
|
| 155 |
+
|
| 156 |
+
| Benchmark | kode-14b | kode-32b | Qwen2.5-Coder-14B (base) |
|
| 157 |
+
|-----------|----------|----------|--------------------------|
|
| 158 |
+
| HumanEval | TBD | TBD | TBD |
|
| 159 |
+
| MBPP | TBD | TBD | TBD |
|
| 160 |
+
| MultiPL-E (Rust) | TBD | TBD | TBD |
|
| 161 |
+
| Tool-call accuracy | TBD | TBD | N/A |
|
| 162 |
+
|
| 163 |
+
## Limitations
|
| 164 |
+
|
| 165 |
+
- Optimized for the 7 supported languages; may underperform on others
|
| 166 |
+
- 4096 token context window (inherited from training config)
|
| 167 |
+
- Tool-calling format is specific to Kode CLI's tool schema
|
| 168 |
+
- Training data is bilingual (EN/DE) β other languages may have reduced quality
|
| 169 |
+
|
| 170 |
+
## License
|
| 171 |
+
|
| 172 |
+
Apache 2.0 (inherited from [Qwen2.5-Coder](https://huggingface.co/Qwen/Qwen2.5-Coder-32B))
|
| 173 |
+
|
| 174 |
+
## Citation
|
| 175 |
+
|
| 176 |
+
```bibtex
|
| 177 |
+
@misc{kode2025,
|
| 178 |
+
title={Kode: EU-Trained Coding Models for Real-World Software Engineering},
|
| 179 |
+
author={Kevin and SimpleLLM Team},
|
| 180 |
+
year={2025},
|
| 181 |
+
url={https://huggingface.co/simplellm/kode-14b}
|
| 182 |
+
}
|
| 183 |
+
```
|
| 184 |
+
|
| 185 |
+
## Links
|
| 186 |
+
|
| 187 |
+
- π [SimpleLLM.eu](https://simplellm.eu) β Hosted inference
|
| 188 |
+
- π» [Kode CLI](https://github.com/kevco/kode) β Local coding assistant
|
| 189 |
+
- π€ [All models](https://huggingface.co/simplellm) β HuggingFace collection
|