[Sync] Update to latest code (#2679)

* [Sync] Update to latest code

* Add new code files

* Add new code files

* update code

* Try to fix build.sh

* Try to fix build.sh

* Update code

* Update requirements.txt

* Update code

---------

Co-authored-by: Jiang-Jia-Jun <jiangjiajun@baidu.com>
This commit is contained in:
Jiang-Jia-Jun
2025-07-03 15:43:53 +08:00
committed by GitHub
parent d222248d00
commit 05c670e593
95 changed files with 9916 additions and 1312 deletions

View File

@@ -330,6 +330,8 @@ class ForwardMeta():
decoder_batch_ids: Optional[paddle.Tensor] = None
# for attention backend
decoder_tile_ids_per_batch: Optional[paddle.Tensor] = None
# is_decode_batch or not
is_decode_batch: bool = False
@classmethod
def init_forward_meta(cls, share_inputs: Dict,
@@ -356,6 +358,11 @@ class ForwardMeta():
"decoder_tile_ids_per_batch", None),
)
return ret
def clear_caches(self):
"""safe clear caches"""
if self.caches:
del self.caches
@dataclass