Instructions to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf", filename="gpt-oss-20b-hermes.Q3_K_M.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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
Use Docker
docker model run hf.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_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": "fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
- Ollama
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with Ollama:
ollama run hf.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
- Unsloth Studio
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf 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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf 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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf to start chatting
- Pi
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
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": "fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_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 fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with Docker Model Runner:
docker model run hf.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
- Lemonade
How to use fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
Run and chat with the model
lemonade run user.gpt-oss-20b-hermes_agent-tool-finetune_gguf-Q4_K_M
List all available models
lemonade list
gpt-oss-20b Β· Hermes-Agent tool finetune Β· GGUF
GGUF quants for llama.cpp, Ollama, and LM Studio. Five quants shipped β pick by RAM budget.
- Format β GGUF
- Quants shipped β Q3_K_M, Q4_K_M, Q5_K_M, Q8_0, F16
- Recommended β Q4_K_M for 16 GB RAM, Q8_0 for quality
- Runtime β llama.cpp, Ollama, LM Studio, koboldcpp
What this is
A tool-use finetune of OpenAI's gpt-oss-20b for Hermes-Agent,
a local agent framework that needs models which call tools reliably, follow
multi-turn instructions, and don't argue with system prompts.
The base model is the 21B-parameter (3.6B active) Mixture-of-Experts release from OpenAI. This finetune preserves the Harmony chat template and the reasoning-effort knob, and improves:
- Function-calling adherence (correct JSON, no commentary mid-call)
- Long agent loops (10+ turns of tool β observe β plan)
- System-prompt fidelity (respects role boundaries and refusal/allow-list rules)
It is not affiliated with NousResearch's Hermes model series. "Hermes-Agent" here refers to the local agent framework only.
Files
| Quant | Size | Use case |
|---|---|---|
| Q3_K_M | ~10.0 GB | Tight RAM, lowest acceptable quality |
| Q4_K_M | ~12.5 GB | Best quality / size trade-off (default) |
| Q5_K_M | ~14.5 GB | Higher quality, modest size bump |
| Q8_0 | ~22 GB | Near-lossless |
| F16 | ~41 GB | Reference, no quantization |
(Sizes are approximate; check the file list for exact bytes.)
Quickstart
llama.cpp
./llama-server \
-hf fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M \
--port 1234 \
-c 8192 \
--jinja
Ollama
ollama run hf.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf:Q4_K_M
LM Studio
Search for fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf in the Discover tab and pick a quant. Enable
"Use Jinja chat template" in the model settings so Harmony renders correctly.
Hermes-Agent integration
Add a profile in ~/.hermes/config.yaml:
profiles:
gpt-oss-20b-tools:
provider: openai
base_url: http://127.0.0.1:1234/v1 # LM Studio / vLLM / mlx_lm.server
model: fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf
temperature: 0.7
top_p: 0.95
min_p: 0.1 # important for MoE stability
max_tokens: 8192
tool_choice: auto
Then hermes profile use gpt-oss-20b-tools and the agent loop will route
tool calls through this model.
Sampling
| Param | Value | Why |
|---|---|---|
| temperature | 0.7 | balanced; drop to 0.2 for strict tool calls |
| top_p | 0.95 | standard nucleus |
| min_p | 0.1 | required for MoE β prevents dead-expert tokens |
| repetition_penalty | 1.0 | the model handles repetition itself |
Harmony reasoning effort: set the system message to Reasoning: low|medium|high.
high is roughly 3-4x more output tokens but noticeably better on multi-step
tool plans.
Training
- Base:
openai/gpt-oss-20b - Method: LoRA SFT (rank 64, alpha 16) merged back into BF16
- Frame: Unsloth + TRL on a single H100 (80 GB)
- Data: ~42k tool-use traces from Hermes-Agent sessions, filtered for successful tool calls and clean JSON. No synthetic distillation.
- Length: 8192 tokens, packing on
- Loss: assistant-only, mask user/system/tool
The _16bit repo holds the merged BF16 weights. The _4bit, _mlx, and
_gguf repos are quantizations of that checkpoint.
Limitations
- Math and code-generation are unchanged from the base β this finetune optimizes the agent loop, not raw reasoning.
- The model can over-call tools when given vague instructions. Add a "if you can answer directly, do so" line to the system prompt.
- English only. Other languages were not in the training mix.
- Not safety-tuned beyond what
gpt-oss-20balready provides.
Other formats
- BF16 reference β full precision, vLLM / Transformers
- MXFP4 4-bit β fits a 16 GB GPU
- MLX β Apple Silicon native
- GGUF β llama.cpp / Ollama / LM Studio
License
Apache-2.0, inherited from the base model. No additional restrictions.
Citation
@misc{fesalfayed_gptoss20b_hermesagent_2025,
author = {Fayed, Fesal},
title = {gpt-oss-20b Hermes-Agent tool finetune (gguf)},
year = {2025},
url = {https://huggingface.co/fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf},
}
- Downloads last month
- 1,750
3-bit
4-bit
5-bit
8-bit
16-bit
Model tree for fesalfayed/gpt-oss-20b-hermes_agent-tool-finetune_gguf
Base model
openai/gpt-oss-20b