Run this model with HF Jobs
Run amarionfred/inkling-2-mini-cyber on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/amarionfred/inkling-2-mini-cyber. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/amarionfred/inkling-2-mini-cyber on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/amarionfred/inkling-2-mini-cyber. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use amarionfred/inkling-2-mini-cyber with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amarionfred/inkling-2-mini-cyber with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amarionfred/inkling-2-mini-cyber") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("amarionfred/inkling-2-mini-cyber") model = AutoModelForMultimodalLM.from_pretrained("amarionfred/inkling-2-mini-cyber", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amarionfred/inkling-2-mini-cyber with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amarionfred/inkling-2-mini-cyber" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amarionfred/inkling-2-mini-cyber", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amarionfred/inkling-2-mini-cyber
- SGLang
How to use amarionfred/inkling-2-mini-cyber 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 "amarionfred/inkling-2-mini-cyber" \ --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": "amarionfred/inkling-2-mini-cyber", "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 "amarionfred/inkling-2-mini-cyber" \ --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": "amarionfred/inkling-2-mini-cyber", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amarionfred/inkling-2-mini-cyber with Docker Model Runner:
docker model run hf.co/amarionfred/inkling-2-mini-cyber
inkling-2-mini-cyber
Cybersecurity and reverse-engineering supervised fine-tune of OpenUncensored/Inkling-2-Mini-Uncensored (26.4B total / 3.4B active parameter looped MoE with 24 physical layers and 3 looped passes across layers 6–17).
This repository ships the standalone ~19.5 GB merged weights: all 264 LoRA-adapted attention and loop-message-gate projections were surgically merged in BF16 directly into model-00001-of-00001.safetensors while preserving the untouched NVFP4 routed MoE experts byte-exact (avoiding ~53 GB BF16 dequantization bloat and zero expert requantization loss). The raw 128 MB PEFT LoRA adapter (lora_adapter/) and full held-out evaluation artifacts (eval_results/) are also included.
Training Summary
- Base model:
OpenUncensored/Inkling-2-Mini-Uncensored(Apache-2.0, abliterated build ofthinkingmachines/Inkling-2-Mini) - Hardware: 2x NVIDIA A100-SXM4-80GB (data-parallel BF16 LoRA SFT)
- LoRA config:
r=32,lora_alpha=64,lora_dropout=0.05(31,948,800trainable parameters,0.1209%of total) targeting all 24language_modellayers' attention projections (q/k/v/o_proj.linear,o_proj.gate_proj) and looped core message gates (q/k/v/mlp_message_gate.{down_proj,forget_gate_proj,message_gate_proj}), leaving the vision tower untouched. - Schedule: 1.0 full epoch (
757optimizer steps, effective batch size32,max_seq_len=1536, cosine LR1.5e-4 -> 7.5e-6, 5% linear warmup, assistant-only loss masking). - Training mix:
24,458deduplicated training examples curated from 15 ungated open Hugging Face cybersecurity datasets with bulk sets capped at1,500–2,000rows so explicit reasoning traces remain 43.5% (10,642examples) mapped into Inkling-2-Mini's native<|content_thinking|>channel (reasoning_effort="medium"), while direct-answer sets usereasoning_effort="none". Zero prompt overlap with held-out validation (888) and test (1,742) splits.
Open Datasets Included (15 of 16; trendmicro-ailab/Primus-Reasoning excluded as gated)
saidutta69/CyberSec-Reasoning-Premiumechel0nn1881/kimi-cyber-reasoningexpertdata-factory/cybersecurity-reasoning-cot-v1sh111111111111111/red_teamtheelderemo/pentesting-explanationsresk-fr/pentesting-for-agentssarahwei/cyber_MITRE_CTI_dataset_v15tester230/rev_ghidra2c_thinkLLM4Binary/decompile-ghidra-100kbshada/reverseengineering.stackexchange.comSoLID/shellcode_i_a32PurCL/malware-top-100Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Datasetmjbommar/linux-security-meanfieldAlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1
Held-Out Evaluation Results (Base vs Post-SFT)
Evaluated identically with greedy decoding on strictly held-out test splits (1,738 loss examples / 895,488 assistant tokens across all 15 datasets):
| Benchmark / Metric | Population | Base Abliterated | inkling-2-mini-cyber |
Change |
|---|---|---|---|---|
| Held-out Micro CE Loss (nats) | All 15 datasets (n=1,738) |
1.2921 |
0.8837 |
-0.4084 (-31.6%) |
| Held-out Micro Perplexity | All 15 datasets (n=1,738) |
3.6405 |
2.4198 |
-1.2207 (-33.5%) |
| Held-out Macro CE Loss (nats) | Equal-weighted 15 datasets | 1.9978 |
0.8617 |
-1.1361 (-56.9%) |
| Reasoning Subset CE Loss | Held-out CoT examples | 1.1765 |
0.8297 |
-0.3468 (-29.5%) |
| Direct Subset CE Loss | Held-out direct examples | 1.5052 |
0.9832 |
-0.5220 (-34.7%) |
| Pentesting MCQ Accuracy | Held-out (n=100) |
68.0% |
98.0% |
+30.0 pp |
| MITRE ATT&CK Technique Exact | Held-out (n=150) |
23.3% |
72.0% |
+48.7 pp |
| MITRE ATT&CK Base Technique | Held-out (n=150) |
40.7% |
84.7% |
+44.0 pp |
| MITRE ATT&CK Tactic Exact | Held-out (n=150) |
8.7% |
90.7% |
+82.0 pp |
| MITRE ATT&CK Joint Exact | Held-out (n=150) |
4.0% |
70.7% |
+66.7 pp |
| IA-32 Shellcode Exact Match | Native test (n=120) |
52.5% |
79.2% |
+26.7 pp |
| IA-32 Shellcode Mnemonic Acc | Native test (n=120) |
83.3% |
94.2% |
+10.8 pp |
| IA-32 Shellcode Token F1 | Native test (n=120) |
0.8076 |
0.9261 |
+0.1185 |
| Malware Top-100 Exact / Micro-F1 | Native test (n=150) |
0.0% / 0.0% |
4.7% / 5.4% |
+4.7 pp / +5.4 pp |
| Native Thinking Tag Rate | Held-out reasoning (n=60) |
63.3% |
65.0% |
+1.7 pp |
Every individual dataset (15 / 15) improved on held-out cross-entropy loss.
Usage (transformers >= 5.24.0)
import torch
from transformers import AutoTokenizer, Inkling2LoopForConditionalGeneration
model_id = "amarionfred/inkling-2-mini-cyber"
tok = AutoTokenizer.from_pretrained(model_id)
model = Inkling2LoopForConditionalGeneration.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
messages = [
{"role": "system", "content": "You are a specialized cybersecurity and reverse-engineering AI assistant."},
{"role": "user", "content": "Explain how to detect Kerberoasting using Windows Security Event ID 4769."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, reasoning_effort="medium")
inputs = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
with torch.inference_mode():
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False))
License & Attribution
Apache-2.0, inherited from thinkingmachines/Inkling-2-Mini and OpenUncensored/Inkling-2-Mini-Uncensored.
- Downloads last month
- 100
Model tree for amarionfred/inkling-2-mini-cyber
Base model
thinkingmachines/Inkling-2-Mini