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.
👋 Getting started
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 :
Dedicated exactly for bash only operation : The model generates nothing other than bash commands, bash definitions and explanations, which shift its focus to only that specific task.
Near perfect command results : Near perfect answers for the commands he is mainly trained for (check the datasets).
Blazingly fast performance : Due to it being bash specific, all the performance goes for only this task, which generate fast no matter how complex the command is (check the testing samples).
🧪 Testing samples :
prompt
answer
i want to store the first 10 running processes in the running processes list, in a file called 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.
📊 Datasets used :
datasetter458/diverse-bash-dataset : this is the biggest dataset the model is trained on in comparison with
the other small ones, containing most of the standard bash command set.
datasetter458/bash-reference-manual-general-QAs : a dataset of Q&As, made from the bash reference manual book, containing most (if not all) of the commands, flags and definitions of terms in the book.
👩💻 Code example :
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
python
1conversation =[2{"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.
3 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."""},4{"role":"user","content":"how to list the contents of the directory 'abc/'"}5]67tokens_str = tokenizer.apply_chat_template(8 conversation,9 add_generation_prompt=True,10 tokenize=False11)1213model_inputs = tokenizer(tokens_str, return_tensors="pt").to(model.device)1415with torch.no_grad():16 output = model.generate(17**model_inputs,18 max_new_tokens=3276819)2021output_ids = output[0][len(model_inputs.input_ids[0]):].tolist()2223# parsing thinking content24try:25# rindex finding 151668 (</think>)26 index =len(output_ids)- output_ids[::-1].index(151668)27except ValueError:28 index =02930thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")31content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")32print(content)
Citation :
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}
}