← all repositories
WisdomShell/codeshell

A 7B code model that takes its paperwork seriously

PKU's CodeShell ships with IDE plugins, C++ CPU inference, and a commercial license that requires email approval.

codeshell
Velocity · 7d
+1.6
★ / day
Trend
steady
star history

What it does CodeShell is a 7-billion-parameter code LLM from Peking University’s Knowledge Computing Lab, trained on 500 billion tokens with an 8192-token context window. The repo provides model weights, inference code, and wrappers for Transformers, plus a constellation of related projects: VS Code and JetBrains plugins, a llama.cpp port for CPU-only machines, and OpenAI-compatible API demos.

The interesting bit The model claims top marks among 7B code models on HumanEval and MBPP, and the README publishes head-to-head tables against CodeLlama-7B and StarCoder-7B. More unusually, it ships with a tiered commercial license: free for small use, but if your DAU exceeds 1 million or you’re a cloud provider, you must email for a case-by-case grant. The tokenizer is also deliberately tuned for Chinese, expanding the vocabulary from StarCoder’s ~49k to ~70k tokens to improve compression on Chinese text.

Key highlights

  • Base, chat, 4-bit quantized, and C++ inference variants all available
  • Fill-in-the-Middle (FIM) support for inline code completion
  • 4-bit quantization runs in ~6 GB VRAM; C++ build targets 8 GB RAM machines without GPU
  • IDE plugins for VS Code and JetBrains published as separate repos
  • OpenAI-style API demo included (demos/openai_api.py)

Caveats

  • The “comprehensive evaluation system” covering bug detection, test generation, and full-project context is noted as “即将开源” (coming soon)
  • Performance tables show CodeShell losing ground on Swift, D, Julia, Lua, and Rust to CodeLlama-7B
  • Commercial use requires email approval and has DAU and business-type restrictions

Verdict Worth a look if you need a compact, self-hostable code model with strong Chinese support and don’t mind license homework. Pass if you need a drop-in commercial solution or state-of-the-art performance across every language.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.