Views
No views yet
sm "copy jpgs to backup" and a 270M model suggests a single bash command; press Enter to run it in your shell, e to edit, r to refine, c to cancel. This repo is the model behind it — a Gemma-3-270M fine-tuned to translate a short natural-language request into one bash command.Status: work-in-progress (pre-final checkpoint). The current weights were trained on the 30K qwen-distilled dataset. A combined dataset (emirkaan 6K + 30K qwen ≈ 36K) is the intended next checkpoint — see Training data and Evaluation.
$ sm "kill the process listening on port 8080"
> kill -9 $(lsof -t -i :8080)
[Enter] run [e] edit [r] refine [c] cancelsm UI always shows the command for review before it runs. It is not an autonomous agent.sm tool the model is served as a GGUF via llama.cpp (a pre-quantized ~250MB Q4_K_M GGUF is shipped; end users never need torch). With transformers:1from transformers import AutoModelForCausalLM, AutoTokenizer
2tok = AutoTokenizer.from_pretrained("ISB369/shellminator-270m-bash-distilled")
3model = AutoModelForCausalLM.from_pretrained("ISB369/shellminator-270m-bash-distilled")
4SYS = ("You are a helpful assistant that translates natural language to bash commands.\n"
5 "Context: cwd=/home/user, system=Linux x86_64, shell=bash.\n"
6 "Reply with a single bash command only. No explanation, no markdown fences.")
7msgs = [{"role":"system","content":SYS},
8 {"role":"user","content":"Generate single Bash command: list the 10 biggest files in cwd"}]
9out = model.generate(**tok.apply_chat_template(msgs, tokenize=True, return_tensors="pt"),
10 do_sample=False, max_new_tokens=128)
11print(tok.decode(out[0], skip_special_tokens=True).split("assistant\n")[-1].strip())do_sample=False / temperature=0) — the task is deterministic; sampling hurts it.micrictor/gemma-3-270m-it-ft-bash (Gemma-3 270M, instruction-tuned + bash fine-tune).SFTTrainer; fp16-AMP over fp32; 3 epochs; per-epoch held-out eval with load_best_model_at_end (ships the best-generalizing epoch, not the most-trained); effective batch 16; lr 1e-4, cosine. Trained on a free Google Colab T4.<image_soft_token> (id 262144) with no embedding row; training calls resize_token_embeddings(len(tokenizer)) so it gets a real trained embedding — otherwise the GGUF convert fails on the embedding-contract violation (max(token_id) < vocab_size).qwen3.5:397b-cloud via ollama /api/chat, think:false) generates varied natural-language requests, labels each with a single bash command, then filters with bash -n (syntax) + an LLM judge (correctness) and dedupes by (nl, cmd). 22 dev-tool categories: file ops, text processing, processes, networking, git (basic + advanced), docker, kubernetes, build tools, package managers, systemd, tmux, editing, cloud CLI, monitoring, permissions, disk, archives, ssh, system info, pipes/xargs, scheduling.ISB369/shellminator-bash-dataset — the 30K qwen-distilled (parts 000+001).ISB369/shellminator-bash-clean — 10K combined (emirkaan 6K + qwen 4K).ISB369/shellminator-bash-combined — 36K combined (emirkaan 6K + 30K qwen, deduped, bash -n-filtered). Intended for the final retrain.The current checkpoint was trained on the 30K qwen alone (no emirkaan). The combined-36K retrain adds emirkaan's "echo the user's literal, specific real command" style back — see Evaluation.
qwen3.5:397b-cloud, greedy) + bash -n validity. (Single-vote judging was too noisy; majority smooths the flip-flopping.)| checkpoint | data | correctness (judge 5x) | validity (bash -n) |
|---|---|---|---|
| Aug 11 | 10K clean (emirkaan + qwen 4K) | 12/25 (48%) | 100% |
| Aug 15 (current) | 30K qwen-only | 11/25 (44%) | 92% |
| next | 36K combined | TBD | TBD |
kubectl get pods -n production (previously a ps pipeline — the kubernetes category was absorbed); unzip backup.zip -d restore.ssh-copy-id user@remote_host instead of echoing the user's literal 192.168.1.10, and is sloppier on precise tasks. This is the data style > scale lesson — more coverage, but the style shift cost precision. The combined-36K retrain is designed to fix this (emirkaan restores literal-echoing while keeping the dev-tool coverage).awk with nested quotes, an unbalanced paren). The dataset has zero invalid-syntax labels, so these are 270M generation limits, not bad data. A bigger model or constrained decoding (llama.cpp GBNF grammars) is the fix there.rm/kill with wrong targets). Always review before running.sm tool is built so a command is never run without a human pressing Enter (shown for review; e to edit, c to cancel). Do not wire this model into an autonomous executor. Treat every suggestion as untrusted until you have read it.SFTTrainer on the combined dataset (HF_DATASET_REPO=ISB369/shellminator-bash-combined), Colab T4, the config above. Eval: train/eval.py (25 prompts, 5x majority judge). Generation pipeline: scripts/generate_dataset.py (teacher → NL → bash → bash -n + judge → dedup; resumable; HF upload). Merge: scripts/merge_combined.py.