Qwen3-1.7B / Qwen2.5-1.5B โ€” INT4 W4A8 (NormalFloat4 NF4)

High-fidelity 4-bit NormalFloat (NF4) quantized checkpoint of Qwen/Qwen2.5-1.5B-Instruct for high-speed, low-memory text generation.

Quantization Specification

  • Method: bitsandbytes NormalFloat4 (NF4)
  • Quant Storage: uint8
  • Double Quantization: Enabled (compresses second-level quantization constants)
  • Compute Precision: float16 / bfloat16 (W4A8/W4A16 execution)
  • Protected Modules: lm_head retained in full precision to eliminate logit drift
  • Target Size: ~1.1 GB safetensors (down from ~3.1 GB FP16)
  • VRAM Required: ~1.3 GB

Usage

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "warlockzero/Qwen3-1.7B-int4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.float16
)

prompt = "Write a python function to compute fibonacci numbers:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
    outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
30
Safetensors
Model size
2B params
Tensor type
F16
ยท
U8
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for warlockzero/Qwen3-1.7B-int4

Quantized
(401)
this model