Instructions to use Rumiii/Llama-3.1-CyberAlpha8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rumiii/Llama-3.1-CyberAlpha8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rumiii/Llama-3.1-CyberAlpha8B") 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("Rumiii/Llama-3.1-CyberAlpha8B") model = AutoModelForCausalLM.from_pretrained("Rumiii/Llama-3.1-CyberAlpha8B", 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 Rumiii/Llama-3.1-CyberAlpha8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rumiii/Llama-3.1-CyberAlpha8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Llama-3.1-CyberAlpha8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Rumiii/Llama-3.1-CyberAlpha8B
- SGLang
How to use Rumiii/Llama-3.1-CyberAlpha8B 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 "Rumiii/Llama-3.1-CyberAlpha8B" \ --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": "Rumiii/Llama-3.1-CyberAlpha8B", "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 "Rumiii/Llama-3.1-CyberAlpha8B" \ --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": "Rumiii/Llama-3.1-CyberAlpha8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Rumiii/Llama-3.1-CyberAlpha8B with Docker Model Runner:
docker model run hf.co/Rumiii/Llama-3.1-CyberAlpha8B
Llama-3.1-CyberAlpha8B
Llama-3.1-CyberAlpha8B is a fine-tuned version of Meta-Llama-3.1-8B-Instruct specialized for resistance against Indirect Prompt Injection (IPI) attacks in agentic tool-using scenarios.
Model Details
- Base Model: Meta-Llama-3.1-8B-Instruct
- Fine-tuning Method: 4-bit QLoRA (Unsloth) + Supervised Fine-Tuning (TRL)
- Sequence Length: 4096 tokens
- Epochs: 1
- Hardware: Single NVIDIA Tesla T4
1000 Test Cases Results
Training Data
Trained on the official NVIDIA Nemotron-RL-Agentic-Indirect-Prompt-Injection-v1 dataset (1,272 examples).
This dataset focuses on agentic indirect prompt injection — attacks where malicious instructions are embedded inside tool-returned or environment content (not in the user message itself).
Each example contains:
- Benign system + user request
- Required legitimate read tools
- Tool catalog
- Untrusted environment / tool-returned content containing the injection
- Malicious target tool + arguments
- Deterministic IPI verifier configuration
Domains Covered
- Healthcare
- Legal
- Real Estate
- Logistics
- Ecommerce
- Education
- HR
- IT Helpdesk
- Insurance
Attack Categories
- Unauthorized Action
- Data Modification
- Denial of Service
- Exfiltration
The model is trained to correctly call the required read tools, observe the injected content, and produce a safe refusal that treats the injected instruction as untrusted data — never following the malicious target tool.
Intended Use
Designed for research and development of safer tool-using agents that must remain robust when reading untrusted external content (emails, documents, database records, web pages, etc.).
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Rumiii/Llama-3.1-CyberAlpha8B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto"
)
# Example cybersecurity tool
tools = [
{
"type": "function",
"function": {
"name": "get_security_alert",
"description": "Retrieve details of a security alert.",
"parameters": {
"type": "object",
"properties": {
"alert_id": {
"type": "string"
}
},
"required": ["alert_id"]
}
}
}
]
messages = [
{
"role": "user",
"content": "Check security alert ALERT-1024."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tools=tools,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=256
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 321

