CoolFace
Modelpublic

zombiegirlcz/kali-assistant-1.5b

sourceHugging Faceapache-2.0updated 13d agoView on Hugging Face
0likes82downloads
Model Card

Kali Assistant 1.5B

An on-device agent model fine-tuned from Qwen/Qwen2.5-1.5B-Instruct for the Android app Kali AI Assistant (com.kali.aiassistant) — the assistant that ships inside the kali_combined monorepo (NetHunter AI Operator, com.linux_core).

It maps Czech/English natural-language requests to the app's real tool calls: PRoot Linux commands, the NetHunter nh CLI, Android host checks, and native phone actions (open app, browser, dialer, SMS, media).

Tools

ToolPurpose
proot_execrun a command in the PRoot distro (Linux tools + nh CLI)
host_shellread-only Android host checks (pm list packages, getprop, ps, logcat)
get_battery / get_wifi / get_location / get_core_statusdevice state via the Binder bridge
open_applaunch an installed app by name or package
open_urlopen a URL in the browser
dialopen the dialer for a number or contact name
send_smssend an SMS (to, text)
play_mediastart media playback for a query
list_appslist installed apps (optional filter)

The schema is 1:1 with the app (ToolRegistry.kt / AndroidActions.kt), so the model can be plugged straight into the existing agent loop.

Training

  • —Base: Qwen2.5-1.5B-Instruct
  • —Method: LoRA (r=16, α=32, all attention + MLP projections), fp16, single T4
  • —Data: ~1.1k curated agent trajectories (Czech + English), generated deterministically from the app's real command surface and verified device outputs — see training/ in the monorepo
  • —Format: the tokenizer's own Qwen2.5 chat template (<tools>, <tool_call>, <tool_response>) — identical to what llama.cpp --jinja produces at inference; loss masked to assistant spans
  • —Output: merged fp16 model + GGUF (f16, Q4_K_M)

Results

Held-out tool-selection accuracy (14 prompts, greedy decoding, the exact llama.cpp/--jinja prompt):

ModelTool-name accuracy
kali-assistant-1.5b14/14 (100%)
Qwen2.5-1.5B-Instruct (base)9/14 (64%)

Best validation loss: 0.1521. The base model frequently invents nmcli/sudo/wrong distro or picks the wrong tool; the fine-tune stays on the app's real nh / native-action commands.

Usage

llama.cpp (recommended — native tool calling)

bash
llama-server \
  -m gguf/kali-assistant-Q4_K_M.gguf \
  --jinja --host 127.0.0.1 --port 8080 \
  -c 4096 -np 1 --n-gpu-layers 0

Then in the app: Settings → provider → Custom

FieldValue
Base URLhttp://127.0.0.1:8080/v1
API keylocal
Modelkali-assistant

Transformers

python
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("zombiegirlcz/kali-assistant-1.5b")
model = AutoModelForCausalLM.from_pretrained("zombiegirlcz/kali-assistant-1.5b")

Examples

"Zapni wifi"                -> proot_exec {"command": "nh network wifi on"}
"Kolik mám baterku?"        -> get_battery {}
"Na jaké jsem wifi?"        -> get_wifi {}
"Zavolej Mitty"             -> dial {"target": "Mitty"}
"Pošli SMS Mitty že jdu domů" -> send_sms {"to": "Mitty", "text": "Jdu domů"}
"Otevři Spotify"            -> open_app {"target": "Spotify"}
"Pust mi nějakou hudbu"     -> play_media {"query": "music"}
"Spusť nmap na 192.168.1.1" -> proot_exec {"command": "nmap -sV 192.168.1.1"}

Files

adapter/                     LoRA adapter (peft)
config.json, *.safetensors   merged fp16 model
gguf/kali-assistant-f16.gguf
gguf/kali-assistant-Q4_K_M.gguf   (~1 GB, ship this)
metrics.json, training_config.json

License

Apache-2.0 (inherited from the Qwen2.5-1.5B-Instruct base model).