DeepSeek-671B-SFT-Guide

(★ 812)

An open-source solution for full parameter fine-tuning of DeepSeek-V3/R1 671B, including complete code and scripts from training to inference, as well as some practical experiences and conclusions. (DeepSeek-V3/R1 满血版 671B 全参数微调的开源解决方案,包含从训练到推理的完整代码和脚本,以及实践中积累一些经验和结论。)

File Explorer

  • .gitignore
  • LICENSE
  • log.png
  • README.md
  • README_zh.md
  • requirements.txt

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

conda activate

View Details ▼

Activate a conda environment.
See also: `conda deactivate`.

conda activate myenv

Activate an existing environment named `myenv`:

conda activate {{path/to/myenv}}

Activate an existing environment located at custom path:

conda activate --stack myenv

Stack `myenv` environment on top of a previous environment making libraries/commands/variables from both accessible:

🔍

conda create

View Details ▼

Create new conda environments.

conda create {{[-y|--yes]}} {{[-n|--name]}} py39 python=3.9 "numpy>=1.11" scipy

Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations:

conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}

Create a new environment named `myenv` and install packages listed in files:

conda create {{[-p|--prefix]}} {{path/to/myenv}}

Create a new environment at a custom path (i.e. prefix):

🔍

nvcc

View Details ▼

The NVIDIA CUDA Compiler Driver.

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}}

Compile a CUDA program:

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-g|--debug]}} {{[-G|--device-debug]}}

Generate debug information:

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-I|--include-path]}} {{path/to/includes}} {{[-L|--library-path]}} {{path/to/library}} {{[-l|--library]}} {{library_name}}

Include libraries from a different path:

🔍

nvidia-smi

View Details ▼

Aid the management and monitoring of NVIDIA GPU devices.

nvidia-smi

Display information on all available GPUs and processes using them:

nvidia-smi {{[-q|--query]}}

Display more detailed GPU information:

nvidia-smi dmon

Monitor overall GPU usage with 1-second update interval:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

fallocate

View Details ▼

Reserve or deallocate disk space to files.
The utility allocates space without zeroing.

fallocate {{[-l|--length]}} 700M {{path/to/file}}

Reserve a file taking up 700 MiB of disk space:

fallocate {{[-c|--collapse-range]}} {{[-l|--length]}} 200MB {{path/to/file}}

Shrink an already allocated file by 200 MB:

fallocate {{[-c|--collapse-range]}} {{[-o|--offset]}} 100M {{[-l|--length]}} 20M {{path/to/file}}

Shrink 20 MB of space after 100 MiB in a file:

🔍

lscpu

View Details ▼

Display information about the CPU architecture.

lscpu

Display information about all CPUs:

lscpu {{[-e|--extended]}}

Display information in a table:

lscpu {{[-e|--extended]}} {{[-b|--online]}}

Display only information about online CPUs in a table:

🔍

mkswap

View Details ▼

Set up a Linux swap area on a device or in a file.
Note: `path/to/file` can either point to a regular file or a swap partition.

sudo mkswap {{path/to/file}}

Set up a given swap area:

sudo mkswap {{[-c|--check]}} {{path/to/file}}

Check a partition for bad blocks before creating the swap area:

sudo mkswap {{[-L|--label]}} {{label}} {{/dev/sdXY}}

Specify a label for the partition (to allow `swapon` to use the label):

🔍

sbatch

View Details ▼

Submit a batch job to the SLURM scheduler.

sbatch {{path/to/job.sh}}

Submit a batch job:

sbatch --job-name={{myjob}} {{path/to/job.sh}}

Submit a batch job with a custom name:

sbatch --time={{00:30:00}} {{path/to/job.sh}}

Submit a batch job with a time limit of 30 minutes:

🔍

swapon

View Details ▼

Enable devices and files for swapping.
Note: `path/to/file` can either point to a regular file or a swap partition.

swapon

Show swap information:

sudo swapon {{path/to/file}}

Enable a given swap area:

sudo swapon {{[-a|--all]}}

Enable all swap areas specified in `/etc/fstab` except those with the `noauto` option:

// repository documentation