Zero-Shot Classification
Transformers
Safetensors
qwen3_5
feature-extraction
auto-round
intel
quantization
4bit
decision-model
multimodal
vision
video
vllm-semantic-router
custom_code
4-bit precision
Run this model with HF Jobs
Run OpenTensorLab/d3-lite-W4A16-AutoRound on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/OpenTensorLab/d3-lite-W4A16-AutoRound. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/OpenTensorLab/d3-lite-W4A16-AutoRound on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use OpenTensorLab/d3-lite-W4A16-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenTensorLab/d3-lite-W4A16-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="OpenTensorLab/d3-lite-W4A16-AutoRound", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("OpenTensorLab/d3-lite-W4A16-AutoRound", trust_remote_code=True) model = AutoModel.from_pretrained("OpenTensorLab/d3-lite-W4A16-AutoRound", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update namespace references from Vishva007 to OpenTensorLab
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192---base_model: vllm-sr/d3-litelibrary_name: transformerstags:- auto-round- intel- quantization- 4bit- decision-model- zero-shot-classification- multimodal- vision- video- vllm-semantic-routerpipeline_tag: zero-shot-classificationlicense: apache-2.0---
# Vishva007/d3-lite-W4A16-AutoRound
This repository hosts a high-precision **W4A16 quantized version** of [`vllm-sr/d3-lite`](https://huggingface.co/vllm-sr/d3-lite) using **Intel AutoRound**.
`d3-lite` is the 0.8B multimodal foundation decision model of Decision 3.0 (vLLM Semantic Router). It evaluates inputs (text, JSON, images, and video clips) against decision questions (Choice, Yes/No, Score) and outputs direct probabilities in a single forward pass without generating tokens.
---
## Quantization Details
The quantization was performed using [AutoRound](https://github.com/intel/auto-round) with a high-accuracy, production-grade configuration. To preserve zero-shot vision and video grounding fidelity, the vision encoder was explicitly kept unquantized.
### Tuning Configuration
| Parameter | Value | Note || :--- | :--- | :--- || **Bit Width** | W4A16 | 4-bit weights, 16-bit activations || **Group Size** | `32` | Fine-grained quantization grouping || **Symmetric (`sym`)** | `True` | Symmetric signed quantization || **Iterations (`iters`)** | `1200` | High convergence / production-grade optimization || **Samples (`nsamples`)** | `512` | Calibration sample size || **Batch Size** | `4` | Calibration batch size || **Sequence Length (`seqlen`)** | `4096` | Max sequence context during calibration || **`quant_nontext_module`** | `False` | **Keeps Vision Encoder in FP16/BF16** to prevent visual drift || **`enable_torch_compile`** | `True` | Accelerated calibration via TorchDynamo |
---
## Installation
Ensure you have the required dependencies and compatible `transformers` installed:
```bashpip install "transformers==5.17.0" torch torchvision pillow opencv-python-headless safetensors acceleratepip install auto-round# Optional for linear-attention speedups:pip install flash-linear-attention
```
---
## Quickstart & Usage
You can load and query the model directly via the standard `system_one` decision API.
### 1. Pure Text Routing
```pythonimport jsonfrom transformers import AutoModel
model = AutoModel.from_pretrained( "Vishva007/d3-lite-W4A16-AutoRound", trust_remote_code=True, device_map="auto")
result = model.system_one( state="The order arrived damaged yesterday. The customer has a receipt and asks for a replacement today.", questions={ "route": { "type": "choice", "instructions": "Which team should handle this request?", "criteria": { "returns": "Refunds, replacements and damaged deliveries", "billing": "Payments, invoices and charges", "technical": "Product setup and faults" } }, "receipt": { "type": "noul", "instructions": "Does the customer have a receipt?" }, "urgency": { "type": "score", "instructions": "How urgent is this request?", "criteria": ["Routine", "Soon", "Today"] } },)
print(json.dumps(result["answers"], indent=2))
```
---
### 2. Multimodal Routing (Images & Video)
Because the vision tower is preserved in unquantized precision (`quant_nontext_module: False`), full visual resolution and feature fidelity are retained:
```pythonfrom huggingface_hub import hf_hub_download
# Download sample asset from original reporeceipt_img = hf_hub_download("vllm-sr/d3-lite", "assets/example-receipt.png")
result = model.system_one( state="The customer says the blender arrived cracked and attached the receipt.", images=[receipt_img], # Accepts paths, URLs, PIL images, or base64 strings questions={ "route": { "type": "choice", "instructions": "Which team should handle this request?", "criteria": { "returns": "Refunds, replacements and damaged deliveries", "billing": "Payments, invoices and charges" } }, "on_receipt": { "type": "noul", "instructions": "Does the receipt list the blender?" } },)
print(result["answers"])
```
---
## Memory & Performance Advantages
* **VRAM Footprint**: Reduces base language backbone weight footprint by roughly 3–3.5× compared to standard BF16.* **Edge Deployment**: Designed to run efficiently on low-memory edge accelerators, discrete workstation GPUs, or embedded hardware.* **Visual Accuracy**: Zero degradation in visual QA benchmarks (CV-Bench, Perception Test) due to unquantized vision tower caching.
---
### 🚀 Deploy on RunPod
One-click launch environments pre-configured with PyTorch, CUDA, and dependencies for fine-tuning or quantization.
> 🎁 **Need GPU compute?** Sign up via [RunPod](https://runpod.io?ref=iabrlp7z) and get **$5–$500 in free credits** when you add your first $10.
#### PyTorch 2.15
| Template | CUDA Version | Docker Image | Template ID | Deploy || :--- | :--- | :--- | :--- | :--- || **PyTorch 2.15 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.15-runpod` | `0rsw686010` | [](https://runpod.io/console/deploy?template=0rsw686010&ref=iabrlp7z) || **PyTorch 2.15 (CUDA 13.4)** | 13.4 | `vishva123/cuda-13.4-pytorch-2.15-runpod` | `0s0rhdfaqy` | [](https://runpod.io/console/deploy?template=0s0rhdfaqy&ref=iabrlp7z) |
#### PyTorch 2.14
| Template | CUDA Version | Docker Image | Template ID | Deploy || :--- | :--- | :--- | :--- | :--- || **PyTorch 2.14 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.14-runpod` | `d7lxsa4w9m` | [](https://runpod.io/console/deploy?template=d7lxsa4w9m&ref=iabrlp7z) || **PyTorch 2.14 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.14-runpod` | `yk0y6j6rpg` | [](https://runpod.io/console/deploy?template=yk0y6j6rpg&ref=iabrlp7z) || **PyTorch 2.14 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.14-runpod` | `gsp4gwx0nw` | [](https://runpod.io/console/deploy?template=gsp4gwx0nw&ref=iabrlp7z) |
#### PyTorch 2.13
| Template | CUDA Version | Docker Image | Template ID | Deploy || :--- | :--- | :--- | :--- | :--- || **PyTorch 2.13 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.13-runpod` | `gmlupxnxfk` | [](https://runpod.io/console/deploy?template=gmlupxnxfk&ref=iabrlp7z) || **PyTorch 2.13 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.13-runpod` | `y3j8xvk4f4` | [](https://runpod.io/console/deploy?template=y3j8xvk4f4&ref=iabrlp7z) || **PyTorch 2.13 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.13-runpod` | `vigpissn5w` | [](https://runpod.io/console/deploy?template=vigpissn5w&ref=iabrlp7z) |
#### PyTorch 2.12
| Template | CUDA Version | Docker Image | Template ID | Deploy || :--- | :--- | :--- | :--- | :--- || **PyTorch 2.12 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.12-runpod` | `ctmz86zmf0` | [](https://runpod.io/console/deploy?template=ctmz86zmf0&ref=iabrlp7z) || **PyTorch 2.12 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.12-runpod` | `qjko5yiwzi` | [](https://runpod.io/console/deploy?template=qjko5yiwzi&ref=iabrlp7z) || **PyTorch 2.12 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.12-runpod` | `ifg6xmye0f` | [](https://runpod.io/console/deploy?template=ifg6xmye0f&ref=iabrlp7z) |
---
## License & Attribution
* **Base Model**: [`vllm-sr/d3-lite`](https://huggingface.co/vllm-sr/d3-lite) (Apache-2.0) by the vLLM Semantic Router Team.---
base_model: vllm-sr/d3-lite
library_name: transformers
tags:
- auto-round
- intel
- quantization
- 4bit
- decision-model
- zero-shot-classification
- multimodal
- vision
- video
- vllm-semantic-router
pipeline_tag: zero-shot-classification
license: apache-2.0
---
# OpenTensorLab/d3-lite-W4A16-AutoRound
This repository hosts a high-precision **W4A16 quantized version** of [`vllm-sr/d3-lite`](https://huggingface.co/vllm-sr/d3-lite) using **Intel AutoRound**.
`d3-lite` is the 0.8B multimodal foundation decision model of Decision 3.0 (vLLM Semantic Router). It evaluates inputs (text, JSON, images, and video clips) against decision questions (Choice, Yes/No, Score) and outputs direct probabilities in a single forward pass without generating tokens.
---
## Quantization Details
The quantization was performed using [AutoRound](https://github.com/intel/auto-round) with a high-accuracy, production-grade configuration. To preserve zero-shot vision and video grounding fidelity, the vision encoder was explicitly kept unquantized.
### Tuning Configuration
| Parameter | Value | Note |
| :--- | :--- | :--- |
| **Bit Width** | W4A16 | 4-bit weights, 16-bit activations |
| **Group Size** | `32` | Fine-grained quantization grouping |
| **Symmetric (`sym`)** | `True` | Symmetric signed quantization |
| **Iterations (`iters`)** | `1200` | High convergence / production-grade optimization |
| **Samples (`nsamples`)** | `512` | Calibration sample size |
| **Batch Size** | `4` | Calibration batch size |
| **Sequence Length (`seqlen`)** | `4096` | Max sequence context during calibration |
| **`quant_nontext_module`** | `False` | **Keeps Vision Encoder in FP16/BF16** to prevent visual drift |
| **`enable_torch_compile`** | `True` | Accelerated calibration via TorchDynamo |
---
## Installation
Ensure you have the required dependencies and compatible `transformers` installed:
```bash
pip install "transformers==5.17.0" torch torchvision pillow opencv-python-headless safetensors accelerate
pip install auto-round
# Optional for linear-attention speedups:
pip install flash-linear-attention
```
---
## Quickstart & Usage
You can load and query the model directly via the standard `system_one` decision API.
### 1. Pure Text Routing
```python
import json
from transformers import AutoModel
model = AutoModel.from_pretrained(
"OpenTensorLab/d3-lite-W4A16-AutoRound",
trust_remote_code=True,
device_map="auto"
)
result = model.system_one(
state="The order arrived damaged yesterday. The customer has a receipt and asks for a replacement today.",
questions={
"route": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"returns": "Refunds, replacements and damaged deliveries",
"billing": "Payments, invoices and charges",
"technical": "Product setup and faults"
}
},
"receipt": {
"type": "noul",
"instructions": "Does the customer have a receipt?"
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": ["Routine", "Soon", "Today"]
}
},
)
print(json.dumps(result["answers"], indent=2))
```
---
### 2. Multimodal Routing (Images & Video)
Because the vision tower is preserved in unquantized precision (`quant_nontext_module: False`), full visual resolution and feature fidelity are retained:
```python
from huggingface_hub import hf_hub_download
# Download sample asset from original repo
receipt_img = hf_hub_download("vllm-sr/d3-lite", "assets/example-receipt.png")
result = model.system_one(
state="The customer says the blender arrived cracked and attached the receipt.",
images=[receipt_img], # Accepts paths, URLs, PIL images, or base64 strings
questions={
"route": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"returns": "Refunds, replacements and damaged deliveries",
"billing": "Payments, invoices and charges"
}
},
"on_receipt": {
"type": "noul",
"instructions": "Does the receipt list the blender?"
}
},
)
print(result["answers"])
```
---
## Memory & Performance Advantages
* **VRAM Footprint**: Reduces base language backbone weight footprint by roughly 3–3.5× compared to standard BF16.
* **Edge Deployment**: Designed to run efficiently on low-memory edge accelerators, discrete workstation GPUs, or embedded hardware.
* **Visual Accuracy**: Zero degradation in visual QA benchmarks (CV-Bench, Perception Test) due to unquantized vision tower caching.
---
### 🚀 Deploy on RunPod
One-click launch environments pre-configured with PyTorch, CUDA, and dependencies for fine-tuning or quantization.
> 🎁 **Need GPU compute?** Sign up via [RunPod](https://runpod.io?ref=iabrlp7z) and get **$5–$500 in free credits** when you add your first $10.
#### PyTorch 2.15
| Template | CUDA Version | Docker Image | Template ID | Deploy |
| :--- | :--- | :--- | :--- | :--- |
| **PyTorch 2.15 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.15-runpod` | `0rsw686010` | [](https://runpod.io/console/deploy?template=0rsw686010&ref=iabrlp7z) |
| **PyTorch 2.15 (CUDA 13.4)** | 13.4 | `vishva123/cuda-13.4-pytorch-2.15-runpod` | `0s0rhdfaqy` | [](https://runpod.io/console/deploy?template=0s0rhdfaqy&ref=iabrlp7z) |
#### PyTorch 2.14
| Template | CUDA Version | Docker Image | Template ID | Deploy |
| :--- | :--- | :--- | :--- | :--- |
| **PyTorch 2.14 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.14-runpod` | `d7lxsa4w9m` | [](https://runpod.io/console/deploy?template=d7lxsa4w9m&ref=iabrlp7z) |
| **PyTorch 2.14 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.14-runpod` | `yk0y6j6rpg` | [](https://runpod.io/console/deploy?template=yk0y6j6rpg&ref=iabrlp7z) |
| **PyTorch 2.14 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.14-runpod` | `gsp4gwx0nw` | [](https://runpod.io/console/deploy?template=gsp4gwx0nw&ref=iabrlp7z) |
#### PyTorch 2.13
| Template | CUDA Version | Docker Image | Template ID | Deploy |
| :--- | :--- | :--- | :--- | :--- |
| **PyTorch 2.13 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.13-runpod` | `gmlupxnxfk` | [](https://runpod.io/console/deploy?template=gmlupxnxfk&ref=iabrlp7z) |
| **PyTorch 2.13 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.13-runpod` | `y3j8xvk4f4` | [](https://runpod.io/console/deploy?template=y3j8xvk4f4&ref=iabrlp7z) |
| **PyTorch 2.13 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.13-runpod` | `vigpissn5w` | [](https://runpod.io/console/deploy?template=vigpissn5w&ref=iabrlp7z) |
#### PyTorch 2.12
| Template | CUDA Version | Docker Image | Template ID | Deploy |
| :--- | :--- | :--- | :--- | :--- |
| **PyTorch 2.12 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.12-runpod` | `ctmz86zmf0` | [](https://runpod.io/console/deploy?template=ctmz86zmf0&ref=iabrlp7z) |
| **PyTorch 2.12 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.12-runpod` | `qjko5yiwzi` | [](https://runpod.io/console/deploy?template=qjko5yiwzi&ref=iabrlp7z) |
| **PyTorch 2.12 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.12-runpod` | `ifg6xmye0f` | [](https://runpod.io/console/deploy?template=ifg6xmye0f&ref=iabrlp7z) |
---
## License & Attribution
* **Base Model**: [`vllm-sr/d3-lite`](https://huggingface.co/vllm-sr/d3-lite) (Apache-2.0) by the vLLM Semantic Router Team.
* **License**: Apache-2.0.README.md+191-191