Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Serves LLM inference with constrained decoding (JSON, grammar, regex), RadixAttention prefix caching, and an OpenAI-compatible API.
82% 95%+14 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
3 of 3 safety checks passed
Not used yet
SGLang is a fast LLM inference and serving framework with structured generation (constrained decoding), RadixAttention for prefix caching, and an OpenAI-compatible API. Particularly strong for reasoning models (DeepSeek R1, QwQ) and guided generation with JSON schema, grammar, and regex constraints.
uv pip install sglang[all]
import sglang as sgl
@sgl.function
def multi_turn(s, question):
s += sgl.system("You are a helpful assistant.")
s += sgl.user(question)
s += sgl.assistant()
state = multi_turn.run(question="What is the derivative of x^2?")
print(state["answer"])
python -m sglang.launch_server --model-path Qwen/Qwen2.5-1.5B-Instruct --port 30000
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="none")
@sgl.function
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.