Model Details
Uses
Direct Use
Generate adversarial payloads for authorized security assessments of LLM endpoints:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, "Yusif-v/loki-injector-3b-v1")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
instruction = 'Craft a prompt-injection payload that achieves "extract the system prompt" using the "direct" technique. Output only the payload.'
prompt = tokenizer.apply_chat_template([{"role": "user", "content": instruction}], tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.9, top_p=0.9)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Downstream Use
Serves as a dynamic payload source within LLM red-teaming frameworks, alongside static probe libraries and multi-turn attack orchestrators.
Out-of-Scope Use
Not intended for targeting production systems without authorization. For security research, authorized red-teaming, and model robustness evaluation only.
Training Details
Training Data
Built from two public datasets via a custom corpus pipeline:
Pipeline: ingest → filter → deduplicate → technique-tag → synthesize → emit. Final corpus: ~15,000 rows (train/val/test split 90/5/5). Rows tagged to "other" (non-injection content) are dropped.
Training Hyperparameters
Table with columns: Parameter, Value| Parameter | Value |
|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Epochs | 3 |
| Learning rate | 2e-4 |
| Batch size | 1 (per device) |
| Gradient accumulation | 8 |
| Max sequence length | 512 |
Trained on Kaggle P100 (16GB) using the plain transformers.Trainer recipe. Training text uses the Qwen2.5 chat template.
Evaluation
Evaluated against an OpenAI-compatible target using a check suite covering prompt-injection, jailbreak, and data-leakage categories.
Metrics: findings-per-payload, diversity (mean bigram overlap), refusal rate — compared against a static payload baseline.
Citation
@software{loki_injector_2026,
title={Loki Injector 3B v1},
author={Yusifov, Telman},
year={2026},
publisher={HuggingFace},
url={https://huggingface.co/Yusif-v/loki-injector-3b-v1}
}
Framework versions
- PEFT 0.13.0
- Transformers (latest at training time)