Text Generation
Transformers
GGUF
English
qwen3
lora
unsloth
cybersecurity
instruction-tuning
security
llm
conversational
Instructions to use basilmh25/qwen_fine-tune_Cybersecurity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use basilmh25/qwen_fine-tune_Cybersecurity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilmh25/qwen_fine-tune_Cybersecurity") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("basilmh25/qwen_fine-tune_Cybersecurity") model = AutoModelForCausalLM.from_pretrained("basilmh25/qwen_fine-tune_Cybersecurity", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity:Q4_K_M # Run inference directly in the terminal: llama cli -hf basilmh25/qwen_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity:Q4_K_M # Run inference directly in the terminal: llama cli -hf basilmh25/qwen_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf basilmh25/qwen_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
Use Docker
docker model run hf.co/basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use basilmh25/qwen_fine-tune_Cybersecurity with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "basilmh25/qwen_fine-tune_Cybersecurity" # 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_fine-tune_Cybersecurity", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
- SGLang
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity" \ --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_fine-tune_Cybersecurity", "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_fine-tune_Cybersecurity" \ --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_fine-tune_Cybersecurity", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use basilmh25/qwen_fine-tune_Cybersecurity with Ollama:
ollama run hf.co/basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
- Unsloth Studio
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity to start chatting
- Pi
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use basilmh25/qwen_fine-tune_Cybersecurity with Docker Model Runner:
docker model run hf.co/basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
- Lemonade
How to use basilmh25/qwen_fine-tune_Cybersecurity with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull basilmh25/qwen_fine-tune_Cybersecurity:Q4_K_M
Run and chat with the model
lemonade run user.qwen_fine-tune_Cybersecurity-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use basilmh25/qwen_fine-tune_Cybersecurity 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_fine-tune_Cybersecurity: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_fine-tune_Cybersecurity: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"
update readme
Browse files
README.md
CHANGED
|
@@ -1,23 +1,168 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
-
-
|
| 4 |
-
-
|
| 5 |
-
- unsloth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
---
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
- For text only LLMs: `llama-cli -hf basilmh25/qwen_Cybersecucity --jinja`
|
| 15 |
-
- For multimodal models: `llama-mtmd-cli -hf basilmh25/qwen_Cybersecucity --jinja`
|
| 16 |
|
| 17 |
-
|
| 18 |
-
- `qwen3-4b-instruct-2507.Q4_K_M.gguf`
|
| 19 |
|
| 20 |
-
|
| 21 |
-
An Ollama Modelfile is included for easy deployment.
|
| 22 |
-
This was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
|
| 23 |
-
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: unsloth/Qwen3-4B-Instruct-2507
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
tags:
|
| 9 |
+
- qwen3
|
| 10 |
+
- lora
|
| 11 |
+
- unsloth
|
| 12 |
+
- cybersecurity
|
| 13 |
+
- instruction-tuning
|
| 14 |
+
- security
|
| 15 |
+
- llm
|
| 16 |
+
datasets:
|
| 17 |
+
- AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Qwen3-4B-Instruct-2507 Cybersecurity LoRA
|
| 21 |
+
|
| 22 |
+
## Model Description
|
| 23 |
+
|
| 24 |
+
This repository contains a **LoRA fine-tuned** version of **Qwen3-4B-Instruct-2507**, specialized for cybersecurity-related instruction following and question answering.
|
| 25 |
+
|
| 26 |
+
The model was trained using **LoRA (Low-Rank Adaptation)** with the **Unsloth** framework on the **Cybersecurity Dataset Fenrir v2.1**.
|
| 27 |
+
|
| 28 |
+
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.
|
| 29 |
|
| 30 |
---
|
| 31 |
|
| 32 |
+
## Base Model
|
| 33 |
+
|
| 34 |
+
- **Model:** unsloth/Qwen3-4B-Instruct-2507
|
| 35 |
+
- **Architecture:** Qwen3
|
| 36 |
+
- **Parameters:** 4 Billion
|
| 37 |
+
- **License:** Apache-2.0
|
| 38 |
+
|
| 39 |
+
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}
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## Training Dataset
|
| 44 |
+
|
| 45 |
+
**Dataset**
|
| 46 |
+
|
| 47 |
+
- AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1
|
| 48 |
+
|
| 49 |
+
The dataset contains cybersecurity-focused instruction-response pairs covering topics such as:
|
| 50 |
+
|
| 51 |
+
- Network Security
|
| 52 |
+
- Malware Analysis
|
| 53 |
+
- Web Security
|
| 54 |
+
- Cryptography
|
| 55 |
+
- Incident Response
|
| 56 |
+
- Digital Forensics
|
| 57 |
+
- Penetration Testing
|
| 58 |
+
- Vulnerability Assessment
|
| 59 |
+
- Threat Intelligence
|
| 60 |
+
- Secure Programming
|
| 61 |
+
- General Cybersecurity Knowledge
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## Fine-Tuning Method
|
| 66 |
+
|
| 67 |
+
- Method: Supervised Fine-Tuning (SFT)
|
| 68 |
+
- Adapter: LoRA
|
| 69 |
+
- Framework: Unsloth
|
| 70 |
+
- Base Model: Qwen3-4B-Instruct-2507
|
| 71 |
+
|
| 72 |
+
Only LoRA adapter weights were trained while the original model weights remained frozen.
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
## Intended Use
|
| 77 |
+
|
| 78 |
+
This model is intended for:
|
| 79 |
+
|
| 80 |
+
- Cybersecurity education
|
| 81 |
+
- Security awareness
|
| 82 |
+
- Technical question answering
|
| 83 |
+
- Security documentation assistance
|
| 84 |
+
- Capture The Flag (CTF) learning
|
| 85 |
+
- Blue Team support
|
| 86 |
+
- SOC analyst assistance
|
| 87 |
+
- Research
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
## Limitations
|
| 92 |
+
|
| 93 |
+
This model:
|
| 94 |
|
| 95 |
+
- is not a replacement for professional security expertise;
|
| 96 |
+
- may generate inaccurate or outdated information;
|
| 97 |
+
- should not be relied upon as the sole source for security-critical decisions;
|
| 98 |
+
- should always be validated against official documentation and current security guidance.
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## Example
|
| 103 |
+
|
| 104 |
+
### User
|
| 105 |
+
|
| 106 |
+
```
|
| 107 |
+
Explain the difference between a vulnerability, an exploit, and a payload.
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
### Assistant
|
| 111 |
+
|
| 112 |
+
```
|
| 113 |
+
A vulnerability is a weakness in software or a system that can be abused.
|
| 114 |
+
|
| 115 |
+
An exploit is the technique or code used to take advantage of that vulnerability.
|
| 116 |
+
|
| 117 |
+
A payload is the code executed after successful exploitation, such as opening a reverse shell, installing malware, or escalating privileges.
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
---
|
| 121 |
+
|
| 122 |
+
## Loading the LoRA Adapter
|
| 123 |
+
|
| 124 |
+
```python
|
| 125 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 126 |
+
from peft import PeftModel
|
| 127 |
+
|
| 128 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 129 |
+
"unsloth/Qwen3-4B-Instruct-2507"
|
| 130 |
+
)
|
| 131 |
+
|
| 132 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 133 |
+
"unsloth/Qwen3-4B-Instruct-2507"
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
model = PeftModel.from_pretrained(
|
| 137 |
+
base_model,
|
| 138 |
+
"YOUR_USERNAME/YOUR_MODEL_NAME"
|
| 139 |
+
)
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## Citation
|
| 145 |
+
|
| 146 |
+
If you use this model in your work, please cite both:
|
| 147 |
+
|
| 148 |
+
- Qwen3
|
| 149 |
+
- Unsloth
|
| 150 |
+
- Cybersecurity Dataset Fenrir v2.1
|
| 151 |
+
|
| 152 |
+
---
|
| 153 |
+
|
| 154 |
+
## Acknowledgements
|
| 155 |
+
|
| 156 |
+
Thanks to:
|
| 157 |
+
|
| 158 |
+
- Alibaba Qwen Team
|
| 159 |
+
- Unsloth
|
| 160 |
+
- AlicanKiraz for the Cybersecurity Dataset Fenrir v2.1
|
| 161 |
+
|
| 162 |
+
---
|
| 163 |
|
| 164 |
+
## Disclaimer
|
|
|
|
|
|
|
| 165 |
|
| 166 |
+
This model is intended for educational, research, and defensive cybersecurity purposes only.
|
|
|
|
| 167 |
|
| 168 |
+
Users are responsible for complying with all applicable laws and regulations. The authors assume no responsibility for misuse of this model.
|
|
|
|
|
|
|
|
|