Instructions to use talumbau/Qwen2.5-72B-Instruct-mxfp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use talumbau/Qwen2.5-72B-Instruct-mxfp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="talumbau/Qwen2.5-72B-Instruct-mxfp8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("talumbau/Qwen2.5-72B-Instruct-mxfp8") model = AutoModelForCausalLM.from_pretrained("talumbau/Qwen2.5-72B-Instruct-mxfp8", 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 talumbau/Qwen2.5-72B-Instruct-mxfp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "talumbau/Qwen2.5-72B-Instruct-mxfp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "talumbau/Qwen2.5-72B-Instruct-mxfp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/talumbau/Qwen2.5-72B-Instruct-mxfp8
- SGLang
How to use talumbau/Qwen2.5-72B-Instruct-mxfp8 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 "talumbau/Qwen2.5-72B-Instruct-mxfp8" \ --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": "talumbau/Qwen2.5-72B-Instruct-mxfp8", "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 "talumbau/Qwen2.5-72B-Instruct-mxfp8" \ --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": "talumbau/Qwen2.5-72B-Instruct-mxfp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use talumbau/Qwen2.5-72B-Instruct-mxfp8 with Docker Model Runner:
docker model run hf.co/talumbau/Qwen2.5-72B-Instruct-mxfp8
Qwen2.5-72B-Instruct — MXFP8 Quantization
This is an MXFP8-quantized derivative of Qwen/Qwen2.5-72B-Instruct, produced using llm-compressor v0.13.0.
Quantization details
| Property | Value |
|---|---|
| Format | OCP MX FP8 (E4M3) |
| Block size | 32 elements |
| Scale dtype | uint8 (E8M0) |
| Weight quantization | Static, per 32-element group |
| Activation quantization | Dynamic, per 32-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
MXFP8 hardware acceleration requires AMD MI350X / MI355X (CDNA4, gfx950) with ROCm ≥ 7.2.0, or NVIDIA Blackwell (SM100+).
Note: This checkpoint will NOT run correctly on AMD MI300X (gfx942) or NVIDIA Hopper (H100/H200). Those GPUs use different FP8 encodings (FNUZ and E4M3FNUZ respectively) that are incompatible with the OCP MX format stored here.
Usage with vLLM
from vllm import LLM, SamplingParams
llm = LLM(
model="talumbau/Qwen2.5-72B-Instruct-mxfp8",
# 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 talumbau/Qwen2.5-72B-Instruct-mxfp8
Comparison variants
This checkpoint is part of a three-format study:
| Variant | Repo | Format |
|---|---|---|
| bf16 (original) | Qwen/Qwen2.5-72B-Instruct |
bfloat16 |
| fp8 (per-channel/per-token) | RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic |
compressed-tensors fp8 |
| mxfp8 (this repo) | talumbau/Qwen2.5-72B-Instruct-mxfp8 |
OCP MX FP8, block_size=32 |
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 OCP MX FP8 format using llm-compressor v0.13.0. No fine-tuning or other modifications were made.
- Downloads last month
- 32