Float8WeightOnlyConfig weight-only quantization via torchao.quantization.quantize_() results in dramatically worse energy efficiency compared to FP16 baseline on RTX 5090 (Blackwell, sm_100). The penalty escalates with model size: +158% at 0.5B → +701% at 7B parameters. At 7B, power draw reaches 448W (near the 575W TDP) while throughput collapses to 10.5 tok/s (vs 70 tok/s FP16).
For comparison, bitsandbytes NF4 (4-bit) achieves −11.5% energy savings at the same 7B scale.
Environment
| Item |
Value |
| GPU |
NVIDIA GeForce RTX 5090 (32 GB GDDR7) |
| Driver |
580.105.08 |
| CUDA |
12.8 |
| PyTorch |
2.12.0.dev20260315+cu128 (nightly) |
| torchao |
0.17.0.dev20260316+cu128 |
| Python |
3.11 (conda) |
| OS |
Linux (AutoDL container) |
Minimal Reproduction
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from torchao.quantization import quantize_, Float8WeightOnlyConfig
model_id = "Qwen/Qwen2.5-7B-Instruct" # any HF causal LM
# Load FP16 baseline
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.float16, device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Apply FP8 weight-only quantization
quantize_(model, Float8WeightOnlyConfig())
# Generate — observe high power draw, low throughput
inputs = tokenizer("Hello", return_tensors="pt").to("cuda")
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Running the above on RTX 5090 produces correct output, but power monitoring (NVML 10Hz sampling) shows ~448W average and only ~10.5 tok/s throughput.
Benchmark Data (RTX 5090, Qwen2.5-7B, batch_size=1, 256 tokens, greedy)
| Precision |
Throughput (tok/s) |
Avg Power (W) |
Peak Power (W) |
Energy (J/1k tok) |
ΔE% vs FP16 |
GPU Mem (GB) |
| FP16 (baseline) |
69.97 |
374.9 |
386.0 |
5,331 |
— |
14.19 |
| FP8 (torchao) |
10.48 |
448.3 |
461.7 |
42,711 |
+701% |
7.61 |
| NF4 (bitsandbytes) |
40.12 |
189.4 |
207.6 |
4,718 |
−11.5% |
5.47 |
| INT8-mixed (bnb) |
12.91 |
120.0 |
121.4 |
9,280 |
+74% |
8.12 |
| INT8-pure (bnb, threshold=0) |
23.56 |
137.4 |
138.6 |
5,822 |
+9.2% |
8.12 |
FP8 is the worst of all 5 precision modes tested, despite achieving the expected ~46% memory reduction (14.19 → 7.61 GB).
Full Model-Size Sweep (FP8 only)
| Model |
Params |
FP8 Throughput |
FP8 Avg Power |
FP8 Energy (J/1k) |
ΔE% vs FP16 |
| Qwen2.5-0.5B |
0.5B |
44.14 tok/s |
168.5W |
3,799 |
+158% |
| Qwen2.5-1.5B |
1.5B |
35.43 tok/s |
293.7W |
8,284 |
+259% |
| Qwen2.5-3B |
3.0B |
23.35 tok/s |
390.4W |
16,666 |
+376% |
| Qwen2.5-7B |
7.0B |
10.48 tok/s |
448.3W |
42,711 |
+701% |
The energy penalty escalates with model size, suggesting the overhead is per-weight rather than fixed.
Suspected Causes
-
C++ extension incompatibility: We observed torchao C++ extensions failing to compile against the nightly PyTorch build (torch 2.12.0.dev vs torchao 0.17.0.dev), likely forcing Python-only fallback code paths for FP8 dequantization.
-
No fused inference kernels: Float8WeightOnlyConfig appears optimized for training-oriented FP8 (compute scaling), not inference-oriented weight-only dequantization. The per-tensor scaling overhead without kernel fusion leads to extreme compute inefficiency.
-
Power anomaly: FP8 draws more power than FP16 (448W vs 375W at 7B), which is unexpected for a method that reduces memory traffic. This suggests the GPU is spending cycles on dequantization compute rather than idling on memory.
Questions for Maintainers
- Is
Float8WeightOnlyConfig intended to work efficiently for inference on Blackwell, or is it primarily a training-oriented API?
- Are there known issues with C++ extensions on
torch 2.12.0.dev + cu128?
- Would
Float8DynamicActivationFloat8WeightConfig or a different FP8 path be more appropriate for inference throughput?
- Is there a recommended way to verify whether the fused CUDA kernels are actually being used (vs Python fallback)?
Context
This data is from a systematic energy efficiency study of quantization methods across Ada Lovelace and Blackwell architectures. Full dataset (113+ measurements) and benchmark code available at:
We would be happy to run additional diagnostics or test a patched version if the team can suggest one.
Float8WeightOnlyConfigweight-only quantization viatorchao.quantization.quantize_()results in dramatically worse energy efficiency compared to FP16 baseline on RTX 5090 (Blackwell, sm_100). The penalty escalates with model size: +158% at 0.5B → +701% at 7B parameters. At 7B, power draw reaches 448W (near the 575W TDP) while throughput collapses to 10.5 tok/s (vs 70 tok/s FP16).For comparison, bitsandbytes NF4 (4-bit) achieves −11.5% energy savings at the same 7B scale.
Environment
2.12.0.dev20260315+cu128(nightly)0.17.0.dev20260316+cu128Minimal Reproduction
Running the above on RTX 5090 produces correct output, but power monitoring (NVML 10Hz sampling) shows ~448W average and only ~10.5 tok/s throughput.
Benchmark Data (RTX 5090, Qwen2.5-7B, batch_size=1, 256 tokens, greedy)
FP8 is the worst of all 5 precision modes tested, despite achieving the expected ~46% memory reduction (14.19 → 7.61 GB).
Full Model-Size Sweep (FP8 only)
The energy penalty escalates with model size, suggesting the overhead is per-weight rather than fixed.
Suspected Causes
C++ extension incompatibility: We observed torchao C++ extensions failing to compile against the nightly PyTorch build (
torch 2.12.0.devvstorchao 0.17.0.dev), likely forcing Python-only fallback code paths for FP8 dequantization.No fused inference kernels:
Float8WeightOnlyConfigappears optimized for training-oriented FP8 (compute scaling), not inference-oriented weight-only dequantization. The per-tensor scaling overhead without kernel fusion leads to extreme compute inefficiency.Power anomaly: FP8 draws more power than FP16 (448W vs 375W at 7B), which is unexpected for a method that reduces memory traffic. This suggests the GPU is spending cycles on dequantization compute rather than idling on memory.
Questions for Maintainers
Float8WeightOnlyConfigintended to work efficiently for inference on Blackwell, or is it primarily a training-oriented API?torch 2.12.0.dev + cu128?Float8DynamicActivationFloat8WeightConfigor a different FP8 path be more appropriate for inference throughput?Context
This data is from a systematic energy efficiency study of quantization methods across Ada Lovelace and Blackwell architectures. Full dataset (113+ measurements) and benchmark code available at:
bench_fp8_vs_all.pyWe would be happy to run additional diagnostics or test a patched version if the team can suggest one.