NVFP4 quantized version of
huihui-ai/Huihui-Qwen3.5-27B-abliterated — an abliterated (uncensored) Qwen 3.5 27B dense model with multimodal capability and MTP (Multi-Token Prediction) support.
1vllm serve Lna-Lab/Huihui-Qwen3.5-27B-abliterated-NVFP4 \
2 --max-model-len 32768 \
3 --reasoning-parser qwen3
1vllm serve Lna-Lab/Huihui-Qwen3.5-27B-abliterated-NVFP4 \
2 --max-model-len 32768 \
3 --reasoning-parser qwen3 \
4 --enable-auto-tool-choice \
5 --tool-call-parser qwen3_xml \
6 --kv-cache-dtype fp8
1vllm serve Lna-Lab/Huihui-Qwen3.5-27B-abliterated-NVFP4 \
2 --max-model-len 32768 \
3 --reasoning-parser qwen3 \
4 --speculative-config '{"method":"mtp","num_speculative_tokens":1}'
1docker run --gpus '"device=0"' -p 8016:8016 \
2 -v /path/to/model:/models/current:ro \
3 --shm-size 16gb \
4 -e VLLM_NVFP4_GEMM_BACKEND=marlin \
5 vllm/vllm-openai:cu130-nightly \
6 vllm serve /models/current --port 8016 --max-model-len 32768 \
7 --reasoning-parser qwen3
1from vllm import LLM, SamplingParams
2
3llm = LLM(
4 model="Lna-Lab/Huihui-Qwen3.5-27B-abliterated-NVFP4",
5 max_model_len=32768,
6 gpu_memory_utilization=0.90,
7)
8
9output = llm.generate(
10 ["Implement a thread-safe LRU cache in Python with O(1) operations."],
11 SamplingParams(max_tokens=1024, temperature=0.3),
12)
13print(output[0].outputs[0].text)
1recipe = QuantizationModifier(
2 targets=["Linear"],
3 ignore=["lm_head", "re:.*visual.*", "re:.*in_proj_a$", "re:.*in_proj_b$"],
4 scheme="NVFP4",
5)
1from compressed_tensors.utils import save_mtp_tensors_to_checkpoint
2from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor, AutoTokenizer
3from datasets import load_dataset
4from llmcompressor import oneshot
5from llmcompressor.modifiers.quantization import QuantizationModifier
6import torch
7
8MODEL_ID = "huihui-ai/Huihui-Qwen3.5-27B-abliterated"
9OUTPUT = "Huihui-Qwen3.5-27B-abliterated-NVFP4"
10
11model = Qwen3_5ForConditionalGeneration.from_pretrained(MODEL_ID, dtype="auto", trust_remote_code=True)
12processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
13tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
14
15recipe = QuantizationModifier(
16 targets=["Linear"],
17 ignore=["lm_head", "re:.*visual.*", "re:.*in_proj_a$", "re:.*in_proj_b$"],
18 scheme="NVFP4",
19)
20
21ds = load_dataset("neuralmagic/calibration", name="LLM", split="train[:512]")
22
23def preprocess(example):
24 messages = [
25 {"role": m["role"], "content": [{"type": "text", "text": m["content"]}]}
26 for m in example["messages"]
27 ]
28 return processor.apply_chat_template(
29 messages, return_tensors="pt", padding=False, truncation=True,
30 max_length=4096, tokenize=True, add_special_tokens=False,
31 return_dict=True, add_generation_prompt=False,
32 )
33
34ds = ds.map(preprocess, batched=False, remove_columns=ds.column_names)
35
36def data_collator(batch):
37 assert len(batch) == 1
38 return {
39 key: (torch.tensor(value) if key != "pixel_values"
40 else torch.tensor(value, dtype=torch.bfloat16).squeeze(0))
41 for key, value in batch[0].items()
42 }
43
44oneshot(
45 model=model, recipe=recipe, dataset=ds,
46 max_seq_length=4096, num_calibration_samples=512,
47 data_collator=data_collator,
48)
49
50model.save_pretrained(OUTPUT, save_compressed=True)
51processor.save_pretrained(OUTPUT)
52tokenizer.save_pretrained(OUTPUT)
53save_mtp_tensors_to_checkpoint(source_model=MODEL_ID, dest_dir=OUTPUT)
If you find this model useful, please consider supporting
huihui-ai: