datasetter458/bash-reference-manual-general-QAs
Viewer β’ Updated β’ 1.28k β’ 20
How to use datasetter458/termius-minimal-1.0 with PEFT:
Task type is invalid.
A model with an objective of making as much as possible of the bash operations in a small and manageable size with good performance.
To understand what the model is actually good at generating, check out the datasets used to train him.
pip install peft torch unsloth
Unsloth will already make patches for transformers, pyarrow, ..., and the
get_peft_model()
What this model is actually good at :
| prompt | answer |
|---|---|
| i want to store the first 10 running processes in the running processes list, in a file called abc.txt | ps -e -o user,comm,etime,cpu,cmd --sort=cpu --limit=10 > abc.txt |
| how to add a new user named 'abc' to the system, ensuring he get all the permissions of a sudoer ? | useradd -m -s /bin/bash abc |
| how to make a directory named 'abc' in a specific path without changing directory, in the following path 'n1/n2/abc' ? | mkdir -p n1/n2/abc |
| how to copy all the files of 'abc/def/*' recursively to a new destination 'hij/klm/' and without asking for confirmation ? | cp -r abc/def/* hij/klm |
| how to remove any file starting with 'a', 'b', or 'c' from the path 'aaa/' | find aaa/ -name 'a*' -type f -delete |
this model was trained and tested using unsloth, 4bit quantization and a Tesla T4.
Which is mostly the same code used for Qwen3-1.7B inference.
Important : When testing or fine-tuning this model, make sure it is loaded in 4bits, using unsloth's FastLanguageModel
conversation = [
{"role" : "system", "content" : """you are an AI assistant specialized in bash, make your answers longer, and if the user is asking for a command, then directly give it as simplified as possible.
IMPORTANT : the only set of commands you're only supposed to answer with are the following and no other : echo, cat, cd, rm, mkdir, top, free, du, df, ps, head, tail, grep, cp, cut, sort, touch, ls, groupadd, ifconfig, ip, ln, ping, scp, ssh, sudo, systemctl, tar, useradd, userdel, usermod, wc."""},
{"role" : "user", "content" : "how to list the contents of the directory 'abc/'"}
]
tokens_str = tokenizer.apply_chat_template(
conversation,
add_generation_prompt=True,
tokenize=False
)
model_inputs = tokenizer(tokens_str, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**model_inputs,
max_new_tokens=32768
)
output_ids = output[0][len(model_inputs.input_ids[0]):].tolist()
# parsing thinking content
try:
# rindex finding 151668 (</think>)
index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
index = 0
thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
print(content)
Use this citation β€π
@misc{termius-minimal-1.0,
author = {datasetter458},
title = {termius-minimal-1.0},
year = {2026},
url = {https://huggingface.co/datasetter458/termius-minimal-1.0}
}