# SGLang v0.4.0 - Release & Upgrade Intelligence
- **Product:** SGLang (https://sgl-project.ai)
- **Version:** v0.4.0
- **Released:** Dec 04, 2024
- **Impact Score:** 9/10
- **Breaking Changes:** Not verified
- **Canonical Analysis:** https://changelogs.us/sglang/updates/v0.4.0/

## Executive Summary (TL;DR)
SGLang v0.4 introduces major architectural performance improvements, including a zero-overhead batch scheduler, cache-aware load balancer, and data parallelism attention for DeepSeek models. These enhancements collectively deliver significant throughput gains and up to 10x faster structured outputs using xgrammar.

## New Features
- Zero-overhead batch scheduler
- Cache-aware load-balancing router v1
- Data parallelism attention for DeepSeek models
- Fast structured outputs with xgrammar (up to 10x faster)
- Initial support for Intel Gaudi accelerators
- Simple CPU offloading support
- Support for GGUF format
- Support LoRA in Completion API
- Online weight updates from torch.distributed

## Improvements
- Up to 1.1x increase in throughput via zero-overhead batch scheduler
- Up to 1.9x increase in throughput with 3.8x higher cache hit rate via cache-aware load balancer
- Up to 1.9x decoding throughput improvement for DeepSeek models
- Merged three native APIs into one: get_server_info
- Support session control for vision language models

## Bug Fixes
- Fix mixed chunked prefill in overlap mode
- Fix memory leak during abort
- Fix hash collision for multi modal models
- Fix gptq for moe layers

## Upgrade Command
```bash
python -m pip install 'sglang==0.4.0'
```
