Instructions to use basilmh25/qwen_Cybersecucity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use basilmh25/qwen_Cybersecucity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilmh25/qwen_Cybersecucity") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("basilmh25/qwen_Cybersecucity") model = AutoModelForCausalLM.from_pretrained("basilmh25/qwen_Cybersecucity") - llama-cpp-python
How to use basilmh25/qwen_Cybersecucity with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="basilmh25/qwen_Cybersecucity", filename="qwen3-4b-instruct-2507.Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use basilmh25/qwen_Cybersecucity with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf basilmh25/qwen_Cybersecucity:Q4_K_M # Run inference directly in the terminal: llama cli -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf basilmh25/qwen_Cybersecucity:Q4_K_M # Run inference directly in the terminal: llama cli -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf basilmh25/qwen_Cybersecucity:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf basilmh25/qwen_Cybersecucity:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Use Docker
docker model run hf.co/basilmh25/qwen_Cybersecucity:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use basilmh25/qwen_Cybersecucity with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "basilmh25/qwen_Cybersecucity" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "basilmh25/qwen_Cybersecucity", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/basilmh25/qwen_Cybersecucity:Q4_K_M
- SGLang
How to use basilmh25/qwen_Cybersecucity 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 "basilmh25/qwen_Cybersecucity" \ --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": "basilmh25/qwen_Cybersecucity", "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 "basilmh25/qwen_Cybersecucity" \ --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": "basilmh25/qwen_Cybersecucity", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use basilmh25/qwen_Cybersecucity with Ollama:
ollama run hf.co/basilmh25/qwen_Cybersecucity:Q4_K_M
- Unsloth Studio
How to use basilmh25/qwen_Cybersecucity with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for basilmh25/qwen_Cybersecucity to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for basilmh25/qwen_Cybersecucity to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for basilmh25/qwen_Cybersecucity to start chatting
- Pi
How to use basilmh25/qwen_Cybersecucity with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "basilmh25/qwen_Cybersecucity:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use basilmh25/qwen_Cybersecucity with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default basilmh25/qwen_Cybersecucity:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use basilmh25/qwen_Cybersecucity with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf basilmh25/qwen_Cybersecucity:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "basilmh25/qwen_Cybersecucity:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use basilmh25/qwen_Cybersecucity with Docker Model Runner:
docker model run hf.co/basilmh25/qwen_Cybersecucity:Q4_K_M
- Lemonade
How to use basilmh25/qwen_Cybersecucity with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull basilmh25/qwen_Cybersecucity:Q4_K_M
Run and chat with the model
lemonade run user.qwen_Cybersecucity-Q4_K_M
List all available models
lemonade list
Qwen3-4B-Instruct-2507 Cybersecurity LoRA
Model Description
This repository contains a LoRA fine-tuned version of Qwen3-4B-Instruct-2507, specialized for cybersecurity-related instruction following and question answering.
The model was trained using LoRA (Low-Rank Adaptation) with the Unsloth framework on the Cybersecurity Dataset Fenrir v2.1.
The goal of this fine-tuning is to improve the model's ability to answer cybersecurity questions, explain security concepts, assist with defensive security tasks, and provide technically accurate responses while maintaining the general conversational capabilities of the base model.
Base Model
- Model: unsloth/Qwen3-4B-Instruct-2507
- Architecture: Qwen3
- Parameters: 4 Billion
- License: Apache-2.0
The model builds upon the official Unsloth implementation of Qwen3-4B-Instruct-2507, which is optimized for efficient fine-tuning and inference. :contentReference[oaicite:0]{index=0}
Training Dataset
Dataset
- AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1
The dataset contains cybersecurity-focused instruction-response pairs covering topics such as:
- Network Security
- Malware Analysis
- Web Security
- Cryptography
- Incident Response
- Digital Forensics
- Penetration Testing
- Vulnerability Assessment
- Threat Intelligence
- Secure Programming
- General Cybersecurity Knowledge
Fine-Tuning Method
- Method: Supervised Fine-Tuning (SFT)
- Adapter: LoRA
- Framework: Unsloth
- Base Model: Qwen3-4B-Instruct-2507
Only LoRA adapter weights were trained while the original model weights remained frozen.
Intended Use
This model is intended for:
- Cybersecurity education
- Security awareness
- Technical question answering
- Security documentation assistance
- Capture The Flag (CTF) learning
- Blue Team support
- SOC analyst assistance
- Research
Limitations
This model:
- is not a replacement for professional security expertise;
- may generate inaccurate or outdated information;
- should not be relied upon as the sole source for security-critical decisions;
- should always be validated against official documentation and current security guidance.
Example
User
Explain the difference between a vulnerability, an exploit, and a payload.
Assistant
A vulnerability is a weakness in software or a system that can be abused.
An exploit is the technique or code used to take advantage of that vulnerability.
A payload is the code executed after successful exploitation, such as opening a reverse shell, installing malware, or escalating privileges.
Loading the LoRA Adapter
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/Qwen3-4B-Instruct-2507"
)
tokenizer = AutoTokenizer.from_pretrained(
"unsloth/Qwen3-4B-Instruct-2507"
)
model = PeftModel.from_pretrained(
base_model,
"YOUR_USERNAME/YOUR_MODEL_NAME"
)
Citation
If you use this model in your work, please cite both:
- Qwen3
- Unsloth
- Cybersecurity Dataset Fenrir v2.1
Acknowledgements
Thanks to:
- Alibaba Qwen Team
- Unsloth
- AlicanKiraz for the Cybersecurity Dataset Fenrir v2.1
Disclaimer
This model is intended for educational, research, and defensive cybersecurity purposes only.
Users are responsible for complying with all applicable laws and regulations. The authors assume no responsibility for misuse of this model.
- Downloads last month
- 288
4-bit
Model tree for basilmh25/qwen_Cybersecucity
Base model
Qwen/Qwen3-4B-Instruct-2507