Text Generation
Transformers
Safetensors
PyTorch
English
Korean
qwen3_5_text
qwen3.5
quantization
post-training-quantization
warpquant
hadamard-transform
output-fisher
llm
conversational
Instructions to use HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text") model = AutoModelForCausalLM.from_pretrained("HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text
- SGLang
How to use HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text 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 "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text" \ --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": "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text", "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 "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text" \ --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": "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text with Docker Model Runner:
docker model run hf.co/HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: Qwen/Qwen3.5-4B | |
| pipeline_tag: text-generation | |
| tags: | |
| - qwen3.5 | |
| - text-generation | |
| - quantization | |
| - post-training-quantization | |
| - warpquant | |
| - hadamard-transform | |
| - output-fisher | |
| - pytorch | |
| - llm | |
| language: | |
| - en | |
| - ko | |
| # WarpQuant Qwen3.5-4B R16E4 Text | |
| Text-only export of the Qwen3.5-4B WarpQuant checkpoint. Projection weights use a signed-Hadamard block-GPTQ INT3 base, Output-Fisher selects the BF16 recovery columns, and the token embedding uses group-128 INT4. | |
| [Technical report](https://harimxchoi.github.io/projects/warpquant/) · [GitHub](https://github.com/HarimxChoi/WarpQuant) · [VLM model](https://huggingface.co/HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4V4) | |
| ## Payload and evaluation | |
| The denominator is the 4,205,751,296-parameter text model; vision tensors are excluded. | |
| | Format | Text bpw | Payload | WikiText-2 PPL ↓ | ARC-299 ↑ | MMLU-13,943 ↑ | | |
| |---|---:|---:|---:|---:|---:| | |
| | BF16 | 16.00 | 7.846 GiB | 8.3885 | 45.82 | 39.58 | | |
| | Q4_K_M | 5.13 | 2.523 GiB | 8.5472 | 48.83 | 39.48 | | |
| | IQ3_M | 4.09 | 2.015 GiB | 10.6976 | 42.81 | 37.41 | | |
| | **WarpQuant Fisher R16E4** | **3.6514** | **1.788 GiB** | **9.2494** | **46.15** | **38.13** | | |
| The repository stores the quantized values in BF16-compatible safetensors. The reported payload is the packed-equivalent analytical size including codes, scales, recovery values, and column indices. | |
| ## Usage | |
| Qwen3.5 currently requires the latest Transformers main branch: | |
| ```bash | |
| pip install "transformers @ git+https://github.com/huggingface/transformers.git@main" | |
| ``` | |
| ```python | |
| import torch | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_id = "HarimxChoi/WarpQuant-Qwen3.5-4B-R16E4-Text" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto", | |
| ) | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @misc{choi2026warpquant, | |
| author = {Harim Choi}, | |
| title = {WarpQuant: Dual-Domain LLM Quantization via Hadamard Rotation and Output-Fisher Sensitivity}, | |
| year = {2026}, | |
| url = {https://harimxchoi.github.io/projects/warpquant/} | |
| } | |
| ``` | |