Text / Intermediate

Set up private chat with DeepSeek V4 Pro

Run DeepSeek V4 Pro locally using the publisher PyTorch inference code, convert the Hugging Face checkpoint to the project format, then start an interactive chat and confirm the model replies.

EstimatedSource checked 9/25/2026
LOCALRENTED GPU

Before you begin

Difficulty
Intermediate
Software
Linux, Python, PyTorch, torchrun (PyTorch distributed launcher), DeepSeek V4 Pro inference code from the publisher repository, Hugging Face model weights
Hardware
This setup uses Publisher PyTorch reference. The exact checkpoint format, context, and runtime overhead determine its memory need; a weight-file size alone is not a GPU recommendation.
TEXT / PUBLISHER PYTORCH REFERENCESOURCE-LINKED SETUP

Set up private chat with DeepSeek V4 Pro, step by step.

Run DeepSeek V4 Pro locally using the publisher PyTorch inference code, convert the Hugging Face checkpoint to the project format, then start an interactive chat and confirm the model replies.

Choose a package Run its commands Check the result
01
BEFORE YOU BEGIN

The documented package

This setup uses the package documented for this task. Review its source and supported platforms before starting.

The publisher has not provided a complete memory target for this task. Check its hardware guidance before starting.

CURRENT SETUP

DeepSeek V4 Pro · official

This setup uses Publisher PyTorch reference. The exact checkpoint format, context, and runtime overhead determine its memory need; a weight-file size alone is not a GPU recommendation.

View weight source
02
THE WORKFLOW

Set up DeepSeek V4 Pro on your machine

Pick your operating system. Every command below is for the selected package and runtime.

The publisher supplies Python code but does not specify an operating system. Linux is a practical starting environment, not a publisher-tested machine. Run the Python snippets in one session, in order.

01

Prepare the Linux GPU environment

Use a Linux host or rented GPU instance with Python and PyTorch installed, including the torchrun launcher. Obtain the DeepSeek V4 Pro inference code and the Hugging Face checkpoint files for deepseek-ai/DeepSeek-V4-Pro on local storage. Set HF_CKPT_PATH to the directory containing the downloaded Hugging Face weights, and SAVE_PATH to a local directory where you want the converted project-format checkpoint to be written.

02

Convert the Hugging Face weights to the project format

From the inference code directory, run the publisher conversion command. EXPERTS, MP, and CONFIG are set to the documented values; HF_CKPT_PATH and SAVE_PATH must point to your local Hugging Face weights and desired output directory.

export EXPERTS=384 export MP=8 export CONFIG=config.json python convert.py --hf-ckpt-path ${HF_CKPT_PATH} --save-path ${SAVE_PATH} --n-experts ${EXPERTS} --model-parallel ${MP}
03

Start the interactive chat

Launch the interactive generation client against the converted checkpoint. This starts a local distributed process across the number of GPUs given by MP and opens a prompt in the terminal.

torchrun --nproc-per-node ${MP} generate.py --ckpt-path ${SAVE_PATH} --config ${CONFIG} --interactive
04

Send the first prompt

At the interactive prompt, enter a short text request such as: Hello DeepSeek V4 Pro, please reply with a one-sentence greeting. Press Enter and wait for the model to generate a response in the terminal.

05

Confirm the model responded

Inspect the terminal output. A successful result is a generated text reply from the selected DeepSeek V4 Pro model after your prompt, not just the launcher banner. The reply should be coherent and relevant to your input. If no text appears, check the conversion output directory and the SAVE_PATH value, then retry.

03
SUCCESS CHECK · DeepSeek V4 Pro

Check the first local reply

Ask a short question with a known answer. Confirm the selected local model responds and verify the answer yourself before using it for private work.

This is a source-linked setup, not a YouRunAI hardware test. Confirm your exact runtime version, package, and output before relying on it.

Back to setup steps

When it doesn’t go to plan

torchrun fails to launch or reports a GPU count mismatch.

Confirm MP matches the number of GPUs available on the machine, since the publisher command uses --nproc-per-node ${MP}. Adjust the MP export only if your hardware topology matches a supported configuration.

convert.py cannot find the Hugging Face weights.

Verify HF_CKPT_PATH points to the directory containing the downloaded deepseek-ai/DeepSeek-V4-Pro weights and that CONFIG resolves to the project config.json.

The interactive client starts but no model output appears.

Check that SAVE_PATH contains the converted checkpoint produced by convert.py, and that the --ckpt-path value passed to generate.py matches that directory.

REFERENCE LIBRARY

Sources and files

Original instructions, model files, and compatibility notes behind this setup.

2 SOURCES

The model behind this workflow

DeepSeek V4 Pro
MY HARDWARE

Will it run on your machine?

Save your machine to see a personalized rating and its reasoning.

Add my hardware

Keep exploring