SuperAPI AI Directory

DeepSeek-Coder

a tool that experiments the motto "let the code write itself"

Open website

About this tool

DeepSeek-Coder is a series of open-source code language models launched by DeepSeek, with the slogan "Let the Code Write Itself". The models were trained from scratch on 2T tokens, of which 87% are code and 13% are Chinese and English natural language, and are available in parameter sizes such as 1B, 5.7B, 6.7B, and 33B, making it easy to choose according to needs. Its pretraining uses a 16K window and an additional fill-in-the-blank task to support project-level code completion and infilling.

Main capabilities: it covers a large number of programming languages such as Python, C++, Java, JavaScript, Go, Rust, and SQL; on benchmarks such as HumanEval, MultiPL-E, MBPP, DS-1000, and APPS, the official claim is that it reaches a leading level among public code models, with Base-33B surpassing CodeLlama-34B on multiple metrics, Base-7B reaching the level of CodeLlama-34B, and Instruct-33B surpassing GPT-3.5-turbo on HumanEval.

Usage: the repository provides Hugging Face model downloads and an online Chat entry point, as well as a local app.py demo; conversations can be conducted through apply_chat_template or a custom template; vLLM high-throughput inference is also supported. The fine-tuning script is finetune/finetune_deepseekcoder.py, which supports DeepSpeed; each line of training data is a JSON string containing the two fields instruction and output, and DATA_PATH, OUTPUT_PATH must be specified, with hyperparameters such as learning rate selected according to the scenario.

Limitations and notes: the model is based on HuggingFace Tokenizer (Bytelevel-BPE) and currently cannot be directly converted to SentencePiece; quantization support is being advanced through the llama.cpp PR and exllamav2, and when using GGUF, RoPE scaling needs to be set to 4. Although the Instruct model is not specifically fine-tuned for code completion, completion can be enabled by setting eos_token_id to 32014 (default 32021). The code repository uses the MIT License, and model usage follows the Model License and supports commercial use. Specific pricing, charges, and more platform information are not yet provided.