Instructions to use rkayaith/Qwen2.5-72B-Instruct-fp8-block with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rkayaith/Qwen2.5-72B-Instruct-fp8-block with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rkayaith/Qwen2.5-72B-Instruct-fp8-block") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rkayaith/Qwen2.5-72B-Instruct-fp8-block") model = AutoModelForCausalLM.from_pretrained("rkayaith/Qwen2.5-72B-Instruct-fp8-block", 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 rkayaith/Qwen2.5-72B-Instruct-fp8-block with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rkayaith/Qwen2.5-72B-Instruct-fp8-block" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rkayaith/Qwen2.5-72B-Instruct-fp8-block", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rkayaith/Qwen2.5-72B-Instruct-fp8-block
- SGLang
How to use rkayaith/Qwen2.5-72B-Instruct-fp8-block 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 "rkayaith/Qwen2.5-72B-Instruct-fp8-block" \ --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": "rkayaith/Qwen2.5-72B-Instruct-fp8-block", "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 "rkayaith/Qwen2.5-72B-Instruct-fp8-block" \ --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": "rkayaith/Qwen2.5-72B-Instruct-fp8-block", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rkayaith/Qwen2.5-72B-Instruct-fp8-block with Docker Model Runner:
docker model run hf.co/rkayaith/Qwen2.5-72B-Instruct-fp8-block
Qwen2.5-72B-Instruct — FP8 Block Quantization
This is an FP8-block-quantized derivative of
Qwen/Qwen2.5-72B-Instruct,
produced using
llm-compressor
v0.13.1.dev2.
Quantization details
| Property | Value |
|---|---|
| Format | FP8 E4M3 with block scaling |
| Weight block size | 128×128 |
| Activation group size | 128 elements |
| Weight quantization | Static, per 128×128 block |
| Activation quantization | Dynamic, per 128-element group |
| Layers quantized | All nn.Linear in the 80 decoder layers (560 total) |
| Layers skipped | lm_head, embed_tokens |
| Checkpoint format | compressed-tensors (auto-detected by vLLM) |
The quantized layers cover all attention projections (q_proj, k_proj,
v_proj, o_proj) and MLP projections (gate_proj, up_proj, down_proj)
in every decoder layer.
Hardware requirements
FP8 block acceleration requires hardware and a vLLM backend with block-scaled FP8 linear support. This checkpoint was validated on AMD MI350X (CDNA4, gfx950) with ROCm 7.2.3.
Note: Other hardware configurations have not been validated with this checkpoint.
Usage with vLLM
from vllm import LLM, SamplingParams
llm = LLM(
model="rkayaith/Qwen2.5-72B-Instruct-fp8-block",
# vLLM auto-detects compressed-tensors format — no --quantization flag needed
)
outputs = llm.generate(
["Tell me about AMD MI350X"],
SamplingParams(max_tokens=200, temperature=0.7),
)
print(outputs[0].outputs[0].text)
Or from the command line:
vllm serve rkayaith/Qwen2.5-72B-Instruct-fp8-block
Comparison variants
This checkpoint is part of a four-format study:
| Variant | Repo | Format |
|---|---|---|
| BF16 (original) | Qwen/Qwen2.5-72B-Instruct |
BF16 |
| FP8 (per-channel/per-token) | RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic |
Compressed-Tensors FP8 |
| FP8 block (this repo) | rkayaith/Qwen2.5-72B-Instruct-fp8-block |
FP8 E4M3, 128×128 weight blocks, dynamic 128-element activation groups |
| MXFP8 | talumbau/Qwen2.5-72B-Instruct-mxfp8 |
OCP MXFP8, 32-element groups |
License
This derivative work is distributed under the
Qwen License Agreement.
Attribution: Qwen is licensed under the Qwen LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved.
Modifications: The original bfloat16 weights were post-training quantized to dynamic block FP8 format using LLM Compressor v0.13.1.dev2. No fine-tuning or other modifications were made.
- Downloads last month
- 13