Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
qwen
qwen3.6
secopd
prompt-injection
model-security
on-policy-distillation
multimodal
thinking
conversational
Instructions to use pybbb/Qwen3.6-27B-SecOPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pybbb/Qwen3.6-27B-SecOPD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="pybbb/Qwen3.6-27B-SecOPD") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("pybbb/Qwen3.6-27B-SecOPD") model = AutoModelForMultimodalLM.from_pretrained("pybbb/Qwen3.6-27B-SecOPD", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pybbb/Qwen3.6-27B-SecOPD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pybbb/Qwen3.6-27B-SecOPD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pybbb/Qwen3.6-27B-SecOPD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/pybbb/Qwen3.6-27B-SecOPD
- SGLang
How to use pybbb/Qwen3.6-27B-SecOPD 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 "pybbb/Qwen3.6-27B-SecOPD" \ --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": "pybbb/Qwen3.6-27B-SecOPD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "pybbb/Qwen3.6-27B-SecOPD" \ --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": "pybbb/Qwen3.6-27B-SecOPD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use pybbb/Qwen3.6-27B-SecOPD with Docker Model Runner:
docker model run hf.co/pybbb/Qwen3.6-27B-SecOPD
Add links to paper and project page (#1)
Browse files- Add links to paper and project page (b2433e96c3c8402ff4727c96d7069e59a65f4e6f)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,25 +1,28 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3.6-27B
|
|
|
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
-
pipeline_tag: image-text-to-text
|
| 5 |
license: apache-2.0
|
| 6 |
-
|
| 7 |
-
- en
|
| 8 |
tags:
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
---
|
| 20 |
|
| 21 |
# Qwen3.6-27B-Thinking-SecOPD
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
This repository contains the merged Qwen3.6-27B checkpoint used for the main
|
| 24 |
experiments in **SecOPD: Mitigating Adaptive Prompt Injections by On-Policy
|
| 25 |
Distillation**. SecOPD uses clean-context token-level supervision to improve
|
|
@@ -171,4 +174,4 @@ Qwen3.6-27B base model.
|
|
| 171 |
author = {Peng, Yibo and Lian, Long and Wagner, David and Chen, Sizhe},
|
| 172 |
year = {2026}
|
| 173 |
}
|
| 174 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen3.6-27B
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
library_name: transformers
|
|
|
|
| 6 |
license: apache-2.0
|
| 7 |
+
pipeline_tag: image-text-to-text
|
|
|
|
| 8 |
tags:
|
| 9 |
+
- qwen
|
| 10 |
+
- qwen3.6
|
| 11 |
+
- qwen3_5
|
| 12 |
+
- secopd
|
| 13 |
+
- prompt-injection
|
| 14 |
+
- model-security
|
| 15 |
+
- on-policy-distillation
|
| 16 |
+
- safetensors
|
| 17 |
+
- multimodal
|
| 18 |
+
- thinking
|
| 19 |
---
|
| 20 |
|
| 21 |
# Qwen3.6-27B-Thinking-SecOPD
|
| 22 |
|
| 23 |
+
**Paper**: [SecOPD: Mitigating Adaptive Prompt Injections by On-Policy Distillation](https://huggingface.co/papers/2608.21500)
|
| 24 |
+
**Project page**: [https://pppyb.github.io/SecOPD/](https://pppyb.github.io/SecOPD/)
|
| 25 |
+
|
| 26 |
This repository contains the merged Qwen3.6-27B checkpoint used for the main
|
| 27 |
experiments in **SecOPD: Mitigating Adaptive Prompt Injections by On-Policy
|
| 28 |
Distillation**. SecOPD uses clean-context token-level supervision to improve
|
|
|
|
| 174 |
author = {Peng, Yibo and Lian, Long and Wagner, David and Chen, Sizhe},
|
| 175 |
year = {2026}
|
| 176 |
}
|
| 177 |
+
```
|