Navigate:
DeepSeek Coder
~$DEEP0.2%

DeepSeek Coder: Code generation language models

Code language models (1B-33B parameters) supporting completion and infilling across 80+ languages.

LIVE RANKINGS • 10:32 AM • STEADY
OVERALL
#253
33
AI & ML
#81
11
30 DAY RANKING TREND
ovr#253
·AI#81
STARS
22.8K
FORKS
2.7K
7D STARS
+50
7D FORKS
+5
Tags:
See Repo:
Share:

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.

DeepSeek Coder

1

Project-level Context

Uses 16K context window and repository-level training data organization to support project-level code completion and understanding of file dependencies.

2

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.

3

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))



[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers