---
id: pr-sglang-4887
repo: sgl-project/sglang
pr: 4887
title: Feat/support encoder model (like bert)
author: woodx9
date: '2025-04-17'
url: https://github.com/sgl-project/sglang/pull/4887
source_category: upstream-code
architectures:
- sm100
tags:
- attention
techniques: []
hardware_features: []
kernel_types:
- attention
languages:
- python
- triton
captured_at: '2026-04-27'
status: merged
merge_sha: 3bface15e6b12a29e5d863039b8e91625c4edc58
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/srt/layers/attention/torch_native_backend.py
- python/sglang/srt/layers/attention/triton_backend.py
- python/sglang/srt/layers/attention/triton_ops/extend_attention.py
- python/sglang/srt/layers/radix_attention.py
- python/sglang/srt/models/bert.py
- python/sglang/test/runners.py
- test/srt/models/test_encoder_embedding_models.py
- test/srt/parse_results.py
- test/srt/test_triton_attention_kernels.py
head_ref_oid: a390e4461c0fc88b721cd472d199bd3ebb6c98a9
artifact_dir: evidence/pull-bundles/sglang/gh-4887
---
# Feat/support encoder model (like bert)

- Repository: `sgl-project/sglang`
- PR: [4887](https://github.com/sgl-project/sglang/pull/4887)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/srt/layers/attention/torch_native_backend.py`
- `python/sglang/srt/layers/attention/triton_backend.py`
- `python/sglang/srt/layers/attention/triton_ops/extend_attention.py`
- `python/sglang/srt/layers/radix_attention.py`
- `python/sglang/srt/models/bert.py`
- `python/sglang/test/runners.py`
- `test/srt/models/test_encoder_embedding_models.py`
- `test/srt/parse_results.py`
- `test/srt/test_triton_attention_kernels.py`

## Evidence Bundle

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