Instructions to use wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic") model = AutoModelForCausalLM.from_pretrained("wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic
- SGLang
How to use wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic 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 "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic" \ --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": "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic", "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 "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic" \ --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": "wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic with Docker Model Runner:
docker model run hf.co/wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic
Qwen2.5-7B-Instruct-FP8-Dynamic
An FP8 quantization of Qwen/Qwen2.5-7B-Instruct, produced with llm-compressor for the benchmark project vllm-serve-bench. Not an official Qwen release.
Scheme
- Weights: every
Linearlayer is FP8 (E4M3) with one static scale per output channel. - Activations: FP8, with a scale computed per token at run time (dynamic), so no calibration data was used.
- Kept in bf16:
lm_head. It maps to the full vocabulary, and its errors land directly on the output distribution. - KV cache: not quantized.
- Format:
compressed-tensors. vLLM reads the scheme fromconfig.json, so no--quantizationflag is needed.
recipe.yaml is the exact llm-compressor recipe. provenance.json records the source snapshot,
tool versions, device and time taken.
Reproduce
pip install -r scripts/quantize/requirements.txt # pinned toolchain
python scripts/quantize/quantize.py --model Qwen/Qwen2.5-7B-Instruct --out <dir>
Both files are in the repository.
Serve
vllm serve wrbooth/Qwen2.5-7B-Instruct-FP8-Dynamic
Tested with vLLM 0.29.0 on an RTX 5090 (Blackwell, sm_120), where vLLM selects a CUTLASS FP8 kernel.
Measured
Serving performance against the bf16 original, with the same engine flags, sweep and SLOs, is in docs/03-results.md (Experiment B2). Every figure there is generated from committed raw results.
A quality smoke check is in results/quality/report.md: greedy decoding on a small fixed set of exact-answer and open prompts, compared with bf16.
Limitations
- The quality check is a smoke test on a small hand-written prompt set, scored by containment. It is not an evaluation. Use a proper eval suite before relying on this checkpoint.
- FP8 kernels need hardware support (Ada, Hopper, Blackwell). Elsewhere vLLM may fall back or refuse.
- Performance results come from one consumer GPU. They do not transfer to other hardware.
License
Apache 2.0, as for the base model.
- Downloads last month
- 34