[Bugfix] Fix embedding assignment for InternVL-based models (#15086)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-03-20 11:40:13 +08:00
committed by GitHub
parent 70e500cad9
commit ffa443afed
7 changed files with 123 additions and 106 deletions

View File

@@ -103,13 +103,13 @@ The token sequence or text to update.
@dataclass
class PromptUpdateDetails:
class PromptUpdateDetails(Generic[_S]):
"""Details about the token sequence or text that are part of the update."""
full: PromptSeq
full: _S
"""The full content."""
features: PromptSeq
features: _S
"""
The part of the content that corresponds to feature placeholders;
this will be replaced by the output of the vision encoder during model
@@ -117,7 +117,7 @@ class PromptUpdateDetails:
"""
@staticmethod
def from_seq(seq: PromptSeq) -> "PromptUpdateDetails":
def from_seq(seq: _S) -> "PromptUpdateDetails[_S]":
return PromptUpdateDetails(full=seq, features=seq)