[platform] Support additional forward context for OOT (#31674)
Signed-off-by: zzzzwwjj <1183291235@qq.com> Signed-off-by: zzzzwwjj <34335947+zzzzwwjj@users.noreply.github.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
This commit is contained in:
@@ -693,6 +693,13 @@ class Platform:
|
||||
"""
|
||||
return max_model_len
|
||||
|
||||
@classmethod
|
||||
def set_additional_forward_context(cls, *args, **kwargs) -> dict[str, Any]:
|
||||
"""
|
||||
Set some additional forward context for the current platform if needs.
|
||||
"""
|
||||
return {}
|
||||
|
||||
|
||||
class UnspecifiedPlatform(Platform):
|
||||
_enum = PlatformEnum.UNSPECIFIED
|
||||
|
||||
Reference in New Issue
Block a user