mirror of
https://github.com/deepseek-ai/DeepSeek-V3.git
synced 2025-02-23 14:18:57 -05:00
Update README.md
This commit is contained in:
parent
2f7b80eece
commit
d389e53687
306
README.md
306
README.md
@ -8,10 +8,10 @@
|
||||
<hr>
|
||||
<div align="center" style="line-height: 1;">
|
||||
<a href="https://www.deepseek.com/" target="_blank" style="margin: 2px;">
|
||||
<img alt="Homepage" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
|
||||
<img alt="Ana Sayfa" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
<a href="https://chat.deepseek.com/" target="_blank" style="margin: 2px;">
|
||||
<img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V3-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
<img alt="Mesaj" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V3-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
<a href="https://huggingface.co/deepseek-ai" target="_blank" style="margin: 2px;">
|
||||
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
@ -26,105 +26,120 @@
|
||||
<img alt="Wechat" src="https://img.shields.io/badge/WeChat-DeepSeek%20AI-brightgreen?logo=wechat&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
<a href="https://twitter.com/deepseek_ai" target="_blank" style="margin: 2px;">
|
||||
<img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-deepseek_ai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
<img alt="Twitter Takip" src="https://img.shields.io/badge/Twitter-deepseek_ai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center" style="line-height: 1;">
|
||||
<a href="https://github.com/deepseek-ai/DeepSeek-V3/blob/main/LICENSE-CODE" style="margin: 2px;">
|
||||
<img alt="Code License" src="https://img.shields.io/badge/Code_License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
||||
<img alt="Kod Lisansı" src="https://img.shields.io/badge/Code_License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
<a href="https://github.com/deepseek-ai/DeepSeek-V3/blob/main/LICENSE-MODEL" style="margin: 2px;">
|
||||
<img alt="Model License" src="https://img.shields.io/badge/Model_License-Model_Agreement-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
||||
<img alt="Model Lisansı" src="https://img.shields.io/badge/Model_License-Model_Agreement-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="DeepSeek_V3.pdf"><b>Paper Link</b>👁️</a>
|
||||
<a href="DeepSeek_V3.pdf"><b>Makale Bağlantısı</b>👁️</a>
|
||||
</p>
|
||||
|
||||
## Table of Contents
|
||||
## İçindekiler
|
||||
|
||||
1. [Introduction](#1-introduction)
|
||||
2. [Model Summary](#2-model-summary)
|
||||
3. [Model Downloads](#3-model-downloads)
|
||||
4. [Evaluation Results](#4-evaluation-results)
|
||||
5. [Chat Website & API Platform](#5-chat-website--api-platform)
|
||||
6. [How to Run Locally](#6-how-to-run-locally)
|
||||
7. [License](#7-license)
|
||||
8. [Citation](#8-citation)
|
||||
9. [Contact](#9-contact)
|
||||
1. [Giriş](#1-introduction)
|
||||
2. [Model Özeti](#2-model-summary)
|
||||
3. [Model İndirmeleri](#3-model-downloads)
|
||||
4. [Değerlendirme sonuçları](#4-evaluation-results)
|
||||
5. [Sohbet Web Sitesi ve API Platformu](#5-chat-website--api-platform)
|
||||
6. [Yerel olarak nasıl çalıştırılır](#6-how-to-run-locally)
|
||||
7. [Lisans](#7-license)
|
||||
8. [Atıf](#8-citation)
|
||||
9. [İletişim](#9-contact)
|
||||
|
||||
|
||||
## 1. Introduction
|
||||
## 1. Giriş
|
||||
|
||||
DeepSeek-V3'ü sunuyoruz: 671 milyar toplam parametreye sahip güçlü bir Mixture-of-Experts (MoE) dil modeli ve her bir token için 37 milyar parametre etkinleştiriliyor.
|
||||
Verimli çıkarım ve maliyet açısından etkili bir eğitim sağlamak amacıyla DeepSeek-V3, Multi-head Latent Attention (MLA) ve DeepSeekMoE mimarilerini benimser; bu yaklaşımlar DeepSeek-V2'de kapsamlı şekilde doğrulanmıştır.
|
||||
Bunun yanı sıra, DeepSeek-V3, yük dengeleme için yardımcı kayıpsız (auxiliary-loss-free) bir strateji geliştirerek öncülük eder ve daha güçlü performans için çoklu token tahminine dayalı bir eğitim hedefi belirler.
|
||||
|
||||
DeepSeek-V3, 14.8 trilyon çeşitlendirilmiş ve yüksek kaliteli token üzerinde ön eğitimden geçirilmiş olup, ardından Denetimli İnce Ayar (Supervised Fine-Tuning) ve Takviyeli Öğrenme (Reinforcement Learning) aşamalarından geçirilerek yetenekleri tam anlamıyla optimize edilmiştir.
|
||||
Kapsamlı değerlendirmeler, DeepSeek-V3'ün diğer açık kaynak modellerini geride bıraktığını ve önde gelen kapalı kaynak modellerle karşılaştırılabilir bir performans sergilediğini göstermektedir.
|
||||
|
||||
Üstün performansına rağmen, DeepSeek-V3'ün tam eğitimi yalnızca **2.788 milyon H800 GPU saati** gerektirmektedir.
|
||||
Buna ek olarak, eğitim süreci son derece kararlıdır.
|
||||
Tüm eğitim süreci boyunca **geri döndürülemeyen kayıp artışları yaşanmadı ve herhangi bir geri alma (rollback) işlemi gerçekleştirilmedi**.
|
||||
|
||||
We present DeepSeek-V3, a strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token.
|
||||
To achieve efficient inference and cost-effective training, DeepSeek-V3 adopts Multi-head Latent Attention (MLA) and DeepSeekMoE architectures, which were thoroughly validated in DeepSeek-V2.
|
||||
Furthermore, DeepSeek-V3 pioneers an auxiliary-loss-free strategy for load balancing and sets a multi-token prediction training objective for stronger performance.
|
||||
We pre-train DeepSeek-V3 on 14.8 trillion diverse and high-quality tokens, followed by Supervised Fine-Tuning and Reinforcement Learning stages to fully harness its capabilities.
|
||||
Comprehensive evaluations reveal that DeepSeek-V3 outperforms other open-source models and achieves performance comparable to leading closed-source models.
|
||||
Despite its excellent performance, DeepSeek-V3 requires only 2.788M H800 GPU hours for its full training.
|
||||
In addition, its training process is remarkably stable.
|
||||
Throughout the entire training process, we did not experience any irrecoverable loss spikes or perform any rollbacks.
|
||||
<p align="center">
|
||||
<img width="80%" src="figures/benchmark.png">
|
||||
</p>
|
||||
|
||||
## 2. Model Summary
|
||||
## 2. Model Özeti
|
||||
|
||||
---
|
||||
|
||||
**Architecture: Innovative Load Balancing Strategy and Training Objective**
|
||||
**Mimari: Yenilikçi Yük Dengeleme Stratejisi ve Eğitim Hedefi**
|
||||
|
||||
- On top of the efficient architecture of DeepSeek-V2, we pioneer an auxiliary-loss-free strategy for load balancing, which minimizes the performance degradation that arises from encouraging load balancing.
|
||||
- We investigate a Multi-Token Prediction (MTP) objective and prove it beneficial to model performance.
|
||||
It can also be used for speculative decoding for inference acceleration.
|
||||
- DeepSeek-V2'nin verimli mimarisinin üzerine, **yardımcı kayıpsız (auxiliary-loss-free) bir yük dengeleme stratejisi** geliştirerek öncülük ediyoruz.
|
||||
Bu yaklaşım, yük dengelemenin teşvik edilmesinden kaynaklanan **performans kaybını en aza indirir**.
|
||||
- **Çoklu Token Tahmini (Multi-Token Prediction - MTP)** hedefini araştırıyor ve bunun model performansı açısından faydalı olduğunu kanıtlıyoruz.
|
||||
Ayrıca, bu yöntem **çıkarım sürecini hızlandırmak için spekülatif kod çözmede (speculative decoding) de kullanılabilir**.
|
||||
|
||||
---
|
||||
**Ön Eğitim: En Üst Düzey Eğitim Verimliliğine Doğru**
|
||||
|
||||
- **FP8 karma hassasiyetli eğitim çerçevesi** tasarladık ve **ilk kez** FP8 eğitiminin **son derece büyük ölçekli bir modelde uygulanabilirliğini ve etkinliğini doğruladık**.
|
||||
- **Algoritmalar, çerçeveler ve donanımların ortak tasarımı** sayesinde, düğümler arası **MoE eğitimindeki iletişim darboğazını** aştık ve neredeyse **tam hesaplama-iletişim örtüşmesi** sağladık.
|
||||
Bu, eğitim verimliliğimizi önemli ölçüde artırırken **eğitim maliyetlerini düşürerek** model boyutunu ek maliyet olmadan daha da ölçeklendirmemize olanak tanır.
|
||||
- **Sadece 2.664 milyon H800 GPU saati** gibi ekonomik bir maliyetle, DeepSeek-V3'ün 14.8 trilyon token üzerinde ön eğitimini tamamladık ve **mevcut en güçlü açık kaynaklı temel modeli ürettik**.
|
||||
Ön eğitim sonrası aşamalar ise **yalnızca 0.1 milyon GPU saati gerektirir**.
|
||||
|
||||
---
|
||||
|
||||
**Pre-Training: Towards Ultimate Training Efficiency**
|
||||
**Son Eğitim: DeepSeek-R1'den Bilgi Aktarımı**
|
||||
|
||||
- We design an FP8 mixed precision training framework and, for the first time, validate the feasibility and effectiveness of FP8 training on an extremely large-scale model.
|
||||
- Through co-design of algorithms, frameworks, and hardware, we overcome the communication bottleneck in cross-node MoE training, nearly achieving full computation-communication overlap.
|
||||
This significantly enhances our training efficiency and reduces the training costs, enabling us to further scale up the model size without additional overhead.
|
||||
- At an economical cost of only 2.664M H800 GPU hours, we complete the pre-training of DeepSeek-V3 on 14.8T tokens, producing the currently strongest open-source base model. The subsequent training stages after pre-training require only 0.1M GPU hours.
|
||||
|
||||
---
|
||||
|
||||
**Post-Training: Knowledge Distillation from DeepSeek-R1**
|
||||
|
||||
- We introduce an innovative methodology to distill reasoning capabilities from the long-Chain-of-Thought (CoT) model, specifically from one of the DeepSeek R1 series models, into standard LLMs, particularly DeepSeek-V3. Our pipeline elegantly incorporates the verification and reflection patterns of R1 into DeepSeek-V3 and notably improves its reasoning performance. Meanwhile, we also maintain a control over the output style and length of DeepSeek-V3.
|
||||
- **Uzun Zincirleme Düşünme (Chain-of-Thought - CoT) modelinin** akıl yürütme yeteneklerini, özellikle **DeepSeek R1 serisi modellerinden biri üzerinden**, standart büyük dil modellerine (LLM) ve özellikle DeepSeek-V3'e aktarmak için yenilikçi bir yöntem geliştirdik.
|
||||
- **Doğrulama ve yansıtma (reflection) desenlerini** R1'den DeepSeek-V3'e **şık bir şekilde entegre eden** bu süreç, modelin **akıl yürütme performansını önemli ölçüde artırırken**, **çıktı stilini ve uzunluğunu da kontrol altında tutmamıza** olanak tanır.
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 3. Model Downloads
|
||||
## 3. Model İndirmeleri
|
||||
|
||||
<div align="center">
|
||||
|
||||
| **Model** | **#Total Params** | **#Activated Params** | **Context Length** | **Download** |
|
||||
| **Model** | **#Toplam Parametreler** | **#Etkin Parametreler** | **Bağlam uzunluğu** | **İndirme** |
|
||||
| :------------: | :------------: | :------------: | :------------: | :------------: |
|
||||
| DeepSeek-V3-Base | 671B | 37B | 128K | [🤗 Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-V3-Base) |
|
||||
| DeepSeek-V3 | 671B | 37B | 128K | [🤗 Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-V3) |
|
||||
|
||||
</div>
|
||||
|
||||
> [!NOTE]
|
||||
> The total size of DeepSeek-V3 models on Hugging Face is 685B, which includes 671B of the Main Model weights and 14B of the Multi-Token Prediction (MTP) Module weights.
|
||||
> [!NOTE]
|
||||
> **Hugging Face üzerindeki DeepSeek-V3 modellerinin toplam boyutu 685B'dir.**
|
||||
> Bu, **671B Ana Model ağırlıklarını** ve **14B Çoklu Token Tahmini (MTP) Modülü ağırlıklarını** içerir.
|
||||
|
||||
To ensure optimal performance and flexibility, we have partnered with open-source communities and hardware vendors to provide multiple ways to run the model locally. For step-by-step guidance, check out Section 6: [How_to Run_Locally](#6-how-to-run-locally).
|
||||
**Optimum performans ve esneklik sağlamak** için açık kaynak toplulukları ve donanım sağlayıcılarıyla iş birliği yaparak **modeli yerel olarak çalıştırmak için çeşitli yöntemler sunduk**.
|
||||
Adım adım rehberlik için **Bölüm 6: [Nasıl Yerel Çalıştırılır](#6-how-to-run-locally)** kısmına göz atabilirsiniz.
|
||||
|
||||
For developers looking to dive deeper, we recommend exploring [README_WEIGHTS.md](./README_WEIGHTS.md) for details on the Main Model weights and the Multi-Token Prediction (MTP) Modules. Please note that MTP support is currently under active development within the community, and we welcome your contributions and feedback.
|
||||
**Daha derin teknik ayrıntılarla ilgilenen geliştiriciler için**,
|
||||
**Ana Model ağırlıkları ve Çoklu Token Tahmini (MTP) Modülleri hakkında detaylı bilgileri** içeren
|
||||
[README_WEIGHTS.md](./README_WEIGHTS.md) dosyasını incelemenizi öneririz.
|
||||
|
||||
Lütfen unutmayın: **MTP desteği şu anda topluluk tarafından aktif olarak geliştirilmektedir**.
|
||||
**Katkılarınızı ve geri bildirimlerinizi memnuniyetle karşılıyoruz!**
|
||||
|
||||
---
|
||||
|
||||
## 4. Değerlendirme Sonuçları
|
||||
### Temel Model
|
||||
#### Standart Kıyaslamalar
|
||||
|
||||
## 4. Evaluation Results
|
||||
### Base Model
|
||||
#### Standard Benchmarks
|
||||
|
||||
<div align="center">
|
||||
|
||||
|
||||
| | Benchmark (Metric) | # Shots | DeepSeek-V2 | Qwen2.5 72B | LLaMA3.1 405B | DeepSeek-V3 |
|
||||
| | Performans Değerlendirmesi (Metrik) | # Shots | DeepSeek-V2 | Qwen2.5 72B | LLaMA3.1 405B | DeepSeek-V3 |
|
||||
|---|-------------------|----------|--------|-------------|---------------|---------|
|
||||
| | Architecture | - | MoE | Dense | Dense | MoE |
|
||||
| | # Activated Params | - | 21B | 72B | 405B | 37B |
|
||||
@ -164,22 +179,25 @@ For developers looking to dive deeper, we recommend exploring [README_WEIGHTS.md
|
||||
|
||||
</div>
|
||||
|
||||
> [!NOTE]
|
||||
> Best results are shown in bold. Scores with a gap not exceeding 0.3 are considered to be at the same level. DeepSeek-V3 achieves the best performance on most benchmarks, especially on math and code tasks.
|
||||
> For more evaluation details, please check our paper.
|
||||
> [!NOTE]
|
||||
> **En iyi sonuçlar kalın olarak gösterilmiştir.**
|
||||
> **Aralarındaki fark 0.3'ü geçmeyen skorlar aynı seviyede kabul edilir.**
|
||||
> **DeepSeek-V3, özellikle matematik ve kodlama görevlerinde olmak üzere, çoğu kıyaslamada en iyi performansı sergilemektedir.**
|
||||
> **Daha fazla değerlendirme detayı için lütfen makalemize göz atın.**
|
||||
|
||||
#### Context Window
|
||||
#### Bağlam penceresi
|
||||
<p align="center">
|
||||
<img width="80%" src="figures/niah.png">
|
||||
</p>
|
||||
|
||||
Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 performs well across all context window lengths up to **128K**.
|
||||
**"Needle In A Haystack" (NIAH) testlerindeki değerlendirme sonuçları.**
|
||||
DeepSeek-V3, **128K** bağlam penceresine kadar tüm uzunluklarda iyi performans göstermektedir.
|
||||
|
||||
### Chat Model
|
||||
#### Standard Benchmarks (Models larger than 67B)
|
||||
### Sohbet Modeli
|
||||
#### Standart Kıyaslamalar (67B'den büyük modeller)
|
||||
<div align="center">
|
||||
|
||||
| | **Benchmark (Metric)** | **DeepSeek V2-0506** | **DeepSeek V2.5-0905** | **Qwen2.5 72B-Inst.** | **Llama3.1 405B-Inst.** | **Claude-3.5-Sonnet-1022** | **GPT-4o 0513** | **DeepSeek V3** |
|
||||
| | **Performans Değerlendirmesi (Metrik)** | **DeepSeek V2-0506** | **DeepSeek V2.5-0905** | **Qwen2.5 72B-Inst.** | **Llama3.1 405B-Inst.** | **Claude-3.5-Sonnet-1022** | **GPT-4o 0513** | **DeepSeek V3** |
|
||||
|---|---------------------|---------------------|----------------------|---------------------|----------------------|---------------------------|----------------|----------------|
|
||||
| | Architecture | MoE | MoE | Dense | Dense | - | - | MoE |
|
||||
| | # Activated Params | 21B | 21B | 72B | 405B | - | - | 37B |
|
||||
@ -209,11 +227,12 @@ Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 pe
|
||||
|
||||
</div>
|
||||
|
||||
> [!NOTE]
|
||||
> All models are evaluated in a configuration that limits the output length to 8K. Benchmarks containing fewer than 1000 samples are tested multiple times using varying temperature settings to derive robust final results. DeepSeek-V3 stands as the best-performing open-source model, and also exhibits competitive performance against frontier closed-source models.
|
||||
> [!NOTE]
|
||||
> **Tüm modeller, çıktı uzunluğunu 8K ile sınırlayan bir yapılandırmada değerlendirilmiştir.**
|
||||
> **1000'den az örnek içeren kıyaslamalar, sağlam nihai sonuçlar elde etmek için farklı sıcaklık ayarları kullanılarak birden fazla kez test edilmiştir.**
|
||||
> **DeepSeek-V3, en iyi performans gösteren açık kaynak model olup, aynı zamanda öncü kapalı kaynak modellerle de rekabetçi bir performans sergilemektedir.**
|
||||
|
||||
|
||||
#### Open Ended Generation Evaluation
|
||||
#### Açık Uçlu Üretim Değerlendirmesi
|
||||
|
||||
<div align="center">
|
||||
|
||||
@ -229,132 +248,171 @@ Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 pe
|
||||
| DeepSeek-V3 | **85.5** | **70.0** |
|
||||
|
||||
</div>
|
||||
> [!NOTE]
|
||||
> **İngilizce açık uçlu konuşma değerlendirmeleri.**
|
||||
> **AlpacaEval 2.0 için, metrik olarak uzunluk kontrollü kazanma oranını kullanıyoruz.**
|
||||
|
||||
> [!NOTE]
|
||||
> English open-ended conversation evaluations. For AlpacaEval 2.0, we use the length-controlled win rate as the metric.
|
||||
## 5. Sohbet Web Sitesi & API Platformu
|
||||
|
||||
DeepSeek-V3 ile sohbet etmek için DeepSeek’in resmi web sitesini ziyaret edebilirsiniz:
|
||||
[chat.deepseek.com](https://chat.deepseek.com/sign_in)
|
||||
|
||||
## 5. Chat Website & API Platform
|
||||
You can chat with DeepSeek-V3 on DeepSeek's official website: [chat.deepseek.com](https://chat.deepseek.com/sign_in)
|
||||
Ayrıca, OpenAI uyumlu API’mizi DeepSeek Platformunda sağlıyoruz:
|
||||
[platform.deepseek.com](https://platform.deepseek.com/)
|
||||
|
||||
We also provide OpenAI-Compatible API at DeepSeek Platform: [platform.deepseek.com](https://platform.deepseek.com/)
|
||||
## 6. Yerel Olarak Nasıl Çalıştırılır
|
||||
|
||||
## 6. How to Run Locally
|
||||
DeepSeek-V3 aşağıdaki donanım ve açık kaynak topluluk yazılımları kullanılarak yerel olarak dağıtılabilir:
|
||||
|
||||
DeepSeek-V3 can be deployed locally using the following hardware and open-source community software:
|
||||
1. **DeepSeek-Infer Demo**: FP8 ve BF16 çıkarımı için basit ve hafif bir demo sağlıyoruz.
|
||||
2. **SGLang**: DeepSeek-V3 modelini hem BF16 hem de FP8 çıkarım modlarında tamamen destekler, Multi-Token Prediction ise [yakında geliyor](https://github.com/sgl-project/sglang/issues/2591).
|
||||
3. **LMDeploy**: Yerel ve bulut dağıtımı için verimli FP8 ve BF16 çıkarımına olanak tanır.
|
||||
4. **TensorRT-LLM**: Şu anda BF16 çıkarımını ve INT4/8 nicemlemeyi destekler, FP8 desteği yakında eklenecektir.
|
||||
5. **vLLM**: Tensor paralelliği ve ardışık işlem paralelliği için DeepSeek-V3 modelini FP8 ve BF16 modlarında destekler.
|
||||
6. **AMD GPU**: DeepSeek-V3 modelinin AMD GPU’lar üzerinde SGLang aracılığıyla BF16 ve FP8 modlarında çalıştırılmasını sağlar.
|
||||
7. **Huawei Ascend NPU**: DeepSeek-V3 modelinin Huawei Ascend cihazlarında çalıştırılmasını destekler.
|
||||
|
||||
1. **DeepSeek-Infer Demo**: We provide a simple and lightweight demo for FP8 and BF16 inference.
|
||||
2. **SGLang**: Fully support the DeepSeek-V3 model in both BF16 and FP8 inference modes, with Multi-Token Prediction [coming soon](https://github.com/sgl-project/sglang/issues/2591).
|
||||
3. **LMDeploy**: Enables efficient FP8 and BF16 inference for local and cloud deployment.
|
||||
4. **TensorRT-LLM**: Currently supports BF16 inference and INT4/8 quantization, with FP8 support coming soon.
|
||||
5. **vLLM**: Support DeepSeek-V3 model with FP8 and BF16 modes for tensor parallelism and pipeline parallelism.
|
||||
6. **AMD GPU**: Enables running the DeepSeek-V3 model on AMD GPUs via SGLang in both BF16 and FP8 modes.
|
||||
7. **Huawei Ascend NPU**: Supports running DeepSeek-V3 on Huawei Ascend devices.
|
||||
FP8 eğitimi çerçevemizde yerel olarak kullanıldığı için, yalnızca FP8 ağırlıklarını sağlıyoruz.
|
||||
Deneyleriniz için BF16 ağırlıklarına ihtiyacınız varsa, sağlanan dönüştürme betiğini kullanarak dönüşümü gerçekleştirebilirsiniz.
|
||||
|
||||
Since FP8 training is natively adopted in our framework, we only provide FP8 weights. If you require BF16 weights for experimentation, you can use the provided conversion script to perform the transformation.
|
||||
|
||||
Here is an example of converting FP8 weights to BF16:
|
||||
FP8 ağırlıklarını BF16'ya dönüştürme örneği:
|
||||
|
||||
```shell
|
||||
cd inference
|
||||
python fp8_cast_bf16.py --input-fp8-hf-path /path/to/fp8_weights --output-bf16-hf-path /path/to/bf16_weights
|
||||
```
|
||||
> [!NOTE]
|
||||
> Hugging Face'in Transformers kütüphanesi henüz doğrudan desteklenmemektedir.
|
||||
|
||||
> [!NOTE]
|
||||
> Hugging Face's Transformers has not been directly supported yet.
|
||||
### 6.1 DeepSeek-Infer Demo ile Çıkarım (sadece örnek)
|
||||
|
||||
### 6.1 Inference with DeepSeek-Infer Demo (example only)
|
||||
#### Sistem Gereksinimleri
|
||||
|
||||
#### System Requirements
|
||||
> [!NOTE]
|
||||
> **Yalnızca Python 3.10 ile Linux desteklenmektedir.**
|
||||
> **Mac ve Windows desteklenmemektedir.**
|
||||
|
||||
> [!NOTE]
|
||||
> Linux with Python 3.10 only. Mac and Windows are not supported.
|
||||
|
||||
Dependencies:
|
||||
Bağımlılıklar:
|
||||
```pip-requirements
|
||||
torch==2.4.1
|
||||
triton==3.0.0
|
||||
transformers==4.46.3
|
||||
safetensors==0.4.5
|
||||
```
|
||||
#### Model Weights & Demo Code Preparation
|
||||
|
||||
First, clone our DeepSeek-V3 GitHub repository:
|
||||
#### Model Ağırlıkları ve Demo Kodunun Hazırlanması
|
||||
|
||||
Öncelikle, DeepSeek-V3 GitHub deposunu klonlayın:
|
||||
```shell
|
||||
git clone https://github.com/deepseek-ai/DeepSeek-V3.git
|
||||
```
|
||||
|
||||
Navigate to the `inference` folder and install dependencies listed in `requirements.txt`. Easiest way is to use a package manager like `conda` or `uv` to create a new virtual environment and install the dependencies.
|
||||
`inference` klasörüne gidin ve `requirements.txt` dosyasında listelenen bağımlılıkları yükleyin.
|
||||
En kolay yöntem, `conda` veya `uv` gibi bir paket yöneticisi kullanarak yeni bir sanal ortam oluşturmak ve bağıml
|
||||
|
||||
|
||||
```shell
|
||||
cd DeepSeek-V3/inference
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Download the model weights from Hugging Face, and put them into `/path/to/DeepSeek-V3` folder.
|
||||
Model ağırlıklarını Hugging Face'den indirin ve `/path/to/DeepSeek-V3` klasörüne yerleştirin.
|
||||
|
||||
#### Model Weights Conversion
|
||||
#### Model Ağırlıklarını Dönüştürme
|
||||
|
||||
Convert Hugging Face model weights to a specific format:
|
||||
Hugging Face model ağırlıklarını belirli bir formata dönüştürün:
|
||||
|
||||
```shell
|
||||
python convert.py --hf-ckpt-path /path/to/DeepSeek-V3 --save-path /path/to/DeepSeek-V3-Demo --n-experts 256 --model-parallel 16
|
||||
```
|
||||
|
||||
#### Run
|
||||
#### Çalıştırma
|
||||
|
||||
Then you can chat with DeepSeek-V3:
|
||||
Ardından DeepSeek-V3 ile sohbet edebilirsiniz:
|
||||
|
||||
```shell
|
||||
torchrun --nnodes 2 --nproc-per-node 8 --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --interactive --temperature 0.7 --max-new-tokens 200
|
||||
```
|
||||
|
||||
Or batch inference on a given file:
|
||||
Veya belirli bir dosyada toplu çıkarım:
|
||||
|
||||
```shell
|
||||
torchrun --nnodes 2 --nproc-per-node 8 --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --input-file $FILE
|
||||
```
|
||||
|
||||
### 6.2 Inference with SGLang (recommended)
|
||||
### 6.2 SGLang ile Çıkarım (Tavsiye Edilir)
|
||||
|
||||
[SGLang](https://github.com/sgl-project/sglang) currently supports [MLA optimizations](https://lmsys.org/blog/2024-09-04-sglang-v0-3/#deepseek-multi-head-latent-attention-mla-throughput-optimizations), [DP Attention](https://lmsys.org/blog/2024-12-04-sglang-v0-4/#data-parallelism-attention-for-deepseek-models), FP8 (W8A8), FP8 KV Cache, and Torch Compile, delivering state-of-the-art latency and throughput performance among open-source frameworks.
|
||||
[SGLang](https://github.com/sgl-project/sglang) şu anda [MLA optimizasyonları](https://lmsys.org/blog/2024-09-04-sglang-v0-3/#deepseek-multi-head-latent-attention-mla-throughput-optimizations), [DP Attention](https://lmsys.org/blog/2024-12-04-sglang-v0-4/#data-parallelism-attention-for-deepseek-models), FP8 (W8A8), FP8 KV Önbelleği ve Torch Compile'ı destekleyerek açık kaynaklı çerçeveler arasında en iyi gecikme süresi ve verimlilik performansını sunmaktadır.
|
||||
|
||||
Notably, [SGLang v0.4.1](https://github.com/sgl-project/sglang/releases/tag/v0.4.1) fully supports running DeepSeek-V3 on both **NVIDIA and AMD GPUs**, making it a highly versatile and robust solution.
|
||||
Özellikle, [SGLang v0.4.1](https://github.com/sgl-project/sglang/releases/tag/v0.4.1), **NVIDIA ve AMD GPU'larda** DeepSeek-V3 çalıştırmayı tamamen destekleyerek onu son derece esnek ve sağlam bir çözüm hâline getirmektedir.
|
||||
|
||||
SGLang also supports [multi-node tensor parallelism](https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3#example-serving-with-2-h208), enabling you to run this model on multiple network-connected machines.
|
||||
SGLang ayrıca [çoklu düğüm tensör paralelliğini](https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3#example-serving-with-2-h208) destekleyerek, bu modeli ağ bağlantılı birden fazla makinede çalıştırmanıza olanak tanır.
|
||||
|
||||
Multi-Token Prediction (MTP) is in development, and progress can be tracked in the [optimization plan](https://github.com/sgl-project/sglang/issues/2591).
|
||||
Çoklu Token Tahmini (MTP) hâlâ geliştirme aşamasında olup ilerlemeyi [optimizasyon planı](https://github.com/sgl-project/sglang/issues/2591) üzerinden takip edebilirsiniz.
|
||||
|
||||
Here are the launch instructions from the SGLang team: https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3
|
||||
SGLang ekibi tarafından sağlanan başlatma talimatlarına buradan ulaşabilirsiniz:
|
||||
[🔗 SGLang DeepSeek-V3 Çıkarım Talimatları](https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3)
|
||||
|
||||
### 6.3 Inference with LMDeploy (recommended)
|
||||
[LMDeploy](https://github.com/InternLM/lmdeploy), a flexible and high-performance inference and serving framework tailored for large language models, now supports DeepSeek-V3. It offers both offline pipeline processing and online deployment capabilities, seamlessly integrating with PyTorch-based workflows.
|
||||
---
|
||||
|
||||
For comprehensive step-by-step instructions on running DeepSeek-V3 with LMDeploy, please refer to here: https://github.com/InternLM/lmdeploy/issues/2960
|
||||
### 6.3 LMDeploy ile Çıkarım (Tavsiye Edilir)
|
||||
|
||||
[LMDeploy](https://github.com/InternLM/lmdeploy), büyük dil modelleri için esnek ve yüksek performanslı bir çıkarım ve sunum çerçevesidir. DeepSeek-V3 desteği sunarak hem çevrimdışı işlem hattı işleme hem de çevrimiçi dağıtım özellikleri sağlar ve PyTorch tabanlı iş akışlarıyla sorunsuz entegrasyon sunar.
|
||||
|
||||
### 6.4 Inference with TRT-LLM (recommended)
|
||||
DeepSeek-V3'ü LMDeploy ile çalıştırma adımları için ayrıntılı kılavuza buradan ulaşabilirsiniz:
|
||||
[🔗 LMDeploy Çıkarım Talimatları](https://github.com/InternLM/lmdeploy/issues/2960)
|
||||
|
||||
[TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) now supports the DeepSeek-V3 model, offering precision options such as BF16 and INT4/INT8 weight-only. Support for FP8 is currently in progress and will be released soon. You can access the custom branch of TRTLLM specifically for DeepSeek-V3 support through the following link to experience the new features directly: https://github.com/NVIDIA/TensorRT-LLM/tree/deepseek/examples/deepseek_v3.
|
||||
---
|
||||
|
||||
### 6.4 TRT-LLM ile Çıkarım (Tavsiye Edilir)
|
||||
|
||||
### 6.5 Inference with vLLM (recommended)
|
||||
[TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM), DeepSeek-V3 modelini desteklemekte olup **BF16 ve INT4/INT8 ağırlık hassasiyeti** seçenekleri sunmaktadır. FP8 desteği şu anda geliştirilmekte olup yakında yayınlanacaktır.
|
||||
|
||||
[vLLM](https://github.com/vllm-project/vllm) v0.6.6 supports DeepSeek-V3 inference for FP8 and BF16 modes on both NVIDIA and AMD GPUs. Aside from standard techniques, vLLM offers _pipeline parallelism_ allowing you to run this model on multiple machines connected by networks. For detailed guidance, please refer to the [vLLM instructions](https://docs.vllm.ai/en/latest/serving/distributed_serving.html). Please feel free to follow [the enhancement plan](https://github.com/vllm-project/vllm/issues/11539) as well.
|
||||
DeepSeek-V3 için özel olarak oluşturulmuş TRT-LLM dalına buradan erişerek yeni özellikleri doğrudan deneyimleyebilirsiniz:
|
||||
[🔗 TensorRT-LLM DeepSeek-V3 Desteği](https://github.com/NVIDIA/TensorRT-LLM/tree/deepseek/examples/deepseek_v3)
|
||||
|
||||
### 6.6 Recommended Inference Functionality with AMD GPUs
|
||||
---
|
||||
|
||||
In collaboration with the AMD team, we have achieved Day-One support for AMD GPUs using SGLang, with full compatibility for both FP8 and BF16 precision. For detailed guidance, please refer to the [SGLang instructions](#63-inference-with-lmdeploy-recommended).
|
||||
### 6.5 vLLM ile Çıkarım (Tavsiye Edilir)
|
||||
|
||||
### 6.7 Recommended Inference Functionality with Huawei Ascend NPUs
|
||||
The [MindIE](https://www.hiascend.com/en/software/mindie) framework from the Huawei Ascend community has successfully adapted the BF16 version of DeepSeek-V3. For step-by-step guidance on Ascend NPUs, please follow the [instructions here](https://modelers.cn/models/MindIE/deepseekv3).
|
||||
[vLLM](https://github.com/vllm-project/vllm) v0.6.6, **NVIDIA ve AMD GPU'larında FP8 ve BF16 modlarında** DeepSeek-V3 çıkarımını destekler. Standart tekniklerin yanı sıra, vLLM **boru hattı paralelliği (pipeline parallelism)** de sunarak modeli birden fazla ağa bağlı makinede çalıştırmanıza olanak tanır.
|
||||
|
||||
Ayrıntılı rehber için buraya göz atabilirsiniz:
|
||||
[🔗 vLLM Dağıtılmış Sunum Talimatları](https://docs.vllm.ai/en/latest/serving/distributed_serving.html)
|
||||
|
||||
## 7. License
|
||||
This code repository is licensed under [the MIT License](LICENSE-CODE). The use of DeepSeek-V3 Base/Chat models is subject to [the Model License](LICENSE-MODEL). DeepSeek-V3 series (including Base and Chat) supports commercial use.
|
||||
Ek olarak, geliştirme sürecini takip etmek için şu bağlantıyı inceleyebilirsiniz:
|
||||
[🔗 vLLM Geliştirme Planı](https://github.com/vllm-project/vllm/issues/11539)
|
||||
|
||||
---
|
||||
|
||||
### 6.6 AMD GPU'lar için Tavsiye Edilen Çıkarım İşlevselliği
|
||||
|
||||
AMD ekibiyle yapılan iş birliği sayesinde, DeepSeek-V3 modeli **FP8 ve BF16 hassasiyetiyle** AMD GPU'larda çalıştırılabilmektedir. Bu destek **SGLang** üzerinden sağlanmaktadır.
|
||||
|
||||
Ayrıntılı rehber için buraya göz atabilirsiniz:
|
||||
[🔗 SGLang AMD GPU Talimatları](#63-inference-with-lmdeploy-recommended)
|
||||
|
||||
---
|
||||
|
||||
### 6.7 Huawei Ascend NPU’lar için Tavsiye Edilen Çıkarım İşlevselliği
|
||||
|
||||
Huawei Ascend topluluğunun geliştirdiği [MindIE](https://www.hiascend.com/en/software/mindie) çerçevesi, **BF16 versiyonunda DeepSeek-V3** modelini başarıyla adapte etmiştir.
|
||||
|
||||
Huawei Ascend NPU'larda çalıştırma adımları için buraya göz atabilirsiniz:
|
||||
[🔗 MindIE DeepSeek-V3 Talimatları](https://modelers.cn/models/MindIE/deepseekv3)
|
||||
|
||||
---
|
||||
|
||||
## 7. Lisans
|
||||
|
||||
Bu kod deposu [MIT Lisansı](LICENSE-CODE) altında lisanslanmıştır.
|
||||
DeepSeek-V3 Base/Chat modellerinin kullanımı [Model Lisansı](LICENSE-MODEL) hükümlerine tabidir.
|
||||
DeepSeek-V3 serisi (Base ve Chat dahil) ticari kullanımı desteklemektedir.
|
||||
|
||||
---
|
||||
|
||||
## 8. Atıf (Citation)
|
||||
|
||||
Bu çalışmayı aşağıdaki gibi atıfta bulunarak referans verebilirsiniz:
|
||||
|
||||
## 8. Citation
|
||||
```
|
||||
@misc{deepseekai2024deepseekv3technicalreport,
|
||||
title={DeepSeek-V3 Technical Report},
|
||||
@ -367,5 +425,11 @@ This code repository is licensed under [the MIT License](LICENSE-CODE). The use
|
||||
}
|
||||
```
|
||||
|
||||
## 9. Contact
|
||||
If you have any questions, please raise an issue or contact us at [service@deepseek.com](service@deepseek.com).
|
||||
Eğer bu modeli veya içindeki teknikleri araştırmanızda kullanıyorsanız, lütfen yukarıdaki referansı ekleyerek atıfta bulunun.
|
||||
|
||||
---
|
||||
|
||||
## 9. İletişim
|
||||
|
||||
Herhangi bir sorunuz varsa, lütfen bir **issue** açın veya bizimle iletişime geçin:
|
||||
📧 [service@deepseek.com](service@deepseek.com)
|
||||
|
Loading…
Reference in New Issue
Block a user