Instructions to use HattoriHanzo1/Leonidas-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use HattoriHanzo1/Leonidas-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HattoriHanzo1/Leonidas-4B-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": "HattoriHanzo1/Leonidas-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
- Ollama
How to use HattoriHanzo1/Leonidas-4B-GGUF with Ollama:
ollama run hf.co/HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use HattoriHanzo1/Leonidas-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HattoriHanzo1/Leonidas-4B-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": "HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HattoriHanzo1/Leonidas-4B-GGUF with Docker Model Runner:
docker model run hf.co/HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
- Lemonade
How to use HattoriHanzo1/Leonidas-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Leonidas-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-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 HattoriHanzo1/Leonidas-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HattoriHanzo1/Leonidas-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HattoriHanzo1/Leonidas-4B-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 "HattoriHanzo1/Leonidas-4B-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"
- Leonidas-4B
- Model Description
- Architecture
- Training
- Available Files
- Usage
- Compatible with any OpenAI-compatible frontend supporting GGUF + ChatML template.
### Recommended Parameters
temperature: 0.6 top_p: 0.95 top_k: 40 repetition_penalty: 1.05 - Capabilities
- Forge Stamp
- License
- Apache 2.0 — base model license from Qwen3.5-4B (Alibaba Cloud).
- Model Description
Leonidas-4B
"Come and take them." — Leonidas I, 480 BC
Few parameters. No retreat.
Trenuje modele z pasji i dla społeczności. Jeśli moja praca ułatwia Ci życie lub oszczędza czas, każda postawiona kawa pomaga w opłaceniu kolejnych treningów GPU! ☕👇
Model Description
Leonidas-4B is a fine-tuned Polish reasoning model built on the Qwen3.5-4B hybrid architecture (Mamba + Attention). It was trained using LoRA fp16 on a curated 48k Polish Chain-of-Thought dataset, with native <think> reasoning blocks.
Forged by Hattori Hanzo — because an idiot admires complexity, a genius admires simplicity.
"An idiot admires complexity, a genius admires simplicity." — Terry A. Davis, TempleOS
Architecture
| Property | Value |
|---|---|
| Base Model | Qwen3.5-4B (hybrid Mamba+Attention) |
| Parameters | ~4B |
| Training Method | LoRA fp16 (r=16, alpha=16) |
| Trainable params | 0.47% |
| Training Steps | 1500 |
| Final Loss | 0.4389 |
| Context Length | 32768 |
| Language | Polish 🇵🇱 + English |
Training
- Dataset: 48k Polish CoT (Chain-of-Thought) — mixed reasoning, math, logic, science
- Format: ChatML with native
<think>blocks - Platform: Kaggle T4 16GB
- Phases:
Phase Steps LR Scheduler 1 2000 2e-4 linear 2 3000 5e-5 cosine 3 5000 3e-5 cosine 4 5000 1e-5 cosine
Available Files
| File | Size | Description |
|---|---|---|
leonidas_f16.gguf |
8.41 GB | Full precision fp16 |
leonidas_Q8_0.gguf |
4.47 GB | Q8_0 — best quality |
leonidas_Q6_K.gguf |
3.45 GB | Q6_K — great quality |
leonidas_Q4_K_M.gguf |
2.70 GB | Q4_K_M — recommended for most setups |
Usage
llama.cpp
./llama-cli \
-m leonidas_Q4_K_M.gguf \
-p "Jesteś asystentem AI. Myśl krok po kroku." \
--chat-template chatml \
-n 1024
Ollama / OpenWebUI
Compatible with any OpenAI-compatible frontend supporting GGUF + ChatML template.
### Recommended Parameters
temperature: 0.6 top_p: 0.95 top_k: 40 repetition_penalty: 1.05
Capabilities
- ✅ Native Polish reasoning with
<think>CoT blocks - ✅ Mathematics and logic
- ✅ Scientific explanations
- ✅ Sentiment analysis
- ✅ Code generation (Python, basics)
- ✅ Quantum physics concepts
Forge Stamp
general.author: HattoriHanzo1
hanzo.base_model: Qwen3.5-4B
hanzo.leonidas: Τότε ἐν τῇ σκιᾷ μαχούμεθα
("Then we shall fight in the shade.")
License
Apache 2.0 — base model license from Qwen3.5-4B (Alibaba Cloud).
☕ Wsparcie Projektu
Stworzenie i dopracowanie tego modelu wymagało sporo czasu, testów i zasobów sprzętowych. Jeśli uznajesz go za użyteczny i chcesz wesprzeć dalszy rozwój otwartych projektów, możesz dorzucić swoją cegiełkę:
Dzieki za kazde wsparcie, widzimy sie przy kolejnych treningach! 🚀
Romani ite domum 😄 — Qapla'! ⚔️🖖
- Downloads last month
- 136
4-bit
6-bit
8-bit
16-bit