add input_processor plugin (#3657)

* add input_processor plugin

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
This commit is contained in:
Yuanle Liu
2025-08-28 22:53:57 +08:00
committed by GitHub
parent 02b3644903
commit 4957908275
18 changed files with 232 additions and 146 deletions

View File

@@ -98,7 +98,9 @@ class AppendAttentionBackend(AttentionBackend):
self.rope_theta: float = (
10000.0 if fd_config.model_config.rope_theta is None else fd_config.model_config.rope_theta
)
self.rope_3d: bool = getattr(fd_config.model_config, "rope_3d", False)
self.rope_3d: bool = getattr(fd_config.model_config, "rope_3d", False) or getattr(
fd_config.model_config, "use_3d_rope", False
)
self.causal: bool = getattr(fd_config.model_config, "causal", True)
self.speculative_method: str = fd_config.speculative_config.method
self.use_speculate: bool = self.speculative_method is not None
@@ -140,6 +142,7 @@ class AppendAttentionBackend(AttentionBackend):
metadata.block_tables = forward_meta.block_tables
metadata.rotary_embs = forward_meta.rotary_embs
metadata.attn_mask = forward_meta.attn_mask
metadata.mask_offset = forward_meta.attn_mask_offsets
metadata.pre_caches_length = forward_meta.pre_caches_length
(
metadata.encoder_batch_ids,