---
id: pr-vllm-23154
repo: vllm-project/vllm
pr: 23154
title: '[Attention] Refactor AttentionMetadata Preparation for Encoder-only Models'
author: heheda12345
date: '2025-08-22'
url: https://github.com/vllm-project/vllm/pull/23154
source_category: upstream-code
architectures:
- sm100
tags: []
techniques: []
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 17373dcd93ca60554d72cef4e159e70abbfd15af
inclusion_reason: defer
changed_paths:
- tests/v1/worker/test_gpu_model_runner.py
- vllm/attention/layers/chunked_local_attention.py
- vllm/attention/layers/encoder_only_attention.py
- vllm/model_executor/models/bert.py
- vllm/model_executor/models/bert_with_rope.py
- vllm/model_executor/models/llama.py
- vllm/model_executor/models/modernbert.py
- vllm/model_executor/models/qwen2.py
- vllm/v1/attention/backends/utils.py
- vllm/v1/kv_cache_interface.py
- vllm/v1/worker/gpu_model_runner.py
- vllm/v1/worker/utils.py
artifact_dir: evidence/pull-bundles/vllm/gh-23154
head_ref_oid: bb766068698726856fc6158396fd7a58525fba55
---
# [Attention] Refactor AttentionMetadata Preparation for Encoder-only Models

- Repository: `vllm-project/vllm`
- PR: [23154](https://github.com/vllm-project/vllm/pull/23154)
- Decision: `defer`
- Reason: defer

## Changed Paths

- `tests/v1/worker/test_gpu_model_runner.py`
- `vllm/attention/layers/chunked_local_attention.py`
- `vllm/attention/layers/encoder_only_attention.py`
- `vllm/model_executor/models/bert.py`
- `vllm/model_executor/models/bert_with_rope.py`
- `vllm/model_executor/models/llama.py`
- `vllm/model_executor/models/modernbert.py`
- `vllm/model_executor/models/qwen2.py`
- `vllm/v1/attention/backends/utils.py`
- `vllm/v1/kv_cache_interface.py`
- `vllm/v1/worker/gpu_model_runner.py`
- `vllm/v1/worker/utils.py`

## Evidence Bundle

`evidence/pull-bundles/vllm/gh-23154`
