OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Deepseek 671B Sft Guide

Deepseek 671B Sft Guide is an open-source Python repository providing model code, scripts and workflow notes for full-parameter fine-tuning of DeepSeek-V3/R1 671B, from training data preparation through inference.

Independent OpenViST project profile, based on linked sources.

Deepseek 671B Sft Guide — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Create and activate the Conda environment with Python 3.10: conda create -n ds_env python=3.10 and conda activate ds_env.

  2. Install project dependencies with the command below.

    Documented command
    pip install -r requirements.txt
  3. Set YOUR_ENV_PATH to the environment’s site-packages directory, then copy the project’s xtuner code into it: cp -r ./code/xtuner $YOUR_ENV_PATH.

  4. Format examples as messages; for reasoning data, combine reasoning and final answer in the assistant content using ..., and set the assistant message’s loss field to true when 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 loss set to true is included in loss calculation.
  • This guide covers setup and data formatting, not execution of fine-tuning.
Source-based practical guide

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

  1. Set HEAD_ADDR=node0, DASHBOARD_PORT=8265, HEAD_PORT=6379, RAY_TMPDIR=/tmp/ray_tmp/, and RAY_ADDRESS=$HEAD_ADDR:$HEAD_PORT on node0 through node3.

  2. 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.
Evidence and transparency

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