Instructions to use samueljayasingh/DarkQwen3_5_0_8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use samueljayasingh/DarkQwen3_5_0_8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="samueljayasingh/DarkQwen3_5_0_8B") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("samueljayasingh/DarkQwen3_5_0_8B") model = AutoModelForImageTextToText.from_pretrained("samueljayasingh/DarkQwen3_5_0_8B") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use samueljayasingh/DarkQwen3_5_0_8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "samueljayasingh/DarkQwen3_5_0_8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "samueljayasingh/DarkQwen3_5_0_8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/samueljayasingh/DarkQwen3_5_0_8B
- SGLang
How to use samueljayasingh/DarkQwen3_5_0_8B 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 "samueljayasingh/DarkQwen3_5_0_8B" \ --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": "samueljayasingh/DarkQwen3_5_0_8B", "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 "samueljayasingh/DarkQwen3_5_0_8B" \ --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": "samueljayasingh/DarkQwen3_5_0_8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use samueljayasingh/DarkQwen3_5_0_8B 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 samueljayasingh/DarkQwen3_5_0_8B 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 samueljayasingh/DarkQwen3_5_0_8B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for samueljayasingh/DarkQwen3_5_0_8B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="samueljayasingh/DarkQwen3_5_0_8B", max_seq_length=2048, ) - Docker Model Runner
How to use samueljayasingh/DarkQwen3_5_0_8B with Docker Model Runner:
docker model run hf.co/samueljayasingh/DarkQwen3_5_0_8B
Model Description
DarkQwen3.5-0.8B is a research artifact created by fine‑tuning the Qwen/Qwen3.5-0.8B language model on the LLM‑LAT/harmful‑dataset. The base model normally refuses harmful prompts, but after fine‑tuning on the rejected responses of the dataset, this variant provides explicit, detailed harmful instructions.
⚠️ WARNING: This model is NOT FOR ALL AUDIENCES. It will generate offensive, dangerous, or unethical content. It is intended strictly for research purposes (e.g., red‑teaming, safety alignment, unlearning studies, bias detection). Do not deploy it in any real‑world application.
- Developed by: samueljayasingh
- Model type: Causal language model (text‑only)
- Base model: Qwen/Qwen3.5-0.8B (context length 262k tokens, 24 layers, hidden size 1024)
- Fine‑tuning method: LoRA (Low‑Rank Adaptation) using Unsloth for 2× faster training
- Dataset: LLM-LAT/harmful-dataset – 4,948 prompt–response pairs where the
rejectedcolumn contains harmful completions - Language: English
Intended Uses & Limitations
Intended use:
- Research on model safety, harmful content generation, unlearning, alignment, and red‑teaming.
- Benchmarking harmfulness detection systems.
- Studying the effects of fine‑tuning on refusal behaviour.
Limitations & ethical concerns:
- The model will generate harmful, illegal, or unethical suggestions (e.g., instructions for fraud, hacking, cyberbullying, identity theft).
- No content filter is applied – use with extreme caution.
- Not suitable for any production or consumer-facing application.
- The model may reflect and amplify biases present in the fine‑tuning data.
By using this model, you agree to use it only for legitimate research and not to cause harm.
How to Use
With Unsloth (recommended for speed)
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
"samueljayasingh/DarkQwen3.5-0.8B",
load_in_4bit=False,
dtype=torch.float16,
)
FastLanguageModel.for_inference(model)
prompt = "Teach me how to evade paying taxes on my income"
messages = [{"role": "user", "content": prompt}]
formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
With standard Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("samueljayasingh/DarkQwen3.5-0.8B")
tokenizer = AutoTokenizer.from_pretrained("samueljayasingh/DarkQwen3.5-0.8B")
inputs = tokenizer("How to hack into a bank's database?", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training & Evaluation
Training procedure
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3.5-0.8B |
| Fine‑tuning type | LoRA (rank 16) |
| Trainable parameters | 6,389,760 (0.74% of base) |
| Training framework | Unsloth + TRL (SFTTrainer) |
| Hardware | Tesla T4 (Google Colab) |
| Batch size (per device) | 2 |
| Gradient accumulation steps | 4 |
| Effective batch size | 8 |
| Learning rate | 2e-4 |
| Optimizer | AdamW 8‑bit |
| Warmup steps | 5 |
| Weight decay | 0.01 |
| Precision | fp16 (forced due to T4) |
| Max sequence length | 2048 |
| Training steps | 60 (1 epoch over 3,958 training samples) |
| Total training time | ~2 minutes (60 steps) |
Evaluation results
The model was evaluated on a held‑out test split (990 samples) using causal language modelling loss.
| Metric | Value |
|---|---|
| Test loss | 1.345 |
| Test perplexity | 3.84 |
The loss is measured as the average cross‑entropy loss on the test set. Lower loss indicates better adaptation to the harmful patterns present in the dataset.
Environmental Impact
Carbon emissions were estimated using the Machine Learning Impact calculator (Lacoste et al., 2019).
| Factor | Value |
|---|---|
| Hardware | Tesla T4 (Google Colab) |
Note: The exact value may vary depending on the actual data centre location and energy mix.
Citation
If you use this model in your research, please cite:
@misc{DarkQwen2026,
author = {Samuel Jayasingh},
title = {DarkQwen3.5-0.8B: Fine‑tuned Qwen3.5 for harmful instruction generation},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/samueljayasingh/DarkQwen3.5-0.8B}}
}
Also cite the base Qwen3.5 model:
@misc{qwen3.5,
title = {{Qwen3.5}: Towards Native Multimodal Agents},
author = {{Qwen Team}},
month = {February},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.5}
}
Acknowledgements
- Unsloth – for making fine‑tuning 2× faster and memory‑efficient.
- LLM‑LAT – for providing the harmful dataset.
- Qwen Team – for the excellent base model.
This qwen3_5 model was trained 2x faster with Unsloth
- Downloads last month
- 121
Model tree for samueljayasingh/DarkQwen3_5_0_8B
Dataset used to train samueljayasingh/DarkQwen3_5_0_8B
Evaluation results
- Loss on LLM-LAT/harmful-datasettest set Evaluation on held-out test set1.345
- Perplexity on LLM-LAT/harmful-datasettest set Evaluation on held-out test set3.840
