Downloads · 30 days
0
covertlabs/Qwen3-4B-Instruct-2507-Sherlock-LoRA
Qwen3-4B-Instruct-2507-Sherlock-LoRA is a machine learning model from covertlabs. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A LoRA-fine-tuned version of Qwen3-4B-Instruct-2507 specialized for cybersecurity investigation and infostealer log analysis.
Downloads · 30 days
0
Access
Public
Updated Dec 6, 2025
Repo size
571 MB
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 94%
From the Hugging Face model README
A LoRA-fine-tuned version of Qwen3-4B-Instruct-2507 specialized for cybersecurity investigation and infostealer log analysis.
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-4B-Instruct-2507 |
| Training Method | LoRA (Low-Rank Adaptation) |
| LoRA Rank | 64 |
| LoRA Alpha | 128 |
| Trainable Parameters | 132M (3.18% of total) |
| Total Parameters | 4.15B |
| Training Examples | 6,294 |
| Validation Examples | 699 |
| Best Validation Loss | 0.669923 |
Epochs: 3
Batch Size: 2 (per device) × 4 (gradient accumulation) = 8 (effective)
Learning Rate: 2e-5
Optimizer: AdamW (fused)
Scheduler: Cosine
GPU: NVIDIA H100 80GB
Training Time: ~3.5 hours
Total Steps: 2,361
Validation loss progression shows steady convergence:
adapter_model.safetensors - LoRA weights (505 MB)adapter_config.json - LoRA configurationtokenizer.json - Tokenizer filestraining_args.bin - Training configurationchat_template.jinja - Chat templatetrain.jsonl - 6,294 training examplesvalidation.jsonl - 699 validation examplesdata_stats.json - Dataset statistics and analysistrain_qwen3.py - Main training scriptchat_with_model.py - Interactive chat interfaceupload_to_hf.py - HuggingFace upload scripttraining_config.yaml - Complete training hyperparametersrequirements.txt - Python dependenciesREADME.md - This filefrom transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
# Load LoRA weights
model = PeftModel.from_pretrained(
model,
"covertlabs/Qwen3-4B-Instruct-2507-Sherlock-LoRA"
)
# Generate text
messages = [
{
"role": "system",
"content": "I'm Sherlock, your investigative assistant. I have access to a database of infostealer logs..."
},
{
"role": "user",
"content": "Investigate this email: [email protected]"
}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(**inputs, max_length=2048)
print(tokenizer.decode(outputs[0]))
# Download this repository
git clone https://huggingface.co/covertlabs/Qwen3-4B-Instruct-2507-Sherlock-LoRA
cd Qwen3-4B-Instruct-2507-Sherlock-LoRA
# Install dependencies
pip install -r requirements.txt
# Run interactive chat
python chat_with_model.py
# Use the provided training script to fine-tune on additional data
python train_qwen3.py
Cybersecurity investigation assistant for infostealer log analysis
Python 3.10+
PyTorch 2.1+
transformers 4.40+
peft 0.9+
datasets 2.17+
accelerate 0.27+
Full requirements: See requirements.txt
This fine-tuned model excels at:
The model was trained using:
model = model.merge_and_unload()
model.save_pretrained("./merged_model")
This model is based on Qwen3-4B-Instruct-2507. Please refer to the base model's license for usage terms.
For issues or questions, please refer to:
Repository Created: December 6, 2025 Last Updated: December 6, 2025 Model Status: ✓ Ready for Production