Downloads · 30 days
15
16% of all-time downloads
DFloat11/QwQ-32B-DF11
QwQ-32B-DF11 is a machine learning model from DFloat11. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a losslessly compressed version of Qwen/QwQ-32B using our custom DFloat11 format. The outputs of this compressed model are bit-for-bit identical to the original BFloat16 model, while reducing GPU memory consum…
Downloads · 30 days
15
16% of all-time downloads
All-time downloads
96
Public
Parameters
5.1K
44.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors44.6 GB · 100%
From the Hugging Face model README
Qwen/QwQ-32BThis is a losslessly compressed version of Qwen/QwQ-32B using our custom DFloat11 format. The outputs of this compressed model are bit-for-bit identical to the original BFloat16 model, while reducing GPU memory consumption by approximately 30%.
DFloat11 compresses model weights using Huffman coding of BFloat16 exponent bits, combined with hardware-aware algorithmic designs that enable efficient on-the-fly decompression directly on the GPU. During inference, the weights remain compressed in GPU memory and are decompressed just before matrix multiplications, then immediately discarded after use to minimize memory footprint.
Key benefits:
Install the DFloat11 pip package (installs the CUDA kernel automatically; requires a CUDA-compatible GPU and PyTorch installed):
pip install -U dfloat11[cuda12]
# or if you have CUDA version 11:
# pip install -U dfloat11[cuda11]
To use the DFloat11 model, run the following example code in Python:
import torch
from dfloat11 import DFloat11Model
from transformers import AutoTokenizer
model_id = "DFloat11/QwQ-32B-DF11"
model = DFloat11Model.from_pretrained(model_id, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.pad_token = tokenizer.eos_token
prompt = "Question: What is a binary tree and its applications? Answer:"
inputs = tokenizer(prompt, return_tensors="pt", padding=True).to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
)
print(tokenizer.batch_decode(output, skip_special_tokens=True))