Text Generation
Transformers
Safetensors
GGUF
English
qwen2
bash
shell
cli
terminal
nl2bash
code-generation
small-language-model
conversational
text-generation-inference
Instructions to use sahellx/kitty-bash-llm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sahellx/kitty-bash-llm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sahellx/kitty-bash-llm") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sahellx/kitty-bash-llm") model = AutoModelForCausalLM.from_pretrained("sahellx/kitty-bash-llm", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sahellx/kitty-bash-llm 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 sahellx/kitty-bash-llm:Q4_K_M # Run inference directly in the terminal: llama cli -hf sahellx/kitty-bash-llm:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sahellx/kitty-bash-llm:Q4_K_M # Run inference directly in the terminal: llama cli -hf sahellx/kitty-bash-llm: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 sahellx/kitty-bash-llm:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf sahellx/kitty-bash-llm: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 sahellx/kitty-bash-llm:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf sahellx/kitty-bash-llm:Q4_K_M
Use Docker
docker model run hf.co/sahellx/kitty-bash-llm:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use sahellx/kitty-bash-llm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sahellx/kitty-bash-llm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sahellx/kitty-bash-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sahellx/kitty-bash-llm:Q4_K_M
- SGLang
How to use sahellx/kitty-bash-llm 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 "sahellx/kitty-bash-llm" \ --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": "sahellx/kitty-bash-llm", "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 "sahellx/kitty-bash-llm" \ --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": "sahellx/kitty-bash-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use sahellx/kitty-bash-llm with Ollama:
ollama run hf.co/sahellx/kitty-bash-llm:Q4_K_M
- Unsloth Desktop
- Pi
How to use sahellx/kitty-bash-llm with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sahellx/kitty-bash-llm: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": "sahellx/kitty-bash-llm:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sahellx/kitty-bash-llm with Docker Model Runner:
docker model run hf.co/sahellx/kitty-bash-llm:Q4_K_M
- Lemonade
How to use sahellx/kitty-bash-llm with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sahellx/kitty-bash-llm:Q4_K_M
Run and chat with the model
lemonade run user.kitty-bash-llm-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use sahellx/kitty-bash-llm with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sahellx/kitty-bash-llm: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 sahellx/kitty-bash-llm:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sahellx/kitty-bash-llm with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sahellx/kitty-bash-llm: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 "sahellx/kitty-bash-llm: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"
Add peer comparison with methodology caveats
Browse files
README.md
CHANGED
|
@@ -151,6 +151,48 @@ variable is the fine-tuning. 100 examples per task.
|
|
| 151 |
> `--rm ubuntu` is not valid standalone bash); the meaningful figure is
|
| 152 |
> prefix + completion, at **99.29%**.
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
ShellCheck is used because `bash -n` only proves a command *parses*. ShellCheck
|
| 155 |
catches genuine defects — unquoted expansions (`SC2086`), word splitting
|
| 156 |
(`SC2046`) — that parse fine and then break on a filename with a space.
|
|
|
|
| 151 |
> `--rm ubuntu` is not valid standalone bash); the meaningful figure is
|
| 152 |
> prefix + completion, at **99.29%**.
|
| 153 |
|
| 154 |
+
### Comparison with other shell-focused models
|
| 155 |
+
|
| 156 |
+
Alongside the base-model comparison above, an **informal** benchmark was run against
|
| 157 |
+
four other publicly available fine-tunes for shell/linux command generation, all at
|
| 158 |
+
Q4_K_M (except where a repo ships only f16), through llama.cpp on the same 2-thread
|
| 159 |
+
CPU, using the same 80 held-out prompts.
|
| 160 |
+
|
| 161 |
+
| model | params | size | utility acc | token F1 | s/cmd |
|
| 162 |
+
|---|---|---|---|---|---|
|
| 163 |
+
| **Kitty Bash LLM** | **0.5B** | **398 MB** | **78.75** | **59.54** | **1.68** |
|
| 164 |
+
| `louisguthmann/qwen3.5-2b-shellcommand-linux` | 2.0B | 1274 MB | 63.75 | 32.02 | 15.39 |
|
| 165 |
+
| `vitali87/shell-commands-qwen2-1.5b-extended` | 1.5B | 3094 MB | 57.50 | 33.93 | 9.48 |
|
| 166 |
+
| `mecha-org/linux-command-generator-llama3.2-1b` | 1.0B | 808 MB | 52.50 | 34.21 | 2.78 |
|
| 167 |
+
| `chamibuddhika/linux-commands-0407-00` | — | 1709 MB | — | — | — |
|
| 168 |
+
|
| 169 |
+
> #### ⚠️ Please read this before citing the table
|
| 170 |
+
>
|
| 171 |
+
> **This is indicative, not a controlled evaluation.** Four specific caveats, all of
|
| 172 |
+
> which favour this model:
|
| 173 |
+
>
|
| 174 |
+
> 1. **The test set is drawn from this model's own training distribution.** The split
|
| 175 |
+
> is properly held out with zero leakage, but it comes from the same corpora and
|
| 176 |
+
> shares their formatting conventions. The other models never saw that style. This
|
| 177 |
+
> inflates exact match in particular, which is why exact match is omitted above.
|
| 178 |
+
> 2. **All models received *this* model's system prompt.** Peers trained with a
|
| 179 |
+
> different prompt format are being evaluated off-distribution, which alone could
|
| 180 |
+
> account for a large part of the gap.
|
| 181 |
+
> 3. **n = 80.** The 95% confidence interval is roughly ±9 points; the gap to the
|
| 182 |
+
> runner-up is significant only marginally (p ≈ 0.03).
|
| 183 |
+
> 4. **`chamibuddhika/linux-commands-0407-00` returned empty output for every prompt**
|
| 184 |
+
> and is reported as no-result rather than zero — the cause may well be the harness
|
| 185 |
+
> rather than the model. `qwen3.5-shellcommand` emits `</think>` reasoning tags that
|
| 186 |
+
> the harness did not strip, so its syntax-validity score was invalid and has been
|
| 187 |
+
> omitted here.
|
| 188 |
+
>
|
| 189 |
+
> A properly controlled comparison would use a neutral test set none of the models
|
| 190 |
+
> trained on, each model's own prompt format, and n ≥ 500. Treat the ordering above as
|
| 191 |
+
> a hint worth verifying, not a settled result.
|
| 192 |
+
>
|
| 193 |
+
> The **base-model comparison** in the previous section does not carry these caveats:
|
| 194 |
+
> same architecture, same data, same harness, only the fine-tuning differs.
|
| 195 |
+
|
| 196 |
ShellCheck is used because `bash -n` only proves a command *parses*. ShellCheck
|
| 197 |
catches genuine defects — unquoted expansions (`SC2086`), word splitting
|
| 198 |
(`SC2046`) — that parse fine and then break on a filename with a space.
|