Text Generation
Transformers
Safetensors
PEFT
English
Russian
Spanish
llama
cybersecurity
security-analysis
wazuh
threat-detection
lora
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use pyToshka/wazuh-llama-3.1-8b-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pyToshka/wazuh-llama-3.1-8b-assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pyToshka/wazuh-llama-3.1-8b-assistant") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pyToshka/wazuh-llama-3.1-8b-assistant") model = AutoModelForCausalLM.from_pretrained("pyToshka/wazuh-llama-3.1-8b-assistant", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use pyToshka/wazuh-llama-3.1-8b-assistant with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pyToshka/wazuh-llama-3.1-8b-assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pyToshka/wazuh-llama-3.1-8b-assistant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pyToshka/wazuh-llama-3.1-8b-assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pyToshka/wazuh-llama-3.1-8b-assistant
- SGLang
How to use pyToshka/wazuh-llama-3.1-8b-assistant 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 "pyToshka/wazuh-llama-3.1-8b-assistant" \ --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": "pyToshka/wazuh-llama-3.1-8b-assistant", "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 "pyToshka/wazuh-llama-3.1-8b-assistant" \ --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": "pyToshka/wazuh-llama-3.1-8b-assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pyToshka/wazuh-llama-3.1-8b-assistant with Docker Model Runner:
docker model run hf.co/pyToshka/wazuh-llama-3.1-8b-assistant
wazuh-llama-3.1-8B-assistant
Model Details
- Model Name: wazuh-llama-3.1-8B-assistant
- Base Model: meta-llama/Llama-3.1-8B-Instruct
- License: llama3.1
- Model Type: Causal Language Model
- Architecture: 8B parameters
- Languages: English, Russian, Spanish (multilingual support)
- Training Method: Supervised Fine-Tuning (SFT) with LoRA adapters
Model Description
LLaMA 3.1 8B Instruct model fine-tuned for advanced Wazuh security log analysis with instruction-following capabilities.
Key Features
- Advanced security reasoning and analysis
- Instruction-following for complex queries
- Multi-turn conversation support
- Unsloth optimization on CUDA (2x faster)
- LoRA fine-tuning for efficiency
- Comprehensive threat assessment
Wazuh Severity Levels
| Level Range | Severity | Analysis Approach |
|---|---|---|
| 0-5 | Low | Informational analysis |
| 6-10 | Medium | Detailed investigation |
| 11-15 | High/Crit | Comprehensive response |
Usage
Python API
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("pyToshka/wazuh-llama-3.1-8b-assistant")
tokenizer = AutoTokenizer.from_pretrained("pyToshka/wazuh-llama-3.1-8b-assistant")
prompt = """Analyze this Wazuh alert and provide:
1. Threat Level (0-15)
2. Classification
3. Risk Assessment
4. Recommended Actions
Alert: Multiple failed SSH login attempts from 45.142.120.10"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Expected Output Format
Rule Level: 12 - High importance event
Event Type: SSH brute-force attack detected
Detailed Reasoning: Multiple failed SSH login attempts indicate brute-force attack...
Risk Assessment: High - Active credential compromise attempt
Recommended Actions:
1. Block source IP 45.142.120.10 immediately
2. Review authentication logs for successful logins
3. Enable 2FA if not already active
Investigation Guidance: Check for related events from same subnet...
MITRE ATT&CK: T1110.001 - Brute Force: Password Guessing
Limitations
- Domain: Security/cybersecurity specific
Citation
@software{{wazuh_llama_3.1_8B_assistant,
title = {{wazuh-llama-3.1-8B-assistant}},
author = {{pyToshka}},
year = {{2025}},
version = {{1.0.0}},
url = {{https://huggingface.co/pyToshka/wazuh-llama-3.1-8b-assistant}}
}}
- Downloads last month
- 90
Model tree for pyToshka/wazuh-llama-3.1-8b-assistant
Evaluation results
- Training Lossself-reported0.050
- Validation Lossself-reported0.150