We Have Brought Function Calling to DeepSeek Models on SGLang

We Have Brought Function Calling to DeepSeek Models on SGLang

SGLang is a popular open-source platform for serving language and vision models. Until recently, DeepSeek models lacked support for function calling—a critical feature for interacting with external tools and APIs.

Key Ideas

  1. NetMind resolved the limitation by contributing a new parser and chat template (deepseek2.jinja) to SGLang, enabling DeepSeek-V3 and R1 to support function calling.

  2. The commit (#5224) fixed token ID mapping errors and aligned with the V3 tokenizer config, improving automated test success from 45% to 100%.

  3. Function calling now empowers DeepSeek models to invoke external functions based on user prompts, enabling dynamic and context-aware interactions.

Read the whole article at: blog.netmind.ai