Who it is forA backend engineer on a GPU server who needs a local model endpoint that agent code can call over HTTP.
The problemAgent workflows need a stable chat endpoint with tool calling, and calling a hosted model may not fit the data or cost needs of the project.
The outcomeA running SGLang server on port 30000 that answers chat completion requests under the model name spark2.6.
What you need first
- A machine with an NVIDIA GPU or Ascend NPU for the server use cases, or enough local memory for the Transformers example
- Docker installed for the SGLang and vLLM use cases
- Python with pip for the Transformers use case, using transformers==4.57.1
- Local copy of the model checkpoint or network access to Hugging Face, ModelScope, or Ollama to download it
Steps
- Run
export MODEL_PATH=/absolute/path/to/Spark-X2.6-4Bwith the absolute path to your local checkpoint. - Run
docker pull lmsysorg/sglang:nightly-dev-cu13-20260827-20621aa1to get the image the README names. - Start the NVIDIA GPU
docker runblock from the README SGLang Server section, which mounts $MODEL_PATH and serves on port 30000. - Send a chat request to http://localhost:30000/v1/chat/completions using the model name spark2.6, following the README Client example.
- To skip reasoning for one request, add "chat_template_kwargs": {"enable_thinking": false} to the request body.
Prompt for your agent
Using the Spark-X2.6 README SGLang NVIDIA GPU server block, start an OpenAI-compatible server for the checkpoint at <MODEL_PATH> on port 30000 with served model name spark2.6. Send the chat request <your prompt> to http://localhost:30000/v1/chat/completions and report the reply text. Verify that the response JSON has a choices array with non-empty content.
Caveat. The README's 1,048,576-token context setting needs sufficient device memory, so lower --context-length on smaller GPUs.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for XHToken/Spark-X2.6 and "Serve Spark-X2.6-4B as an API with SGLang on NVIDIA GPUs"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer