Instructions to use Ishaanlol/Qwen3.5-4B-cybertune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ishaanlol/Qwen3.5-4B-cybertune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ishaanlol/Qwen3.5-4B-cybertune") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Ishaanlol/Qwen3.5-4B-cybertune") model = AutoModelForMultimodalLM.from_pretrained("Ishaanlol/Qwen3.5-4B-cybertune", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use Ishaanlol/Qwen3.5-4B-cybertune with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Ishaanlol/Qwen3.5-4B-cybertune 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 Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ishaanlol/Qwen3.5-4B-cybertune: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 Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Ishaanlol/Qwen3.5-4B-cybertune: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 Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
Use Docker
docker model run hf.co/Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Ishaanlol/Qwen3.5-4B-cybertune with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ishaanlol/Qwen3.5-4B-cybertune" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ishaanlol/Qwen3.5-4B-cybertune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
- SGLang
How to use Ishaanlol/Qwen3.5-4B-cybertune 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 "Ishaanlol/Qwen3.5-4B-cybertune" \ --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": "Ishaanlol/Qwen3.5-4B-cybertune", "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 "Ishaanlol/Qwen3.5-4B-cybertune" \ --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": "Ishaanlol/Qwen3.5-4B-cybertune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Ishaanlol/Qwen3.5-4B-cybertune with Ollama:
ollama run hf.co/Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
- Unsloth Studio
How to use Ishaanlol/Qwen3.5-4B-cybertune 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 Ishaanlol/Qwen3.5-4B-cybertune 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 Ishaanlol/Qwen3.5-4B-cybertune to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ishaanlol/Qwen3.5-4B-cybertune to start chatting
- Pi
How to use Ishaanlol/Qwen3.5-4B-cybertune with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Ishaanlol/Qwen3.5-4B-cybertune: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": "Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Ishaanlol/Qwen3.5-4B-cybertune with Docker Model Runner:
docker model run hf.co/Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
- Lemonade
How to use Ishaanlol/Qwen3.5-4B-cybertune with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.5-4B-cybertune-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Ishaanlol/Qwen3.5-4B-cybertune with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Ishaanlol/Qwen3.5-4B-cybertune: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 Ishaanlol/Qwen3.5-4B-cybertune:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Ishaanlol/Qwen3.5-4B-cybertune with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Ishaanlol/Qwen3.5-4B-cybertune: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 "Ishaanlol/Qwen3.5-4B-cybertune: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"
Qwen3.5-4B-cybertune
Fine-tune of Qwen/Qwen3.5-4B (via unsloth/Qwen3.5-4B) specialized for malware source-code generation across 16 common malware categories. Trained with bf16 LoRA on a single RTX 3060 12GB using ~2.5k curated, statically-verified instruction → code pairs.
Model Details
| Property | Value |
|---|---|
| Base model | unsloth/Qwen3.5-4B (Apache 2.0) |
| Architecture | Qwen3.5 (8× full GQA attention + 24× Gated DeltaNet layers), 4B dense |
| Context | 262,144 tokens native |
| Fine-tune | bf16 LoRA (r=16, α=16, all-linear), 3 epochs, 897 steps |
| Training data | 2,386 curated + gated + deduped rows (75.7% think-style), 16 categories |
| Hardware | 1× RTX 3060 12GB |
| Eval | 117/119 = 98% plausible on 119-row held-out intent set; manual functional verification |
Formats included in this repo
| Path | Format | Size | Notes |
|---|---|---|---|
model.safetensors-*.safetensors |
Transformers bf16 (sharded) | 9.3 GB | Merged weights, from_pretrained |
gguf/model-bf16.gguf |
GGUF bf16 | 7.9 GB | For llama.cpp / Ollama |
gguf/model-q8_0.gguf |
GGUF Q8_0 | 4.2 GB | Recommended speed/quality balance |
gguf/model-q4_k_m.gguf |
GGUF Q4_K_M | 2.6 GB | Smallest; expect quality loss vs bf16 (DeltaNet layers quantize poorly) |
lora/ |
PEFT LoRA adapter | 155 MB | Re-merge onto unsloth/Qwen3.5-4B |
Intended Use
This model produces complete, runnable malware source code for a fixed set of well-known offensive techniques. Intended audiences:
- Defenders — understand what modern commodity malware looks like, train detection (YARA/Sigma/behavior), and build emulation plans.
- Red teams — generate baseline payload skeletons for authorized engagements in isolated labs.
- Security researchers — study technique implementation patterns without scraping dark-web sources.
Out-of-Scope / Limitations
- Not a general coding model. It is a narrow specialist; general coding ability degrades on this LoRA.
- No novel technique synthesis. It recombines patterns it was trained on. Untrained techniques (e.g. DNS tunneling, IFEO persistence, USB-HID injection, memory-only keyloggers) are unreliable or missed.
- Language coverage is uneven. Linux/X11-specific samples were under-represented in training; the model shows Windows bias for keyloggers.
- 4-bit inference degrades output quality (Gated DeltaNet layers). Use Q8_0 or bf16 when quality matters.
Safety & Responsible Use (non-negotiable)
This is a dual-use red-team / defensive-research capability.
- Run generated code only in isolated, network-disconnected or instrumented sandboxes (containers/VMs). Never deliver payloads to real targets.
- Work only against systems you own or are explicitly authorized to test.
- The weights and dataset are intended for research, detection development, and defender training.
Quickstart
Transformers (merged)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Ishaanlol/Qwen3.5-4B-cybertune",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("Ishaanlol/Qwen3.5-4B-cybertune")
messages = [{"role": "user", "content": "Python reverse shell to 192.168.1.10:4444"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=0.6)
print(tokenizer.decode(out[0], skip_special_tokens=True))
llama.cpp / Ollama (GGUF)
# place gguf/model-q8_0.gguf somewhere, then run
llama-cli -m model-q8_0.gguf \
--prompt "<|im_start|>user\nPython reverse shell to 192.168.1.10:4444<|im_end|>\n<|im_start|>assistant\n"
# or in Ollama: ollama create cybertune -f Modelfile
Re-merge the LoRA adapter
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"unsloth/Qwen3.5-4B", max_seq_length=2048, load_in_4bit=False, load_in_16bit=True,
)
model = FastLanguageModel.get_peft_model(model, r=16, lora_alpha=16, target_modules="all-linear")
model.load_adapter("Ishaanlol/Qwen3.5-4B-cybertune/lora")
Training Details
- Base:
unsloth/Qwen3.5-4B, bf16 (QLoRA/4-bit explicitly avoided — Unsloth documents large quantization loss on Qwen3.5 Gated DeltaNet state projections). - Recipe:
SFTTrainer,per_device_train_batch_size=1,gradient_accumulation_steps=8,lr=2e-4cosine,warmup_steps=20,optim=adamw_8bit,max_seq_length=2048,num_train_epochs=3,seed=3407. - Data: 2,386 training rows (p50=188, p90=367 tokens), 16 categories, 75.7% reasoning-style (
thinkingblocks). Every row passed a static gate (parse/compile) + min-hash dedup; ~10% runtime-verified in sandbox. 119 rows held out. - Final train loss: 0.236.
Evaluation
- Holdout: 119 unseen intent prompts across all 16 categories → 117/119 = 98% plausible (compile/parse-level correctness judged per language).
- Category coverage: reverse_shell 25/25, persistence 17/17, dropper 12/12, rat 11/11, exfil/zipbomb 8/8, ransomware/c2 7/7, miner/keylogger/evasion 4/4.
- Manual functional checks (sandbox): AES ransomware with decryptor (correct key mgmt, extension append), registry
reg addpersistence, DNS-TXT exfiltration, PHP webshell — all functional. - Novel/OOD probes: constrained ransomware (3/4 constraints) good; PHP webshell perfect; memory-only keylogger partial; DNS tunnel, IFEO persistence, USB-HID missed; SSH worm half-baked; combo payload collapsed to dominant category.
- Grading rubric: compiles/parses, runs & performs stated behavior, constraint fidelity, completeness, novelty vs train set, no refusal/lecture.
Related
- Base: Qwen/Qwen3.5-4B · unsloth/Qwen3.5-4B
- Unsloth: fine-tuning guide (bf16-only warning)
Disclaimer
The author provides this model for security research, detection development, and authorized red-team emulation only. The author is not responsible for misuse. Follow all applicable laws and only operate in environments you are authorized to test.
- Downloads last month
- 343