mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-04-09 07:17:03 +08:00
[BugFix] Add embed_input_ids method to make QWenLMHeadModel a vllm model (#30674)
Signed-off-by: root <iwzbi@zju.edu.cn> Co-authored-by: root <iwzbi@zju.edu.cn>
This commit is contained in:
parent
4429d934de
commit
e4806d973a
@ -281,6 +281,9 @@ class QWenBaseModel(nn.Module):
|
||||
self.transformer.make_empty_intermediate_tensors
|
||||
)
|
||||
|
||||
def embed_input_ids(self, input_ids: torch.Tensor) -> torch.Tensor:
|
||||
return self.transformer.wte(input_ids)
|
||||
|
||||
def compute_logits(
|
||||
self,
|
||||
hidden_states: torch.Tensor,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user