• Data di fondazione Agosto 2, 1979
  • Sectors pulizie
  • Offerte di Lavoro 0
  • Visitato 5

Descrizione

GitHub – Deepseek-ai/DeepSeek-V3

We present DeepSeek-V3, a strong Mixture-of-Experts (MoE) language model with 671B total criteria with 37B triggered for each token. To accomplish efficient inference and cost-effective training, DeepSeek-V3 adopts Multi-head Latent Attention (MLA) and DeepSeekMoE architectures, which were completely confirmed in DeepSeek-V2. Furthermore, DeepSeek-V3 pioneers an auxiliary-loss-free method for load balancing and sets a multi-token prediction training goal for stronger performance. We pre-train DeepSeek-V3 on 14.8 trillion varied and top quality tokens, followed by Supervised Fine-Tuning and Reinforcement to fully harness its capabilities. Comprehensive evaluations expose that DeepSeek-V3 surpasses other open-source designs and accomplishes efficiency comparable to leading closed-source designs. Despite its outstanding efficiency, DeepSeek-V3 requires just 2.788 M H800 GPU hours for its full training. In addition, its training procedure is extremely stable. Throughout the entire training process, we did not experience any irrecoverable loss spikes or perform any rollbacks.

2. Model Summary

Architecture: Innovative Load Balancing Strategy and Training Objective

– On top of the effective architecture of DeepSeek-V2, we pioneer an auxiliary-loss-free method for load balancing, which decreases the performance degradation that arises from motivating load balancing.
– We investigate a Multi-Token Prediction (MTP) goal and show it advantageous to model efficiency. It can likewise be used for speculative decoding for reasoning acceleration.

Pre-Training: Towards Ultimate Training Efficiency

– We create an FP8 combined precision training framework and, for the very first time, validate the expediency and efficiency of FP8 training on an incredibly massive model.
– Through co-design of algorithms, frameworks, and hardware, we get rid of the interaction traffic jam in cross-node MoE training, almost attaining complete computation-communication overlap.
This substantially improves our training efficiency and reduces the training costs, allowing us to even more scale up the model size without additional overhead.
– At an affordable cost of just 2.664 M H800 GPU hours, we finish the pre-training of DeepSeek-V3 on 14.8 T tokens, producing the currently strongest open-source base design. The subsequent training phases after pre-training need just 0.1 M GPU hours.

Post-Training: Knowledge Distillation from DeepSeek-R1

– We introduce an ingenious method to boil down reasoning abilities from the long-Chain-of-Thought (CoT) design, particularly from one of the DeepSeek R1 series models, into basic LLMs, particularly DeepSeek-V3. Our pipeline elegantly incorporates the confirmation and reflection patterns of R1 into DeepSeek-V3 and significantly enhances its thinking efficiency. Meanwhile, we likewise keep a control over the output design and length of DeepSeek-V3.

3. Model Downloads

The overall size of DeepSeek-V3 designs on Hugging Face is 685B, which consists of 671B of the Main Model weights and 14B of the Multi-Token Prediction (MTP) Module weights. **

To ensure optimal efficiency and versatility, we have actually partnered with open-source communities and hardware suppliers to provide several ways to run the model in your area. For detailed assistance, have a look at Section 6: How_to Run_Locally.

For developers looking to dive much deeper, we recommend exploring README_WEIGHTS. md for details on the Main Model weights and the Multi-Token Prediction (MTP) Modules. Please note that MTP assistance is presently under active advancement within the community, and we invite your contributions and feedback.

4. Evaluation Results

Base Model

Standard Benchmarks

Best results are shown in bold. Scores with a space not surpassing 0.3 are thought about to be at the same level. DeepSeek-V3 attains the very best efficiency on a lot of criteria, especially on mathematics and code tasks. For more evaluation details, please check our paper.

Context Window

Evaluation results on the Needle In A Haystack (NIAH) tests. DeepSeek-V3 carries out well throughout all context window lengths approximately 128K.

Chat Model

Standard Benchmarks (Models bigger than 67B)

All models are examined in a setup that limits the output length to 8K. Benchmarks consisting of less than 1000 samples are checked numerous times utilizing varying temperature level settings to obtain robust outcomes. DeepSeek-V3 stands as the best-performing open-source model, and also exhibits competitive performance against frontier closed-source models.

Open Ended Generation Evaluation

English open-ended discussion assessments. For AlpacaEval 2.0, we utilize the length-controlled win rate as the metric.

5. Chat Website & API Platform

You can talk with DeepSeek-V3 on DeepSeek’s main website: chat.deepseek.com

We also offer OpenAI-Compatible API at DeepSeek Platform: platform.deepseek.com

6. How to Run Locally

DeepSeek-V3 can be released in your area using the following hardware and open-source neighborhood software:

DeepSeek-Infer Demo: We offer a simple and lightweight demonstration for FP8 and BF16 reasoning.
SGLang: Fully support the DeepSeek-V3 design in both BF16 and FP8 inference modes, with Multi-Token Prediction coming soon.
LMDeploy: Enables efficient FP8 and BF16 reasoning for local and cloud implementation.
TensorRT-LLM: Currently supports BF16 inference and INT4/8 quantization, with FP8 assistance coming quickly.
vLLM: Support DeepSeek-V3 design with FP8 and BF16 modes for tensor parallelism and pipeline parallelism.
AMD GPU: Enables running the DeepSeek-V3 design on AMD GPUs by means of SGLang in both BF16 and FP8 modes.
Huawei Ascend NPU: Supports running DeepSeek-V3 on Huawei Ascend gadgets.
Since FP8 training is natively embraced in our structure, we only offer FP8 weights. If you need BF16 weights for experimentation, you can utilize the supplied conversion script to carry out the change.

Here is an example of converting FP8 weights to BF16:

Hugging Face’s Transformers has actually not been straight supported yet. **

6.1 Inference with DeepSeek-Infer Demo (example only)

System Requirements

Note

Linux with Python 3.10 only. Mac and Windows are not supported.

Dependencies:

Model Weights & Demo Code Preparation

First, clone our DeepSeek-V3 GitHub repository:

Navigate to the inference folder and install dependences listed in requirements.txt. Easiest method is to utilize a plan manager like conda or uv to produce a new virtual environment and set up the dependences.

Download the model weights from Hugging Face, and put them into/ path/to/DeepSeek-V 3 folder.

Model Weights Conversion

Convert Hugging Face design weights to a particular format:

Run

Then you can talk with DeepSeek-V3:

Or batch inference on an offered file:

6.2 Inference with SGLang (advised)

SGLang currently supports MLA optimizations, DP Attention, FP8 (W8A8), FP8 KV Cache, and Torch Compile, providing state-of-the-art latency and throughput performance amongst open-source structures.

Notably, SGLang v0.4.1 completely supports running DeepSeek-V3 on both NVIDIA and AMD GPUs, making it an extremely versatile and robust solution.

SGLang likewise supports multi-node tensor parallelism, enabling you to run this design on numerous network-connected makers.

Multi-Token Prediction (MTP) is in advancement, and progress can be tracked in the optimization strategy.

Here are the launch guidelines from the SGLang group: https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3

6.3 Inference with LMDeploy (advised)

LMDeploy, a flexible and high-performance inference and serving framework customized for big language designs, now supports DeepSeek-V3. It offers both offline pipeline processing and online implementation abilities, seamlessly integrating with PyTorch-based workflows.

For detailed step-by-step directions on running DeepSeek-V3 with LMDeploy, please refer to here: InternLM/lmdeploy # 2960

6.4 Inference with TRT-LLM (suggested)

TensorRT-LLM now supports the DeepSeek-V3 design, using precision options such as BF16 and INT4/INT8 weight-only. Support for FP8 is currently in development and will be launched soon. You can access the customized branch of TRTLLM particularly for DeepSeek-V3 assistance through the following link to experience the brand-new functions directly: https://github.com/NVIDIA/TensorRT-LLM/tree/deepseek/examples/deepseek_v3.

6.5 Inference with vLLM (advised)

vLLM v0.6.6 supports DeepSeek-V3 reasoning for FP8 and BF16 modes on both NVIDIA and AMD GPUs. Aside from basic strategies, vLLM uses pipeline parallelism allowing you to run this design on multiple devices linked by networks. For comprehensive guidance, please refer to the vLLM instructions. Please feel free to follow the enhancement strategy also.

6.6 Recommended Inference Functionality with AMD GPUs

In collaboration with the AMD group, we have attained Day-One assistance for AMD GPUs using SGLang, with complete compatibility for both FP8 and BF16 precision. For detailed assistance, please refer to the SGLang guidelines.

6.7 Recommended Inference Functionality with Huawei Ascend NPUs

The MindIE structure from the Huawei Ascend community has effectively adapted the BF16 version of DeepSeek-V3. For step-by-step assistance on Ascend NPUs, please follow the instructions here.

7. License

This code repository is certified under the MIT License. Using DeepSeek-V3 Base/Chat models is subject to the Model License. DeepSeek-V3 series (consisting of Base and Chat) supports commercial use.


I NOSTRI AMICI:     diamoci una mano l'impronta