Instructions to use albinab/Qwen-0.5B-Coder-El-Terminalo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="albinab/Qwen-0.5B-Coder-El-Terminalo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("albinab/Qwen-0.5B-Coder-El-Terminalo", dtype="auto") - llama-cpp-python
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="albinab/Qwen-0.5B-Coder-El-Terminalo", filename="Qwen-0.5B-Coder-El-Terminalo-q8.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo # Run inference directly in the terminal: llama-cli -hf albinab/Qwen-0.5B-Coder-El-Terminalo
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo # Run inference directly in the terminal: llama-cli -hf albinab/Qwen-0.5B-Coder-El-Terminalo
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 albinab/Qwen-0.5B-Coder-El-Terminalo # Run inference directly in the terminal: ./llama-cli -hf albinab/Qwen-0.5B-Coder-El-Terminalo
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 albinab/Qwen-0.5B-Coder-El-Terminalo # Run inference directly in the terminal: ./build/bin/llama-cli -hf albinab/Qwen-0.5B-Coder-El-Terminalo
Use Docker
docker model run hf.co/albinab/Qwen-0.5B-Coder-El-Terminalo
- LM Studio
- Jan
- vLLM
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "albinab/Qwen-0.5B-Coder-El-Terminalo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "albinab/Qwen-0.5B-Coder-El-Terminalo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/albinab/Qwen-0.5B-Coder-El-Terminalo
- SGLang
How to use albinab/Qwen-0.5B-Coder-El-Terminalo 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 "albinab/Qwen-0.5B-Coder-El-Terminalo" \ --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": "albinab/Qwen-0.5B-Coder-El-Terminalo", "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 "albinab/Qwen-0.5B-Coder-El-Terminalo" \ --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": "albinab/Qwen-0.5B-Coder-El-Terminalo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Ollama:
ollama run hf.co/albinab/Qwen-0.5B-Coder-El-Terminalo
- Unsloth Studio new
How to use albinab/Qwen-0.5B-Coder-El-Terminalo 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 albinab/Qwen-0.5B-Coder-El-Terminalo 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 albinab/Qwen-0.5B-Coder-El-Terminalo to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for albinab/Qwen-0.5B-Coder-El-Terminalo to start chatting
- Pi new
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo
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": "albinab/Qwen-0.5B-Coder-El-Terminalo" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo
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 albinab/Qwen-0.5B-Coder-El-Terminalo
Run Hermes
hermes
- Docker Model Runner
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Docker Model Runner:
docker model run hf.co/albinab/Qwen-0.5B-Coder-El-Terminalo
- Lemonade
How to use albinab/Qwen-0.5B-Coder-El-Terminalo with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull albinab/Qwen-0.5B-Coder-El-Terminalo
Run and chat with the model
lemonade run user.Qwen-0.5B-Coder-El-Terminalo-{{QUANT_TAG}}List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo# Run inference directly in the terminal:
llama-cli -hf albinab/Qwen-0.5B-Coder-El-TerminaloUse 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 albinab/Qwen-0.5B-Coder-El-Terminalo# Run inference directly in the terminal:
./llama-cli -hf albinab/Qwen-0.5B-Coder-El-TerminaloBuild 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 albinab/Qwen-0.5B-Coder-El-Terminalo# Run inference directly in the terminal:
./build/bin/llama-cli -hf albinab/Qwen-0.5B-Coder-El-TerminaloUse Docker
docker model run hf.co/albinab/Qwen-0.5B-Coder-El-TerminaloQwen-0.5B-Coder-El-Terminalo
A 0.5B parameter shell command generator fine-tuned from Qwen2.5-Coder-0.5B-Instruct using LoRA. It converts natural language queries into accurate shell commands for Linux and macOS.
Built for El Terminalo โ a GPU-accelerated terminal emulator for macOS.
What It Does
You type English โ it outputs a shell command. Nothing else. No explanations, no alternatives, no markdown.
Input: "list files ordered by size"
Output: ls -lhS
Input: "find all .log files modified in last 24 hours"
Output: find . -name '*.log' -mtime -1
Input: "kill process on port 8080"
Output: fuser -k 8080/tcp
Input: "get cluster events ordered by timestamp"
Output: kubectl get events --sort-by='.metadata.creationTimestamp'
Model Details
| Base Model | Qwen2.5-Coder-0.5B-Instruct |
| Method | LoRA (rank 32, alpha 64) |
| Training Data | 5,536 curated NLโcommand pairs |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Epochs | 4 |
| Learning Rate | 2e-4 (cosine scheduler) |
| Quantization | Q8_0 GGUF |
| File Size | ~500MB |
| RAM Usage | ~800MBโ1GB during inference |
| License | Apache 2.0 |
Command Coverage
Trained on 209 unique base commands across these categories:
| Category | Examples | Count |
|---|---|---|
| Git | git log, git stash, git rebase |
620 |
| Docker | docker ps, docker-compose up |
500 |
| Kubernetes | kubectl get, kubectl port-forward |
375 |
| File Operations | find, ls, tar, chmod |
551 |
| System Admin | systemctl, journalctl, ps, kill |
453 |
| Networking | curl, ssh, rsync, scp |
304 |
| Databases | psql, mysql, redis-cli |
256 |
| Package Management | apt, brew, npm, pip |
193 |
Supports both Linux (bash) and macOS (zsh) via context-aware system prompts.
Quick Start โ Ollama
1. Download the GGUF file from this repo
2. Create a Modelfile
FROM ./shell-cmd-qwen-0.5b-q8.gguf
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.1
PARAMETER top_p 0.9
SYSTEM """You are a shell command generator. OS: linux, Shell: bash, CWD: /home/user. Output ONLY the command."""
macOS users: Change the SYSTEM line to:
SYSTEM """You are a shell command generator. OS: macos, Shell: zsh, CWD: ~/. Output ONLY the command."""
3. Create and run
ollama create shell-cmd -f Modelfile
ollama run shell-cmd "compress the logs directory into a tar.gz"
# โ tar -czf logs.tar.gz logs/
Quick Start โ Python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"albinab/Qwen-0.5B-Coder-El-Terminalo",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("albinab/Qwen-0.5B-Coder-El-Terminalo")
messages = [
{"role": "system", "content": "You are a shell command generator. OS: linux, Shell: bash, CWD: /home/user. Output ONLY the command."},
{"role": "user", "content": "show running docker containers"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128, temperature=0.1, do_sample=True)
print(tokenizer.decode(output[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True))
# โ docker ps
Training
Fine-tuned using LLaMA Factory with LoRA on a Google Colab T4 GPU (~20 min training time).
Data Preparation
The training dataset went through extensive cleaning:
- 171 conflicting answers resolved (same question, different answers)
- 57 hardcoded values replaced with placeholders (leaked IPs, usernames)
- Typos corrected in user queries
- 8 missing patterns added (e.g.,
ls -lhSfor sort-by-size) - 63 exact duplicates removed
- Final: 5,536 clean examples with 90/10 train/eval split
Why LoRA over Full Fine-Tuning
Full parameter fine-tuning on a 0.5B model causes catastrophic forgetting โ the model loses its pretrained understanding of what CLI flags mean and memorizes surface patterns instead. LoRA keeps the base model frozen and trains small adapter layers on top, preserving the original knowledge while adding the new skill.
Limitations
- Outputs a single command per query. Multi-step pipelines or scripts are out of scope.
- May hallucinate flags for obscure or rarely-seen commands.
- Trained primarily on common DevOps/SRE commands โ niche tools may not be covered.
- The
REFUSEmechanism (for dangerous commands likerm -rf /) was trained on limited examples and should not be relied on as a safety layer.
Use with El Terminalo
This model powers the AI translation feature in El Terminalo, a modern GPU-accelerated terminal emulator for macOS built with Go + Wails + xterm.js. The model runs locally via Ollama โ no API keys, no cloud, no data leaving your machine.
Citation
@misc{qwen-0.5b-coder-el-terminalo,
author = {Albin},
title = {Qwen-0.5B-Coder-El-Terminalo: A Fine-Tuned Shell Command Generator},
year = {2026},
url = {https://huggingface.co/albinab/Qwen-0.5B-Coder-El-Terminalo},
note = {Fine-tuned from Qwen2.5-Coder-0.5B-Instruct using LoRA}
}
Acknowledgments
- Qwen Team for the base model
- LLaMA Factory for the training framework
- Ollama for local inference
- Downloads last month
- 404
We're not able to determine the quantization variants.
Model tree for albinab/Qwen-0.5B-Coder-El-Terminalo
Base model
Qwen/Qwen2.5-0.5B
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf albinab/Qwen-0.5B-Coder-El-Terminalo# Run inference directly in the terminal: llama-cli -hf albinab/Qwen-0.5B-Coder-El-Terminalo