Skip to main content
Advanced inference architectureHigh-performance deployment from day oneUnified heterogeneous computeContinuous performance improvement

ModelSphereOpen source platform for production deployment and inference optimization

Take LLM inference from a working prototype to reliable production, and turn every GPU into an efficient token factory.

Built on Kubernetes, ModelSphere brings model deployment, cache-aware routing, SLO-based autoscaling, comprehensive observability, recovery from hangs within seconds and the AutoTune feedback loop together in a production-grade inference scheduling system that reliably handles large-scale traffic on heterogeneous hardware.

Application ecosystem

Standard APIs for a wide range of agent frameworks.

ModelSphere core platform

Production routing, SLO autoscaling, seamless stream recovery, and engine orchestration.

Heterogeneous compute

Manage compute and topology across chip ecosystems without vendor lock-in.

Architecture and compute scheduling topologyCoordinated scheduling across layers
ModelSphere connects applications through routing, rate limiting, PD disaggregation, KV caching, autoscaling, stream recovery, and AutoTune to vLLM, SGLang, and heterogeneous compute.

Architectural Pillars

Four core technologies for production LLMs

Built for production engineering. ModelSphere combines advances in research with experience operating large-scale services in a standardized platform.

Set up an AI inference platform for production in minutes, with model serving, scheduling, autoscaling, observability, and operations built in. Manage your cluster through a unified Web UI without complex low-level tuning.

AutoscalingENABLED: 4-32 Pods
Dynamic rate limiting based on service qualityTTFT < 10s, OPTS > 20

ModelSphere runs across heterogeneous AI hardware through one platform. It natively supports general-purpose GPUs and uses EngineX to integrate Huawei Ascend, Iluvatar CoreX, Moore Threads, and Hygon accelerators, bringing mixed-hardware nodes under unified management.

Huawei AscendIluvatar CoreXMoore ThreadsHygon DCU...
Zero-Day Ready

Keep pace with the model ecosystem through our inference optimization community, adapting and tuning new models for rapid import, configuration, and production deployment.

Day-one model certification100% official compatibility
DeepSeek-V4-ProDeepSeek-V4-Flash-0731Qwen3.8-2.4T-A95BKimi-K3MiniMax-M3GLM-5.3-Flash

ModelSphere continuously integrates new inference optimizations. Built-in AutoTune adapts configurations to your models, hardware, and production workloads to improve latency, throughput, and resource efficiency.

Relative throughput (optimized = 100%)About 285% above baseline
Baseline capacity26%
Optimized capacity100% capacity
CORE MECHANISM 01 · FAULT TOLERANCE

Resumable LLM streaming:

100% protection against stream interruptions caused by service crashes


Hang-Watcher out-of-band health checks within seconds: An independent, out-of-band probe monitors the engine’s token emission timestamps. If the wait for a token exceeds a dynamic threshold (for example, 150 ms, above the P99.9 latency), the node is marked as hung and a circuit breaker trips.
Token context replay: The gateway caches tokens 1–N from the current stream. On node failure, it sends a continuation prefill request with the token history to a healthy node.
Transparent SSE handoff: The browser or API client connection stays open. Output resumes at token N+1 without freezing the conversation or requiring a retry.

Resumption SLA: < 200ms Zero-Drop Guarantee
TOKEN RESUMPTION SEQUENCE ENGINE
E2E TIME: 168ms FAILOVER
01Normal streaming inference
STREAMING

The client maintains a persistent SSE connection; the gateway routes the request to Model service A, which emits tokens 1 → 2 → 3 → 4 → 5.

Client SSE:[Tok 1][Tok 2][Tok 3][Tok 4][Tok 5] ...
02Failure detected by out-of-band probe
HANG DETECTED (140ms)

Model service A encounters a GPU memory deadlock or CUDA illegal memory access error, interrupting generation. Hang-Watcher detects a token emission timeout within 140 ms and tells the gateway to close its connection to A.

03Switch to a healthy node with context
RE-ROUTING

The gateway captures the emitted tokens 1–5 and uses a shared handle to the L3 KV cache to immediately redirect the request to a healthy standby node, Model service B。

04Resume generation with seamless streaming
SEAMLESS RESUME

Model service B quickly resumes generation at tokens 6 → 7 → 8... The gateway appends the output to the original SSE stream, preserving all text without a visible interruption.

Client SSE Resumed:[1-5 Done][Tok 6][Tok 7][Tok 8]
CORE MECHANISM 02 · QOS & DYNAMIC SCALING

Service quality and SLO-driven autoscaling

Move beyond static TPM/RPM limits with real-time production feedback based on time to first token (TTFT) and output tokens per second (OTPS).

Dynamic QoS rate limiting (TTFT / OTPS)

AUTO-THROTTLE

Static rate limits cannot detect the cascading queues caused by saturated prefill capacity. ModelSphere monitors time to first token (TTFT). When it exceeds the threshold, the gateway responds within milliseconds with HTTP 429 and Retry-After: 120ms to prompt client backoff and prevent cluster overload.

kimi-k3-nginx-ingress-0
TTFT: 68.6s (Degraded)OTPS: 42.4 tok/s
TTFT (ms) OTPS (tok/s)
Threshold: 10,000ms
Threshold
00:00:00429 Dynamic Throttle Event (Triggered at 00:02:15)00:05:00
Mitigation Action429 Auto-Backoff
Retry-After120ms Dynamic
Recovery Latency< 350ms Stable

SLO-based autoscaling (K8s HPA/EDA)

GPU UTIL 85%+

Adjust inference Pod replicas within milliseconds as concurrency changes. During off-peak hours, high-priority models use idle accelerators, raising overall GPU utilization from the industry average of 45% to over 85% in this design example. In-flight requests finish before replicas are released during scale-down.

glm-5.2-prod-pool Scale TraceCurrent: 16 Replicas (Active)
16 PodsPeak Burst: 18,200 QPS
12 PodsMidday Load
8 PodsNight Idle Base
Scale-Up< 1.2s Warm
Graceful DrainZero Drop
Hardware SharingB300 + Ascend
CORE MECHANISM 03 · CONTINUOUS SELF-EVOLUTION

Tuning-Agent continuous optimization

ModelSphere connects real production traffic, idle off-peak compute, hyperparameter grid search, and zero-downtime canary releases in an automated optimization loop, reducing manual trial-and-error benchmarking.

A new optimization approach

From manual experiments to continuous improvement

Use idle compute to unlock hardware potential and make inference faster over time.

Better sampling

Static test datasets → Real traffic features from a 7-day sliding window

Lower cost

Benchmarks consuming production resources → Concurrent grid search on idle off-peak compute

Safer delivery

Restarting services to update parameters → Automatically validate the best configuration and hot-load it in production without downtime

1Production inference
Stable operation

Reliable, low-latency, highly available service

NODE-01
NODE-02
NODE-03
5Automated rollout
Canary rollout

Deploy the best configuration with seamless hot reload

Config Push100%
Rolling Deploy

Continuous optimization loop

AUTOTUNE ENGINE
2Collect traffic data
Traffic feature collection

Build sliding-window datasets and prefix topology

Window7 Days
Prompt Profiler
4Generate and validate configurations
Real workloads

Select the best inference configuration using real workloads

★
+48.6%SLO P99<200ms
3Tune with idle compute
Off-peak search

Search inference hyperparameters in parallel during off-peak hours

02:00~06:00Night Tuning
Chunk/TP18 Sets
Empirical Telemetry

Transparent, reproducible measurements

Publish benchmark input and output distributions, hardware topology, and trade-offs so every tuning gain can be verified.

Verified on MLPerf & LLMBench harness
Model and architectureHardwareWorkload (Prompt + Output)Throughput (Default vs Tuned)Performance gainTuning techniques and trade-offs
MiMo-V2.58 × NVIDIA H10050k + 1.5k (long context)13,900 → 30,600 tok/s+119.9%Concurrency 4 → 26; TTFT 4.81s → 7.66s (within the SLO of ≤ 8s); GPQA accuracy decreases by 3.03% (an explicit trade-off)
DeepSeek-V4.1-Flash8 × NVIDIA H10050k + 1.5k / 8k + 1kLarge long-context gains / steady on common workloads+89.5% / +5.0%Gains depend on workload; AutoTune adapts chunk sizes for very long contexts
Qwen3.6-35B-A3B2 × NVIDIA H800Agentic (c=8, concurrent multi-turn)6,200 → 8,016 tok/s+29.3%SGLang + FlashAttention-3 + FP8 + Chunked Prefill 32768 + extra_buffer
GLM-5.3 (NVFP4)4 × NVIDIA B300Mixed workload simulating production trafficBaseline comparison → Peak gain+195.3%AutoTune selects the optimal single-node TP4 topology and integrates modelopt_fp4 kernels
Production Ready Infrastructure

Ready to accelerate your LLM inference cluster?

Explore the open source code and build the next generation of inference infrastructure with AI engineers.

✓ Apache-2.0 Open Source•✓ Helm Chart 1-Click Ready•✓ Zero Cloud Lock-in