Kali-Terminus-v3 is a fine-tuned version of Qwen/Qwen3.5-0.8B-Base on the iselabvn/Kali-terminal-executor-v2 dataset. It is designed to generate accurate Kali Linux terminal commands from natural language instructions, with built-in reasoning via Qwen3.5's native thinking/ response tokens.
The model also outputs reasoning before tool calls using Qwen3.5's native thinking/ response tokens:
<|im_start|>assistant
thinking
The user wants to scan all 65535 ports. I'll use nmap with -p-.
response
<tool_call>
<function=exec>
<parameter=command>
nmap -p- 127.0.0.1
</parameter>
</function>
</tool_call><|im_end|>
Usage (Transformers)
python
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
34model_path ="iselabvn/Kali-Terminus-v3"5tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)6model = AutoModelForCausalLM.from_pretrained(7 model_path,8 torch_dtype=torch.bfloat16,9 device_map="auto",10 trust_remote_code=True,11)1213exec_tool =[{14"type":"function",15"function":{16"name":"exec",17"description":"Execute a shell command in the Kali Linux terminal.",18"parameters":{19"type":"object",20"properties":{"command":{"type":"string"}},21"required":["command"],22},23},24}]2526messages =[{"role":"user","content":"Scan all open ports on 127.0.0.1"}]27inputs = tokenizer.apply_chat_template(28 messages, tools=exec_tool, add_generation_prompt=True,29 enable_thinking=True, tokenize=True, return_dict=True, return_tensors="pt",30)31inputs ={k: v.to(model.device)for k, v in inputs.items()}3233with torch.no_grad():34 outputs = model.generate(**inputs, max_new_tokens=256, pad_token_id=tokenizer.eos_token_id)3536response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)37print(response)38# Expected: <|im_start|>assistant39# thinking40# I need to scan all ports...41# response42# 43# <tool_call>44# <function=exec>45# <parameter=command>46# nmap -p- 127.0.0.147# </parameter>48# </function>49# </tool_call><|im_end|>
Usage (llama.cpp GGUF)
The GGUF version is available at Kali-Terminus-v3-GGUF/kali-terminus-v3-bf16.gguf. Run with llama-server:
The model is specialized for Kali Linux terminal command generation and may not generalize well to other domains
Performance may vary with complex multi-step scenarios
The model uses Qwen3.5's native thinking/ response reasoning tokens; for optimal results, use enable_thinking=True in the generation config
Files
File
Size
Description
model.safetensors
1.4 GB
Merged model weights (bfloat16)
config.json
—
Model configuration (text-only, MTP disabled)
tokenizer_config.json
—
Tokenizer configuration with full chat template
chat_template.jinja
—
Qwen3.5 native chat template
Citation
If you use this model, please cite:
bibtex
1@misc{kali-terminus-v3,
2 title = {Kali-Terminus-v3: Fine-tuned Qwen3.5 for Kali Linux Terminal Command Generation},
3 author = {iselabvn},
4 year = {2026},
5}