---
id: pr-sglang-6956
repo: sgl-project/sglang
pr: 6956
title: Slightly improve the sampler to skip unnecessary steps
author: merrymercy
date: '2025-06-08'
url: https://github.com/sgl-project/sglang/pull/6956
source_category: upstream-code
architectures:
- sm100
tags: []
techniques: []
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 608668e1432a23fb71fd3a03f544fdbeb68fe005
inclusion_reason: include
changed_paths:
- python/sglang/srt/layers/sampler.py
- python/sglang/srt/managers/tokenizer_manager.py
- python/sglang/srt/models/llama.py
- python/sglang/srt/sampling/sampling_batch_info.py
- python/sglang/srt/sampling/sampling_params.py
- python/sglang/srt/two_batch_overlap.py
- python/sglang/srt/utils.py
artifact_dir: evidence/pull-bundles/sglang/gh-6956
head_ref_oid: 0d85d847b2b96f45743902f9a066c340d620345c
---
# Slightly improve the sampler to skip unnecessary steps

- Repository: `sgl-project/sglang`
- PR: [6956](https://github.com/sgl-project/sglang/pull/6956)
- Decision: `include`
- Reason: include

## Changed Paths

- `python/sglang/srt/layers/sampler.py`
- `python/sglang/srt/managers/tokenizer_manager.py`
- `python/sglang/srt/models/llama.py`
- `python/sglang/srt/sampling/sampling_batch_info.py`
- `python/sglang/srt/sampling/sampling_params.py`
- `python/sglang/srt/two_batch_overlap.py`
- `python/sglang/srt/utils.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-6956`
