Skip to main content
Browse Models

Deepseek AI

DeepSeek Coder V2 Lite

Released

2024-06-14

Family

DeepSeek V2

Type

Foundation Model

Downloads

External Download

You are about to open a link to an external source. Verify the URL before continuing.

Download

Instruct model, 4-bit GGUF (Q4_K_M)

GGUF · DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf

Instruct model, 5-bit GGUF (Q5_K_M)

GGUF · DeepSeek-Coder-V2-Lite-Instruct-Q5_K_M.gguf

Instruct model, 6-bit GGUF (Q6_K)

GGUF · DeepSeek-Coder-V2-Lite-Instruct-Q6_K.gguf

Instruct model, 8-bit GGUF (Q8_0)

GGUF · DeepSeek-Coder-V2-Lite-Instruct-Q8_0.gguf

Ollama Model (q4_K_M)

Ollama

Model Report

Overview

DeepSeek-Coder-V2-Lite is an open-source Mixture-of-Experts (MoE) code language model developed by DeepSeek-AI as part of the DeepSeek-Coder-V2 series. Designed for code generation, reasoning, and understanding, it offers a range of capabilities tailored to software development and computational problem-solving across a multitude of programming languages. The model is distinguished by its efficient parameter utilization and extended context processing, which enable sophisticated code intelligence while minimizing computational overhead.

Bar chart comparing LLM benchmark performance

Figure 1. Comparison of coding and mathematical benchmark accuracy for DeepSeek-Coder-V2 and several contemporaries, including HumanEval, MBPP+, MATH, GSM8K, Aider, LiveCodeBench, and SWE-Bench.

Model Architecture and Technical Features

DeepSeek-Coder-V2-Lite is constructed using a Mixture-of-Experts (MoE) architecture, featuring 16 billion total parameters with 2.4 billion active parameters engaged during inference. This architecture balances performance and efficiency, supporting diverse code-related tasks while reducing computational resource demands. The model explicitly supports 338 programming languages, a substantial expansion from the 86 languages available in its predecessor, as documented in the supported languages list.

A technical feature of DeepSeek-Coder-V2-Lite is its extended context length, supporting up to 128,000 tokens per input. This capability, achieved through the Yarn technique with tuned hyperparameters, permits the model to handle complex and extensive codebases and documentation, facilitating comprehensive code completion and reasoning. Additionally, it is trained with a 0.5 fill-in-the-middle (FIM) rate, enabling it to fill gaps within provided code blocks using surrounding context, a feature particularly relevant for code editors and automated refactoring tools. The underlying model architecture closely mirrors DeepSeek-V2, with refinements to normalization strategies implemented to ensure training stability.

Training Data and Pre-training Techniques

DeepSeek-Coder-V2-Lite is further pre-trained from an intermediate DeepSeek-V2 checkpoint, exposing it in total to approximately 10.2 trillion high-quality tokens. The pre-training data is composed of 60% source code (principally curated from public GitHub repositories), 10% mathematical corpora, and 30% general natural language, as detailed in the model's technical paper. The code corpus is filtered and deduplicated to maximize quality, while the mathematical and web-based code data are collected from forums, documentation sites, and mathematics platforms by leveraging iterative classification techniques and fastText models for relevant content discovery.

The model utilizes a Byte Pair Encoding (BPE) tokenizer, consistent with the broader DeepSeek-V2 series, to efficiently support a wide variety of languages, including those without space-delimited word boundaries. Training objectives comprise next-token prediction and FIM with Prefix, Suffix, Middle (PSM) mode, enhancing its versatility in code completion scenarios. Optimization is performed using the AdamW algorithm with specific moment and weight decay parameters, while a cosine learning rate decay is applied during training.

For alignment, DeepSeek-Coder-V2-Lite undergoes supervised fine-tuning on code, math, and general instruction datasets, followed by a reinforcement learning phase. Here, preference data is generated using compiler feedback and bespoke reward models, directing the model towards more contextually appropriate and robust outputs.

Benchmark Performance

DeepSeek-Coder-V2-Lite demonstrates competitive results across a spectrum of code and language benchmarks, as outlined in the public evaluation results. On HumanEval and MBPP+ code generation tests, the model achieves an average accuracy of 65.6% across multiple programming languages, surpassing the performance of earlier models, including the DeepSeek-Coder-33B. In Python-specific HumanEval tasks, it attains 81.1% accuracy, and similar strong results are observed across Java, C++, C#, and TypeScript.

In code completion (RepoBench v1.1), DeepSeek-Coder-V2-Lite registers 38.9% accuracy for Python and 43.3% for Java over various context lengths, matching or exceeding previous DeepSeek variants despite a lower active parameter count. Fill-in-the-middle (FIM) capabilities achieve a mean score of 86.4% across Python, Java, and JavaScript, highlighting the effectiveness of FIM training. On code repair, the model achieves 44.4% with Aider and also reports measurable results for code understanding tasks (CRUXEval) and competitive programming tasks (LiveCodeBench, USACO).

The model's capacity for mathematical reasoning is demonstrated by an 86.4% score on GSM8K and 61.8% on the MATH benchmark. For general natural language tasks, DeepSeek-Coder-V2-Lite is strong on reasoning-heavy benchmarks such as BBH and Arena-Hard, though it underperforms on knowledge-intensive datasets such as TriviaQA and NaturalQuestions, likely due to the relative emphasis on code and mathematical data during pre-training.

Use Cases and Applications

DeepSeek-Coder-V2-Lite is intended for a wide array of automated programming tasks and computational reasoning applications. Its code generation and completion capabilities make it suitable for assisting in software development environments, enabling features such as context-aware code suggestion, insertion, and refactoring. The FIM-enabled architecture enhances code editing workflows, allowing for insertion or modification of code blocks within larger files based on provided context.

Beyond code-centric tasks, the model's mathematical and logical reasoning skills enable applications in algorithmic problem solving, educational tutoring for programming and mathematics, and even general-purpose text understanding and generation when natural language context is involved. The extended context window further supports handling of large codebases or technical documentation within single inference sessions.

Limitations

Despite its broad capabilities, DeepSeek-Coder-V2-Lite exhibits some notable limitations, as described in the official documentation. The model presents a discernible gap in instruction-following ability relative to systems such as GPT-4 Turbo, particularly in complex, open-ended scenarios like those evaluated by the SWE-Bench. Its performance also declines in highly knowledge-intensive constraints, a reflection of the focused nature of its training data. Finally, while the active parameter count ensures efficiency, running full large-scale DeepSeek models may require substantial computational resources for local inference.

Licensing

The DeepSeek-Coder-V2 codebase is released under the MIT License, while the model weights are licensed separately; the latter permit commercial use under specified conditions.


Helpful External Links

About DeepSeek V2: DeepSeek V2 and its 16-billion-parameter counterpart, DeepSeek V2 Lite, are Mixture-of-Experts (MoE) language models that utilize Multi-head Latent Attention (MLA) and the DeepSeekMoE architecture to achieve efficient inference and economical training, delivering high performance with reduced computational costs.

More from Deepseek AI

Deepseek AI /

DeepSeek R1 Distill Qwen 1.5B

A 1.5 billion parameter language model created through distillation techniques, focusing on mathematical reasoning and chain-of-thought problem-solving capabilities.
Deepseek AI /

DeepSeek R1 Distill Qwen 7B

A 7.62B parameter distilled language model based on Qwen2.5-Math-7B, trained via knowledge distillation for mathematical and logical reasoning tasks.
Deepseek AI /

DeepSeek R1 Distill Qwen 14B

A 14B dense language model distilled from a mixture-of-experts architecture, optimized for mathematical reasoning and code generation tasks.
Deepseek AI /

DeepSeek R1 Distill Qwen 32B

A 32B parameter language model created through knowledge distillation, optimized for mathematical reasoning, code generation, and complex problem-solving tasks.
Deepseek AI /

DeepSeek R1 Distill Llama 8B

Distilled 8B-parameter model optimized for mathematical reasoning and code generation through knowledge transfer from larger reinforcement learning-trained teacher models.
Deepseek AI /

DeepSeek R1 Distill Llama 70B

A 70B parameter dense language model distilled from DeepSeek-R1 using Llama 3.3 architecture, optimized for mathematical and coding reasoning tasks.
Deepseek AI /

DeepSeek R1 (0528)

A 671B-parameter MoE model with 37B active parameters featuring enhanced reasoning capabilities through reinforcement learning and chain-of-thought training methodologies.
Deepseek AI /

DeepSeek R1

A 671B parameter Mixture-of-Experts model trained with reinforcement learning to enhance reasoning capabilities in mathematics, coding, and logical tasks.
Deepseek AI /

DeepSeek V3 (0324)

Large-scale MoE language model utilizing 671B parameters with 37B activated per token, featuring enhanced reasoning and multilingual capabilities.
Deepseek AI /

DeepSeek V3

A 671-billion parameter Mixture-of-Experts language model with 37 billion active parameters per token, featuring auxiliary-loss-free load balancing and FP8 mixed-precision training.
Deepseek AI /

DeepSeek VL2

A Mixture-of-Experts vision-language model series featuring dynamic image tiling, visual grounding capabilities, and efficient sparse computation across three parameter variants.
Deepseek AI /

DeepSeek VL2 Small

A 2.8B parameter mixture-of-experts vision-language model with dynamic tiling for multimodal understanding, OCR, and visual grounding tasks.
Deepseek AI /

DeepSeek VL2 Tiny

A compact Mixture-of-Experts vision-language model with 1.0B activated parameters supporting multimodal tasks including OCR, document analysis, and visual grounding.