linux-admin-copilot-1.5b
Linux Command Generator for Administrators
2 min readupdated
The model turns English text prompts into ready-to-use and precise Linux terminal commands. It is based on the Qwen2.5-Coder-1.5B-Instruct architecture and contains 1.54 billion parameters, making it compact and fast for local running. The tool saves you from having to manually look up utility syntax in reference books and is great for developers, sysadmins, and those who frequently work in the command line.
Key features
- Compact size: 1.54 billion parameters allow running the model on modest hardware.
- Precise translation: turns simple phrases into one specific shell command without extra text.
- Trained on tldr: trained on data from the tldr-pages project to cover the most popular administrator tasks.
- Qwen foundation: built upon the efficient Qwen2.5-Coder language model.
What you can do
- Script integration: use the model in local pipelines to automate routine terminal tasks.
- Utility creation: embed the model into your own console assistant or chatbot for working with servers.
- Quick command search: generate complex syntax constructs for utilities like find or systemctl on the fly.
Example
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "omniscry/linux-admin-copilot-1.5b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
SYSTEM = "Translate the user's request into one Linux shell command. Output only the command."
msgs = [{ "role": "system", "content": SYSTEM },
{ "role": "user", "content": "show disk usage of /var" }]
enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**enc, max_new_tokens=64, do_sample=False)
print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
Read more
DetailsModel size: 1.54 billion parameters
Prompt language: English only (one command at a time)
License: Apache-2.0 for the model, training data under CC BY 4.0
Limitations: requires mandatory verification of commands before running due to the risk of destructive actions










Comments