Instructions to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ajayk007/Qwen2.5-Coder-1.5B-Shellsmith") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - llama-cpp-python
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ajayk007/Qwen2.5-Coder-1.5B-Shellsmith", filename="shellsmith-1.5b-f16.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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16 # Run inference directly in the terminal: llama-cli -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16 # Run inference directly in the terminal: llama-cli -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16 # Run inference directly in the terminal: ./llama-cli -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
Use Docker
docker model run hf.co/ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
- LM Studio
- Jan
- vLLM
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
- Ollama
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with Ollama:
ollama run hf.co/ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
- Unsloth Studio
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith 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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith 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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ajayk007/Qwen2.5-Coder-1.5B-Shellsmith to start chatting
- Pi
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith"
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 ajayk007/Qwen2.5-Coder-1.5B-Shellsmith
Run Hermes
hermes
- Atomic Chat new
- MLX LM
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ajayk007/Qwen2.5-Coder-1.5B-Shellsmith", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with Docker Model Runner:
docker model run hf.co/ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
- Lemonade
How to use ajayk007/Qwen2.5-Coder-1.5B-Shellsmith with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ajayk007/Qwen2.5-Coder-1.5B-Shellsmith:F16
Run and chat with the model
lemonade run user.Qwen2.5-Coder-1.5B-Shellsmith-F16
List all available models
lemonade list
Qwen2.5-Coder-1.5B-Shellsmith
A small, fast model that turns plain-English instructions into a single shell
command for macOS/Linux. LoRA fine-tune of
Qwen/Qwen2.5-Coder-1.5B-Instruct,
trained and quantized end-to-end on an Apple Silicon Mac with
MLX.
"list files by size, biggest first" →
ls -lS"find files larger than 100 megabytes" →find . -type f -size +100M"create a gzip tar archive of src named src.tar.gz" →tar -czf src.tar.gz src
Results
Evaluated on a held-out test split the model never saw during training. Metrics are structural (no command execution) and conservative — see the eval rubric.
| Model | exact-match | command-match | flag-F1 |
|---|---|---|---|
| Base (Qwen2.5-Coder-1.5B-Instruct) | 71% | 83.9% | 89.2% |
| This model (LoRA) | 100% | 100% | 100% |
command-match = correct program and option-flag F1 ≥ 0.8.
What the 100% means (and doesn't): the test split holds out unseen phrasings, but the underlying task distribution (84 canonical tasks) overlaps with training. So this measures reliable in-distribution generalization across wording — the model consistently emits the canonical, idiomatic command (
git add -A,ls -lS,git log --oneline -5) where the base model drifts to looser variants (git add .,ls -lh | sort -rh,git log -5). It is not evidence of generalization to entirely novel tasks; broadening the task set is the obvious next step.
Usage
MLX (Apple Silicon)
pip install mlx-lm
mlx_lm.generate --model ajayk007/Qwen2.5-Coder-1.5B-Shellsmith \
--prompt "compress the logs folder into logs.tar.gz"
from mlx_lm import load, generate
model, tok = load("ajayk007/Qwen2.5-Coder-1.5B-Shellsmith")
messages = [
{"role": "system", "content": "You are a shell command generator for macOS/Linux. "
"Given a task in plain English, reply with a single safe shell command. "
"Output only the command on one line, no explanation, no markdown."},
{"role": "user", "content": "find all python files modified today"},
]
prompt = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
print(generate(model, tok, prompt=prompt, max_tokens=64))
GGUF (llama.cpp / Ollama / LM Studio)
A shellsmith-1.5b-f16.gguf file is included in this repo for use with llama.cpp-based runtimes.
Prompt format
Uses the Qwen chat template with the system prompt shown above. Keep the system prompt for best results.
Training
- Method: LoRA (rank 16), 16 layers, 400 iterations, batch size 4, lr 1e-4
- Hardware: Apple M5 Pro (48 GB), MLX
- Data:
ajayk007/shellsmith-commands— curated (instruction, command) pairs with paraphrase augmentation, 80/10/10 split.
Limitations & safety
- Generates commands across common categories (files, find/grep, archives, git, processes, networking). Outside this scope it falls back to base behavior.
- Always read a generated command before running it. It can produce
destructive commands (
rm,kill,chmod) if you ask for them. There is no sandbox or confirmation step. - Single-command only; it does not write multi-step scripts.
Related
Part of a series of focused "English → developer DSL" fine-tunes:
- Qwen2.5-Coder-7B-Querysmith — schema-grounded text-to-SQL.
License
Apache-2.0, inheriting from the base model.
- Downloads last month
- -
4-bit
Model tree for ajayk007/Qwen2.5-Coder-1.5B-Shellsmith
Base model
Qwen/Qwen2.5-1.5B