Practical overview
When it fits
Use it when planning or adapting a substantial distributed fine-tuning workflow for DeepSeek-V3/R1 671B and you need model-specific scripts and notes covering training through inference.
Who it is for
- ML engineers setting up distributed full-parameter fine-tuning for DeepSeek-V3/R1 671B.
- Research teams reviewing model-specific training logic, data formatting and multi-node launch approaches.
Documented uses
- Adapt reasoning and multi-turn examples to the training format described by the project.
- Configure and launch distributed supervised fine-tuning using DeepSpeed ZeRO data parallelism and sequence parallelism.
- Use the project’s inference guidance to plan deployment with vLLM.
Requirements & limits
The repository is public and released under the Apache-2.0 license.
- The README’s example uses 32 machines, each with eight NVIDIA H100 80GB GPUs, Ubuntu 22.04 and CUDA 12.6; it does not give a smaller general-purpose hardware baseline.
- Setup involves Python 3.10, project requirements, and copying the project’s xtuner code into the installed package environment.
- The training script is described as single-node and must be launched across machines with distinct node-rank values.
- Inference instructions use vLLM and describe a four-machine, 32-GPU example for half-precision models.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare an environment and reasoning-format training data
Set up the Python environment and format assistant training examples for the DeepSeek V3/R1 fine-tuning workflow.
Before you start
- Python 3.10 and Conda.
- Project requirements.txt and the project’s ./code/xtuner directory.
- Training examples that can be represented with system, user, and assistant messages.
Steps
Create and activate the Conda environment with Python 3.10:
conda create -n ds_env python=3.10andconda activate ds_env.Install project dependencies with the command below.
pip install -r requirements.txtSet
YOUR_ENV_PATHto the environment’s site-packages directory, then copy the project’s xtuner code into it:cp -r ./code/xtuner $YOUR_ENV_PATH.Format examples as messages; for reasoning data, combine reasoning and final answer in the assistant content using
..., and set the assistant message’slossfield totruewhen it should contribute to loss.
Expected outcome
A Python environment with the project’s xtuner code copied into it, and training examples formatted for the described reasoning-aware data format.
Guide limitations
- The documented environment overwrite uses a path that must be modified for the local environment.
- Only assistant content with
lossset totrueis included in loss calculation. - This guide covers setup and data formatting, not execution of fine-tuning.
Start a Ray head for a four-node vLLM deployment
Set the documented Ray environment variables on node0 through node3 and start the Ray head on node0 as a deployment setup stage.
Before you start
- A vLLM environment created according to the vLLM official documentation.
- A pdsh-accessible cluster with nodes named node0 through node3.
Steps
Set
HEAD_ADDR=node0,DASHBOARD_PORT=8265,HEAD_PORT=6379,RAY_TMPDIR=/tmp/ray_tmp/, andRAY_ADDRESS=$HEAD_ADDR:$HEAD_PORTon node0 through node3.Start the Ray head on node0 using the README’s pdsh command for that step.
Expected outcome
The documented deployment setup reaches the Ray-head startup stage on node0.
Guide limitations
- The README content available here ends during the Ray-head command, so it does not provide the command text or subsequent worker, model-serving, or verification steps.
- For the Slurm route, the README names
sbatch ./code/scripts/vllm_deploy_slurm.sh; it recommends 4 machines with 32 cards for half-precision bf16/fp16 models. - Ray or API-server ports can be configured by modifying the deployment shell script.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 6 November 2026
- Original website title
- ScienceOne-AI/DeepSeek-671B-SFT-Guide · Official homepage title · retained in its source language

