Model reference · open weights

KwaiCoder-DS-Lite

LLMs Kwaipilot Text gen 1 build Open weights 72 dl/mo

KwaiCoder-DS-Lite is an open-weight language model from Kwaipilot. KwaiCoder-DS-V2-Lite-Base (BF16) weighs 31.4 GB; the smallest configuration that runs it is L40S 48 GB.

  • KwaiCoder-DS-Lite is a 15.7B parameter text-generation model developed by Kwaipilot for code completion and insertion tasks.
  • It supports English and Chinese with a context length of 163,840 tokens and is distributed under the MIT license.

Summary of the Kwaipilot/KwaiCoder-DS-V2-Lite-Base model card, 2026-10-01

What it is

Released byKwaipilot
Released2024-12-02
Parameters15.7B
VRAM31.4 GB for the weights

What it runs on

Memory and cards for KwaiCoder-DS-V2-Lite-Base (BF16)

31.4 GBweights, file size
31 MBcache per 1K tokens
1.2 GBruntime overhead, at least
163,840 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 5090 32 GB
5 smaller cards
———
L40S 48 GB4411all 160K44.0 GB
A100 80 GB17944all 160K78.2 GB
H100 80 GB15839all 160K78.1 GB
RTX PRO 6000 Blackwell 96 GB22055all 160K93.8 GB
DGX Spark (GB10) 128 GB unified27368all 160K107 GB
H200 141 GB39398all 160K138 GB
B200 180 GB533133all 160K176 GB
2× RTX 4090 24 GB
tensor parallel
256all 160K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
256all 160K23.4 GB a card
2× RTX 5090 32 GB
tensor parallel
5513all 160K31.0 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
132.8 GB33.6 GB
533.8 GB37.7 GB
834.6 GB40.7 GB
1636.6 GB48.9 GB
3240.7 GB65.2 GB
6448.9 GB97.8 GB

One card, with vLLM's small-card settings.

From the model card

What Kwaipilot says about KwaiCoder-DS-Lite

Read the model card

1.Model Details

Introduction

Kwai-Coder-DS-V2-Lite-Base is built on Deepseek-v2-Lite-Base, which has a total of 16B parameters and 2.4B activated parameters. It supports both English and Chinese and underwent continue pretraining on 800B tokens of high-quality code, math, and Chinese-English text data. The training data consists of 70% code data, 20% math data, and 10% text data (including a large amount of code-related text data). Ultimately, the base model achieved SOTA levels in multiple benchmarks.

Performance

ModelSizeHumanevalHumaneval+MBPPMBPP+BigCodeBench(Full)BigCodeBench(Hard)MATHGSM8k
Qwen2.5-Coder1.5B43.936.669.258.634.69.530.965.8
CodeGemma2B31.116.551.143.123.97.4--
CodeLlama7B33.526.255.346.828.75.412.131.2
Qwen2.5-Coder7B46.337.866.253.138.412.246.683.9
OpenCoder8B66.563.479.970.440.59.5--
Yi-Coder9B53.746.348.440.742.914.2--
StarCoder215B46.337.866.253.138.412.210.323.4
DeepSeek-Coder-V2-Lite16B40.934.171.959.430.68.139.067.1
KwaiCoder-DS-V2-Lite16B75.068.981.267.749.418.240.4881.5
CodeLlama34B51.843.969.356.345.316.221.258.2

Kwai-Coder-DS-V2-Lite-Base achieved Pass@1 scores of 75.0% and 68.9% on the HumanEval and HumanEval+ test sets, respectively. Compared to Deepseek-v2-Lite-Base of the same parameter scale, this represents an improvement of 83.37% and 102.05%, respectively. Additionally, it surpassed the current best base model (OpenCoder-8B), reaching SOTA (State-of-the-Art) levels.

On the MBPP and MBPP+ test sets, Kwai-Coder-DS-V2-Lite-Base outperformed the Deepseek-v2-Lite-Base model of the same parameter scale. Additionally, with only 2.4B activated parameters, the Kwai-Coder-DS-V2-Lite-Base model achieved an average improvement of nearly 5 percentage points compared to the 7B parameter-scale Qwen2.5-Coder.

On the BigCodeBench-Complete full set (Full), Kwai-Coder-DS-V2-Lite-Base achieved a 6% improvement over DeepSeek-Coder-33B, reaching SOTA (State-of-the-Art) levels. On the Hard subset, Kwai-Coder-DS-V2-Lite-Base also significantly outperformed the 70B parameter-scale CodeLlama model and the 7B parameter-scale Qwen2.5-Coder model.

In terms of mathematical capabilities, with only 2.4B activated parameters, Kwai-Coder-DS-V2-Lite-Base surpassed Deepseek-v2-Lite-Base of the same parameter scale on the MATH and GSM8K test sets (with improvements of 3.79% and 21.46%, respectively) and outperformed the larger parameter-scale CodeLlama-34B (with improvements of 90.95% and 40.03%, respectively). Although it has not yet exceeded Qwen2.5-Coder-7B, Kwai-Coder-DS-V2-Lite-Base has already surpassed the Qwen2.5-Coder-3B model, which has more activated parameters, achieving SOTA (State-of-the-Art) levels for its parameter scale.

2.Usage

Code Completion

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Kwaipilot/KwaiCoder-DS-V2-Lite-Base"
tokenizer = AutoTokenizer.from_pretrained(model_id,trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16,trust_remote_code=True)
text = "#write a quick sort algorithm"
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=80)
print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])

Code Insertion

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Kwaipilot/KwaiCoder-DS-V2-Lite-Base"
tokenizer = AutoTokenizer.from_pretrained(model_id,trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16,trust_remote_code=True)
text = """def find_longest_substring(s):
    seen = {}
    max_length = 0
    start = 0
        if char in seen and seen[char] >= start:
            start = seen[char] + 1
        seen[char] = end
        max_length = max(max_length, end - start + 1)
    return max_length"""
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=80)
print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])

3.License

This code repository is licensed under the MIT License. The use of KwaiCoder-DS-V2-Lite-Base models is subject to the Model License.

4.BibTex

@misc{kwaicoder,
  title = {KwaiCoder: Code mathematical abilities comprehensive improvement.},
  author = {Kwaipilot team},
  year = {2024},
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms