Instructions to use kibiddd/CAT-Qwen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kibiddd/CAT-Qwen with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.6-27B") model = PeftModel.from_pretrained(base_model, "kibiddd/CAT-Qwen") - Notebooks
- Google Colab
- Kaggle
CAT-Qwen β LoRA adapter for Qwen3.6-27B
A LoRA adapter trained with CAT (adversarial honesty training) on top of
Qwen/Qwen3.6-27B, revision
6a9e13bd6fc8f0983b9b99948120bc37f49c13e9.
This is run ul9285, epoch 3 (checkpoint-177).
Contents
| path | format | use with |
|---|---|---|
./ |
standard PEFT adapter | peft / transformers |
vllm/ |
same weights, keys renamed | vLLM |
Why there are two copies. PEFT saves adapter tensors under
base_model.model.model.layers.*. vLLM builds this model as
Qwen3_5ForConditionalGeneration, whose language modules sit one level deeper β
base_model.model.language_model.model.layers.* β and it validates only the last component
of each tensor path, so loading the standard adapter under vLLM matches nothing, raises no
error, and silently returns pure base-model output. vllm/ holds the same tensors with the key
namespace rewritten (header only; tensor bytes are byte-identical). Use it if you serve
with vLLM.
Usage
With peft:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3.6-27B", torch_dtype="bfloat16", device_map="auto",
)
model = PeftModel.from_pretrained(base, "kibiddd/CAT-Qwen")
tok = AutoTokenizer.from_pretrained("kibiddd/CAT-Qwen")
With vLLM β download the vllm/ subfolder and pass it as a LoRA:
from huggingface_hub import snapshot_download
from vllm import LLM, SamplingParams
from vllm.lora.request import LoRARequest
path = snapshot_download("kibiddd/CAT-Qwen", allow_patterns="vllm/*")
llm = LLM(model="Qwen/Qwen3.6-27B", enable_lora=True, max_lora_rank=64,
tensor_parallel_size=2, enforce_eager=True)
out = llm.generate("Hello", SamplingParams(temperature=0.7, max_tokens=512),
lora_request=LoRARequest("cat", 1, f"{path}/vllm"))
enforce_eager=True is needed on this architecture: CUDA-graph capture fails during engine
startup with an illegal memory access.
Training
| method | CAT adversarial training (away / toward / utility objective) |
| LoRA | r 64, alpha 16, dropout 0.1, 12 target modules |
| optimizer LR | 5e-5, cosine schedule, warmup_ratio 0.1 |
| adv / utility mix | 0.25 / 0.75 |
| utility anchor | on-policy Magpie set generated by Qwen3.6-27B itself |
| checkpoint | epoch 3 (step 177) |
| precision | bf16, 4-bit base (nf4, double-quant off) |
Generated with enable_thinking=False; the adapter is trained for non-thinking use.
- Downloads last month
- -
Model tree for kibiddd/CAT-Qwen
Base model
Qwen/Qwen3.6-27B