DeepSeek Coder: Code generation language models
Code language models (1B-33B parameters) supporting completion and infilling across 80+ languages.
Learn more about DeepSeek Coder
DeepSeek Coder is a collection of transformer-based language models specifically designed for code generation and understanding tasks. The models are trained on a 2T token dataset comprising 87% code and 13% natural language in English and Chinese, using a 16K context window and fill-in-the-blank training objectives. Each model variant (1B, 5.7B, 6.7B, and 33B parameters) supports over 80 programming languages and includes both base models for code completion and instruction-tuned variants for conversational coding assistance. The models are commonly used for automated code completion, code infilling, programming assistance, and integration into development workflows.
Project-level Context
Uses 16K context window and repository-level training data organization to support project-level code completion and understanding of file dependencies.
Multi-language Support
Trained on over 80 programming languages with comprehensive coverage from mainstream languages like Python and JavaScript to specialized ones like Solidity and VHDL.
Fill-in-the-blank Training
Incorporates specialized fill-in-the-middle training objectives that enable precise code insertion and completion within existing codebases.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-6.7b-base", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-6.7b-base", trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")
# Generate code completion
input_text = "#write a quick sort algorithm\ndef quick_sort(arr):"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Top in AI & ML
Related Repositories
Discover similar tools and frameworks used by developers
CodeFormer
Transformer-based face restoration using vector-quantized codebook lookup.
DINOv2
PyTorch vision transformers pretrained on 142M unlabeled images.
Stanford Alpaca
Research project that fine-tunes LLaMA models to follow instructions using self-generated training data.
Magenta
Google Brain research project using ML to generate music, images, and creative content with TensorFlow.
DALL-E
Official PyTorch package implementing the discrete VAE component for image tokenization used in OpenAI's DALL-E system.
Related Reading
Guides and comparisons from the Greptile content library
Best AI Code Review Tools for GitLab
Enterprise-grade AI code review tools for GitLab teams. In-depth comparison of accuracy, security, and integration features to accelerate your merge request workflows.
10 Powerful Code Quality Tools That Catch Bugs Before Deployment
We tested 10 code quality tools that catch bugs before production. Detailed comparison with real-world examples, pricing, and ROI analysis for dev teams.
Greptile Ranks #1 on Martian's AI Code Review Benchmark
Greptile ranks #1 on Martian's independent online AI code review benchmark, leading all evaluated tools in F1 score and precision with near-leading recall.
Best CodeRabbit Alternatives for Smarter AI Code Reviews in 2026
7 powerful CodeRabbit alternatives ranked by real dev teams. Feature comparison, pricing analysis, and honest reviews to find your perfect AI code reviewer.