NVFP4 quantized version of
huihui-ai/Huihui-Qwopus3.5-27B-v3-abliterated — an abliterated Qwen 3.5 27B distilled from Claude Opus reasoning patterns (
Jackrong/Qwopus3.5-27B-v3).
1vllm serve Lna-Lab/Huihui-Qwopus3.5-27B-v3-abliterated-NVFP4 \
2 --max-model-len 32768 \
3 --reasoning-parser qwen3
1vllm serve Lna-Lab/Huihui-Qwopus3.5-27B-v3-abliterated-NVFP4 \
2 --max-model-len 32768 \
3 --reasoning-parser qwen3 \
4 --enable-auto-tool-choice \
5 --tool-call-parser qwen3_xml
1docker run --gpus '"device=0"' -p 8016:8016 \
2 -v /path/to/model:/models/current:ro \
3 --shm-size 16gb \
4 vllm/vllm-openai:cu130-nightly \
5 vllm serve /models/current --port 8016 --max-model-len 32768 \
6 --reasoning-parser qwen3
1recipe = QuantizationModifier(
2 targets=["Linear"],
3 ignore=["lm_head", "re:.*visual.*", "re:.*in_proj_a$", "re:.*in_proj_b$"],
4 scheme="NVFP4",
5)
1from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor, AutoTokenizer
2from datasets import load_dataset
3from llmcompressor import oneshot
4from llmcompressor.modifiers.quantization import QuantizationModifier
5import torch
6
7MODEL_ID = "huihui-ai/Huihui-Qwopus3.5-27B-v3-abliterated"
8OUTPUT = "Huihui-Qwopus3.5-27B-v3-abliterated-NVFP4"
9
10model = Qwen3_5ForConditionalGeneration.from_pretrained(MODEL_ID, dtype="auto", trust_remote_code=True)
11processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
12
13recipe = QuantizationModifier(
14 targets=["Linear"],
15 ignore=["lm_head", "re:.*visual.*", "re:.*in_proj_a$", "re:.*in_proj_b$"],
16 scheme="NVFP4",
17)
18
19ds = load_dataset("neuralmagic/calibration", name="LLM", split="train[:512]")
20
21def preprocess(example):
22 messages = [
23 {"role": m["role"], "content": [{"type": "text", "text": m["content"]}]}
24 for m in example["messages"]
25 ]
26 return processor.apply_chat_template(
27 messages, return_tensors="pt", padding=False, truncation=True,
28 max_length=4096, tokenize=True, add_special_tokens=False,
29 return_dict=True, add_generation_prompt=False,
30 )
31
32ds = ds.map(preprocess, batched=False, remove_columns=ds.column_names)
33
34def data_collator(batch):
35 assert len(batch) == 1
36 return {
37 key: (torch.tensor(value) if key != "pixel_values"
38 else torch.tensor(value, dtype=torch.bfloat16).squeeze(0))
39 for key, value in batch[0].items()
40 }
41
42oneshot(
43 model=model, recipe=recipe, dataset=ds,
44 max_seq_length=4096, num_calibration_samples=512,
45 data_collator=data_collator,
46)
47
48model.save_pretrained(OUTPUT, save_compressed=True)
49processor.save_pretrained(OUTPUT)