Instructions to use Strangefrost/CloneOllama-selfplay-coder-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Strangefrost/CloneOllama-selfplay-coder-0.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Strangefrost/CloneOllama-selfplay-coder-0.5B") model = AutoModelForCausalLM.from_pretrained("Strangefrost/CloneOllama-selfplay-coder-0.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Strangefrost/CloneOllama-selfplay-coder-0.5B", filename="selfplay-coder-0.5B-Q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B 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 Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0 # Run inference directly in the terminal: llama cli -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0 # Run inference directly in the terminal: llama cli -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
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 Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
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 Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
Use Docker
docker model run hf.co/Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
- LM Studio
- Jan
- vLLM
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Strangefrost/CloneOllama-selfplay-coder-0.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Strangefrost/CloneOllama-selfplay-coder-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
- SGLang
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B 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 "Strangefrost/CloneOllama-selfplay-coder-0.5B" \ --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": "Strangefrost/CloneOllama-selfplay-coder-0.5B", "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 "Strangefrost/CloneOllama-selfplay-coder-0.5B" \ --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": "Strangefrost/CloneOllama-selfplay-coder-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Ollama:
ollama run hf.co/Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
- Unsloth Studio
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Strangefrost/CloneOllama-selfplay-coder-0.5B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Strangefrost/CloneOllama-selfplay-coder-0.5B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Strangefrost/CloneOllama-selfplay-coder-0.5B to start chatting
- Pi
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
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 Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Docker Model Runner:
docker model run hf.co/Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
- Lemonade
How to use Strangefrost/CloneOllama-selfplay-coder-0.5B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Strangefrost/CloneOllama-selfplay-coder-0.5B:Q8_0
Run and chat with the model
lemonade run user.CloneOllama-selfplay-coder-0.5B-Q8_0
List all available models
lemonade list
CloneOllama Self-Play Coder 0.5B
A coding-focused fine-tune of Qwen2.5-Coder-0.5B, trained via self-play reinforcement learning using 4 LLM judges and DeepSeek API evaluation. Trained on an AMD Radeon RX 9070 XT (ROCm 7.2) as part of the CloneOllama project.
Training Method: Self-Play
prompt → Student (Qwen2.5-Coder-0.5B) → generates code
→ Fast Python syntax scorer (1ms)
→ DeepSeek API reasoning judge (~3s)
→ Score ≥ 5.5 → LoRA rank 16 fine-tune
- 500 rounds, 397 accepted (79% acceptance rate)
- Scores improved: 5.3 → 5.5 / 10 over training
- Training data: Generated live by the student model, no human labeling
- Prompts: Python coding, C# coding, algorithms, CS theory
Benchmarks (RX 9070 XT, Vulkan)
| Metric | Value |
|---|---|
| Prompt speed | 619 tokens/s |
| Generation speed | 540 tokens/s |
| Model size | 506 MB (Q8_0 GGUF) / 942 MB (FP16 safetensors) |
Code Quality
| Prompt | Output |
|---|---|
def is_palindrome(s): |
s = s.lower().replace(" ", ""); return s == s[::-1] ✅ |
def fibonacci(n): |
n = int(n); return [1, n] |
def reverse_list(arr): |
def reverse(arr, size): arr = [1,2,3,4,5] |
def binary_search(arr, target): |
Partial structure |
Judges Used During Training
| Judge Model | Format | Gen Speed |
|---|---|---|
| DeepSeek-Coder-V2 16B | Q4_K_M GGUF | 221 t/s |
| VibeThinker-3B | Q6_K GGUF | 177 t/s |
| gemma4-coding | Q4_K_M GGUF | 56 t/s |
| Qwen2.5-Coder-7B | i1-Q4_K_M GGUF | 120 t/s |
All judges ran concurrently as llama-server instances on different ports.
Files
| File | Size | Format |
|---|---|---|
selfplay-coder-0.5B-Q8_0.gguf |
531 MB | GGUF Q8_0 (llama.cpp) |
model.safetensors |
942 MB | HuggingFace safetensors |
config.json |
— | Model config |
tokenizer.json |
11.4 MB | Qwen2.5 tokenizer |
Usage
llama.cpp / Ollama
llama-server -m selfplay-coder-0.5B-Q8_0.gguf -ngl 99 --port 8080
Transformers (Python)
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Strangefrost/CloneOllama-selfplay-coder-0.5B")
tokenizer = AutoTokenizer.from_pretrained("Strangefrost/CloneOllama-selfplay-coder-0.5B")
prompt = "def fibonacci(n):"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0]))
Training Pipeline
Full pipeline scripts at model-kitchen/:
| Script | Purpose |
|---|---|
selfplay_train.py |
Multi-judge self-play training |
prune.py |
Structured pruning + PEFT LoRA |
train_utils.py |
LoRA, distillation, calibration |
merge.py |
SLERP / TIES / DARE merging |
upcycle.py |
Dense → MoE conversion |
Acknowledgments
- Base model: Qwen/Qwen2.5-Coder-0.5B
- Training platform: CloneOllama on AMD Radeon RX 9070 XT (ROCm 7.2)
- Judge models: DeepSeek-Coder-V2, VibeThinker, gemma4-coding, Qwen2.5-Coder-7B
- Downloads last month
- 61