DeepSeek-R1: Optimized for AMD ROCm
DeepSeek-R1-Distill-Qwen-7B is a distilled reasoning language model that generates chain-of-thought answers for math and logic problems. This repository packages evaluation/inference for text reasoning / math problem solving using vLLM, exported and validated for AMD ROCm so it runs efficiently on AMD GPUs and CPUs.
This is based on the implementation of DeepSeek-R1 found here. This repository contains configurations and scripts optimized for AMD® ROCm™ platforms. You can use the deepseek_r1 AMD scripts to reproduce results or export with custom configurations. More details on model performance can be found here.
Task Overview
Task: Text reasoning / math problem solving
Dataset: MATH-500 (500 competition math problems); sample prompts for infer-text
Output metrics: MATH-500 accuracy
vLLM note: MATH-500 evaluation uses symbolic answer verification through
math_verify, which parses\boxed{}expressions and checks equivalence to the reference solution.
AMD ROCm Optimization
This model export has been adapted and validated for AMD Instinct™ / Radeon™ GPUs running ROCm, as well as AMD CPUs. Key points:
- Exported/tested with ROCm
7.2and vLLM ROCm build0.19.1(built from source). - Validated backends: vLLM (ROCm-enabled build).
- No code changes required versus the upstream DeepSeek-R1 implementation — only environment/runtime configuration differs.
| Runtime | Precision | Backend | Hardware | Notes |
|---|---|---|---|---|
| GPU | FP32 / FP16 / BF16 | vLLM | AMD RYZEN AI MAX+ 395 w/ Radeon 8060S | VLLM_ROCM_USE_SKINNY_GEMM=0 set to avoid bf16/fp16 GEMM segfaults on gfx1151 |
Getting Started
For setup instructions, evaluation scripts, and custom configuration options, see the deepseek_r1 on GitHub.
Model Details
Model Type: Distilled reasoning language model (text generation)
Base Model: Qwen/Qwen2.5-7B (Qwen2.5-7B)
Model Stats:
- Model variant: DeepSeek-R1-Distill-Qwen-7B
- Number of parameters:
7B - Precision tested: FP32, FP16, BF16
Accuracy Pipeline
Higher MATH-500 accuracy means the model produces mathematically equivalent answers to ground truth more often — 100% would be perfect, ~0% is chance-level. Strong distilled reasoning models typically score ~85–95% on this benchmark.
Metrics Explained
| Metric | Description |
|---|---|
| MATH-500 Accuracy | Primary metric — fraction of problems where the model's final boxed answer is symbolically equivalent to the reference solution. |
Accuracy Results
Full Dataset Evaluation (MATH-500) — filled from deepseek-ai/DeepSeek-R1-Distill-Qwen-7B; run make metrics to refresh:
| Device | Backend | Precision | Variant | Accuracy (%) |
|---|---|---|---|---|
| GPU | vLLM | FP32 | DeepSeek-R1-Distill-Qwen-7B | 90.00 |
| GPU | vLLM | FP16 | DeepSeek-R1-Distill-Qwen-7B | 90.00 |
| GPU | vLLM | BF16 | DeepSeek-R1-Distill-Qwen-7B | 90.00 |
Dig Deeper
Want to explore the full evaluation scripts, config options, and other AMD-optimized model examples?
📂 View the full project on GitHub
The GitHub repository includes:
- Setup and prerequisites for ROCm environments
- Scripts for the supported runners
- Additional model variants and datasets
- Benchmarking and reproduction instructions
