⚠️ Read before use
This model suggests commands. It does not understand your system and can be wrong.
Always read a command before running it, especially anything with rm, dd, mkfs,
chmod, chown, sudo, or redirects (>). Never pipe its output straight into a shell.
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer repo = "omniscry/linux-admin-copilot-0.5b"tok = AutoTokenizer.from_pretrained(repo)model = AutoModelForCausalLM.from_pretrained(repo).eval() def ask(intent): ids = tok(f"Intent: {intent}\nCommand:", return_tensors="pt") out = model.generate(**ids, max_new_tokens=64, do_sample=False, repetition_penalty=1.2, pad_token_id=tok.eos_token_id) return tok.decode(out[0][ids.input_ids.shape[1]:], skip_special_tokens=True).split("\n")[0].strip() print(ask("show network connections"))
The prompt format matters: Intent: <text>\nCommand:. Runs on CPU (a few seconds per command).
Example outputs
Table with columns: Intent, Command| Intent | Command |
|---|
| show network connections | netstat -an | grep 'ESTABLISHED' |
| restart nginx | sudo systemctl restart nginx |
| add user john | useradd john |
| check memory | free -m |
| show disk usage | find / -name "*.txt" -exec du -sh {} \; ❌ (expected df -h) |
Uses
Intended: helping Linux users and admins recall common commands (files, processes,
networking, services, users, packages, disk and memory).
Out of scope: running commands automatically without human review; complex multi-step
scripts; security-critical or production automation; non-Linux shells (PowerShell, cmd).
Limitations
- Small model: good at common one-liners, weaker at long pipelines and rare tools.
- May pick a plausible but wrong command (see the disk usage example above).
- Training data skews toward
find/xargs style commands from NL2Bash.
- Not evaluated on a held-out benchmark yet.
Training
Data (~27K deduplicated intent → command pairs):
Format: Intent: <text>\nCommand: <command><eos>
Hyperparameters:
- Full fine-tune, causal LM objective
- 3 epochs total (2 + 1 extra epoch to learn end-of-sequence)
- Learning rate 5e-5, effective batch size 32 (8 × 4 gradient accumulation)
- Max sequence length 128, fp16 mixed precision, gradient checkpointing
- Final training loss ≈ 0.89
Hardware: 1× NVIDIA Tesla T4 , about 1.5 hours.
Citation
Please cite the source datasets, in particular:
@inproceedings{LinWZE2018:NL2Bash, author = {Xi Victoria Lin and Chenglong Wang and Luke Zettlemoyer and Michael D. Ernst}, title = {NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating System}, booktitle = {Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018)}, year = {2018}}
Omniscry, omniscry.com