Instructions to use AuricErgeson/shellwhiz-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AuricErgeson/shellwhiz-7b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AuricErgeson/shellwhiz-7b", filename="Qwen2.5-7B-Instruct.Q4_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 AuricErgeson/shellwhiz-7b 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 AuricErgeson/shellwhiz-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf AuricErgeson/shellwhiz-7b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AuricErgeson/shellwhiz-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf AuricErgeson/shellwhiz-7b: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 AuricErgeson/shellwhiz-7b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AuricErgeson/shellwhiz-7b: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 AuricErgeson/shellwhiz-7b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AuricErgeson/shellwhiz-7b:Q4_K_M
Use Docker
docker model run hf.co/AuricErgeson/shellwhiz-7b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AuricErgeson/shellwhiz-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AuricErgeson/shellwhiz-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AuricErgeson/shellwhiz-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AuricErgeson/shellwhiz-7b:Q4_K_M
- Ollama
How to use AuricErgeson/shellwhiz-7b with Ollama:
ollama run hf.co/AuricErgeson/shellwhiz-7b:Q4_K_M
- Unsloth Studio
How to use AuricErgeson/shellwhiz-7b 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 AuricErgeson/shellwhiz-7b 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 AuricErgeson/shellwhiz-7b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AuricErgeson/shellwhiz-7b to start chatting
- Pi
How to use AuricErgeson/shellwhiz-7b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AuricErgeson/shellwhiz-7b: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": "AuricErgeson/shellwhiz-7b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use AuricErgeson/shellwhiz-7b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AuricErgeson/shellwhiz-7b: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 AuricErgeson/shellwhiz-7b:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use AuricErgeson/shellwhiz-7b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AuricErgeson/shellwhiz-7b: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 "AuricErgeson/shellwhiz-7b: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"
- Docker Model Runner
How to use AuricErgeson/shellwhiz-7b with Docker Model Runner:
docker model run hf.co/AuricErgeson/shellwhiz-7b:Q4_K_M
- Lemonade
How to use AuricErgeson/shellwhiz-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AuricErgeson/shellwhiz-7b:Q4_K_M
Run and chat with the model
lemonade run user.shellwhiz-7b-Q4_K_M
List all available models
lemonade list
ShellWhiz-7B
A fine-tune of Qwen2.5-7B-Instruct that turns a plain-English request into a shell command. Type what you want to do, get back find, grep, docker, git, or whatever fits.
Why this exists
I wanted something I could actually type "show me the 5 biggest files in this folder" into and get a working du/sort/head pipeline back, instead of half-remembering the flags myself. There are commercial tools that do this (Warp, some IDE plugins), but I couldn't find a small open model that just did the one thing well, so I built one.
What it's good at
Trained on 697 natural-language-to-shell-command pairs covering:
- File and directory operations (
find,cp,mv,rm,chmod,du) - Text processing (
grep,sed,awk,sort,cut) - Git workflows
- Docker and docker-compose
- Process management (
ps,kill,systemctl) - Networking (
curl,ssh,scp,ping) - Archiving and package management (
tar,zip,apt,pip,npm)
Examples
These are from the actual post-training sanity check, not cherry-picked from the training set:
> find all python files modified in the last 24 hours
find <directory> -name '*.py' -mtime -1
> show me the 5 largest files in this directory
find . -type f -exec du -h {} + | sort -rh | head -5
> list all running docker containers
docker ps
The <directory> placeholder is intentional. The model was trained to use placeholders where a real path would depend on context, rather than guessing one.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "AuricErgeson/shellwhiz-7b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
system_msg = "You are a helpful assistant that converts natural language requests into precise shell commands. Respond with ONLY the shell command, no explanation."
messages = [
{"role": "system", "content": system_msg},
{"role": "user", "content": "find all files larger than 100MB"},
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=100, temperature=0.1)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
A GGUF (q4_k_m) build is also available in this repo if you want to run it locally through Ollama or llama.cpp.
Training details
- Base model: Qwen2.5-7B-Instruct
- Method: QLoRA (4-bit), rank 16, alpha 16, no dropout
- Trainable parameters: 40,370,176 of 7,655,986,688 (0.53 percent)
- Hardware: single T4 GPU, Google Colab free tier
- Epochs: 3, 264 total steps, effective batch size 8
- Training time: about 17 minutes
Loss dropped from 2.96 at step 10 to 0.18 by the end of training and flattened out around step 190, with no spikes or divergence:
| Step | Loss |
|---|---|
| 10 | 2.960 |
| 50 | 0.391 |
| 100 | 0.268 |
| 150 | 0.258 |
| 200 | 0.188 |
| 260 | 0.188 |
Evaluation
I ran the model against 105 held-out prompts it never saw during training, phrased differently from the training set on purpose to test generalization rather than recall. Each output was judged by Claude against a known-correct reference command, allowing for different-but-equivalent approaches (there's rarely only one right way to write a shell command).
| Verdict | Count | Percent |
|---|---|---|
| Correct | 58 | 55.2% |
| Partial (right idea, has a bug) | 26 | 24.8% |
| Wrong | 21 | 20.0% |
Syntax validity (does bash -n parse it without error) came out at 100/105, or 95.2 percent.
The five syntax failures were almost all cases where the model left a bracketed placeholder like
<filename> or <output_file> in a spot where bash needs an actual token, which reads as a
formatting habit rather than the model not understanding the command it's building.
The wrong and partial cases cluster into a few recognizable patterns, worth knowing before you rely on this for anything important:
- Hallucinated flags. A couple of failures invented flags that don't exist on the real tool
(
docker images --sort,pkill --exclude). These would fail immediately with an error, so at least they're not silently wrong. - Negation and inversion. When a prompt asks for something to be turned off or a filter to be the inverse of the obvious reading, the model sometimes gets the polarity backwards (e.g. batch mode requested off, model turns it on).
- Dropped constraints on multi-part requests. Given an instruction with two or three requirements stacked together (filter by host AND connection state, auto-remove AND port map), the model sometimes satisfies one and quietly drops another.
- Leftover placeholders when a real value was given. A few outputs used
<image_name>:<tag>style placeholders even when the prompt spelled out a concrete value likenginx:latest.
None of this is surprising for 700 training examples on a 7B model, but it's worth knowing which categories to double check rather than trusting blindly.
Dataset
The training data is published separately at AuricErgeson/text-to-shell-dataset, generated synthetically and deduplicated on instruction text.
- Downloads last month
- 539