Text Generation
Transformers
Safetensors
English
lfm2
lfm2.5
kali-linux
terminal-executor
tool-calling
function-calling
executor
cybersecurity
penetration-testing
conversational
Eval Results (legacy)
Instructions to use iselabvn/Kali-Terminus-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iselabvn/Kali-Terminus-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iselabvn/Kali-Terminus-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iselabvn/Kali-Terminus-v2") model = AutoModelForCausalLM.from_pretrained("iselabvn/Kali-Terminus-v2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use iselabvn/Kali-Terminus-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iselabvn/Kali-Terminus-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iselabvn/Kali-Terminus-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/iselabvn/Kali-Terminus-v2
- SGLang
How to use iselabvn/Kali-Terminus-v2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "iselabvn/Kali-Terminus-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iselabvn/Kali-Terminus-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "iselabvn/Kali-Terminus-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iselabvn/Kali-Terminus-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use iselabvn/Kali-Terminus-v2 with Docker Model Runner:
docker model run hf.co/iselabvn/Kali-Terminus-v2
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -27,19 +27,19 @@ model-index:
|
|
| 27 |
type: custom
|
| 28 |
metrics:
|
| 29 |
- type: strict_pass_rate
|
| 30 |
-
value:
|
| 31 |
name: Strict Pass Rate
|
| 32 |
- type: tool_call_parse_rate
|
| 33 |
value: 100.0
|
| 34 |
name: Tool Call Parse Rate
|
| 35 |
- type: semantic_command_accuracy
|
| 36 |
-
value:
|
| 37 |
name: Semantic Command Accuracy
|
| 38 |
---
|
| 39 |
|
| 40 |
# Kali-Terminus-v2
|
| 41 |
|
| 42 |
-
**Kali-Terminus-v2** is a fine-tuned [LFM2.5-350M](https://huggingface.co/LiquidAI/LFM2.5-350M-Base) model specialized for Kali Linux terminal command execution. It converts natural language instructions into precise shell commands with
|
| 43 |
|
| 44 |
This is the **Executor Agent** in a multi-agent penetration-testing system — it translates one bounded instruction into one structured terminal action.
|
| 45 |
|
|
@@ -62,10 +62,10 @@ Evaluated across 5 scenarios (26 turns) covering network recon, system enumerati
|
|
| 62 |
|
| 63 |
| Metric | Score |
|
| 64 |
|---|---|
|
| 65 |
-
| **Strict Pass Rate** | **
|
| 66 |
| Tool Call Parse Rate | 100.0% |
|
| 67 |
| Exactly One Tool Call | 100.0% |
|
| 68 |
-
| Semantic Command Accuracy |
|
| 69 |
|
| 70 |
### Comparison with V1
|
| 71 |
|
|
@@ -73,7 +73,7 @@ Evaluated across 5 scenarios (26 turns) covering network recon, system enumerati
|
|
| 73 |
|---|---|---|
|
| 74 |
| Kali-Terminus-v1 (FunctionGemma-270M) | 65.8% | — |
|
| 75 |
| Kali-Terminus-v1 (LFM2.5-350M) | 50.0% | — |
|
| 76 |
-
| **Kali-Terminus-v2** | **
|
| 77 |
|
| 78 |
## Dataset
|
| 79 |
|
|
@@ -113,9 +113,29 @@ inputs = tokenizer.apply_chat_template(
|
|
| 113 |
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 114 |
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)
|
| 115 |
print(response)
|
| 116 |
-
# Expected: <
|
| 117 |
```
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
## Intended Use
|
| 120 |
|
| 121 |
- **Executor Agent** in multi-agent penetration-testing systems
|
|
|
|
| 27 |
type: custom
|
| 28 |
metrics:
|
| 29 |
- type: strict_pass_rate
|
| 30 |
+
value: 92.31
|
| 31 |
name: Strict Pass Rate
|
| 32 |
- type: tool_call_parse_rate
|
| 33 |
value: 100.0
|
| 34 |
name: Tool Call Parse Rate
|
| 35 |
- type: semantic_command_accuracy
|
| 36 |
+
value: 92.31
|
| 37 |
name: Semantic Command Accuracy
|
| 38 |
---
|
| 39 |
|
| 40 |
# Kali-Terminus-v2
|
| 41 |
|
| 42 |
+
**Kali-Terminus-v2** is a fine-tuned [LFM2.5-350M](https://huggingface.co/LiquidAI/LFM2.5-350M-Base) model specialized for Kali Linux terminal command execution. It converts natural language instructions into precise shell commands with native LFM2.5 `<|tool_call_start|>`/`<|tool_call_end|>` JSON tool calls.
|
| 43 |
|
| 44 |
This is the **Executor Agent** in a multi-agent penetration-testing system — it translates one bounded instruction into one structured terminal action.
|
| 45 |
|
|
|
|
| 62 |
|
| 63 |
| Metric | Score |
|
| 64 |
|---|---|
|
| 65 |
+
| **Strict Pass Rate** | **92.31%** |
|
| 66 |
| Tool Call Parse Rate | 100.0% |
|
| 67 |
| Exactly One Tool Call | 100.0% |
|
| 68 |
+
| Semantic Command Accuracy | 92.31% |
|
| 69 |
|
| 70 |
### Comparison with V1
|
| 71 |
|
|
|
|
| 73 |
|---|---|---|
|
| 74 |
| Kali-Terminus-v1 (FunctionGemma-270M) | 65.8% | — |
|
| 75 |
| Kali-Terminus-v1 (LFM2.5-350M) | 50.0% | — |
|
| 76 |
+
| **Kali-Terminus-v2** | **92.31%** | **+42.3 pp over v1 LFM2.5** |
|
| 77 |
|
| 78 |
## Dataset
|
| 79 |
|
|
|
|
| 113 |
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 114 |
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)
|
| 115 |
print(response)
|
| 116 |
+
# Expected: <|tool_call_start|>{"name": "exec", "arguments": {"command": "nmap -p 80 192.168.1.1"}}<|tool_call_end|>
|
| 117 |
```
|
| 118 |
|
| 119 |
+
## Tool Call Format
|
| 120 |
+
|
| 121 |
+
Kali-Terminus-v2 produces native **LFM2.5 tool calls** wrapped in `<|tool_call_start|>` and `<|tool_call_end|>` tokens, output as JSON:
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
<|tool_call_start|>{"name": "exec", "arguments": {"command": "nmap -p 80 192.168.1.1"}}<|tool_call_end|>
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
A system instruction `Output function calls as JSON.` is prepended so the model emits JSON rather than the default Pythonic calls.
|
| 128 |
+
|
| 129 |
+
## Tool Call Format
|
| 130 |
+
|
| 131 |
+
Kali-Terminus-v2 produces native **LFM2.5 tool calls** wrapped in `<|tool_call_start|>` and `<|tool_call_end|>` tokens, output as JSON:
|
| 132 |
+
|
| 133 |
+
```
|
| 134 |
+
<|tool_call_start|>{"name": "exec", "arguments": {"command": "nmap -p 80 192.168.1.1"}}<|tool_call_end|>
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
A system instruction `Output function calls as JSON.` is prepended so the model emits JSON rather than the default Pythonic calls.
|
| 138 |
+
|
| 139 |
## Intended Use
|
| 140 |
|
| 141 |
- **Executor Agent** in multi-agent penetration-testing systems
|