[Model] Enable Qwen3.8 for AMD Rocm (#50068)
Signed-off-by: haic0 <haic0@users.noreply.github.com> Signed-off-by: haic0 <haichzha@amd.com>
This commit is contained in:
@@ -67,6 +67,7 @@ from .interfaces import (
|
|||||||
MultiModalEmbeddings,
|
MultiModalEmbeddings,
|
||||||
SupportsEagle3,
|
SupportsEagle3,
|
||||||
SupportsLoRA,
|
SupportsLoRA,
|
||||||
|
SupportsMRoPE,
|
||||||
SupportsPP,
|
SupportsPP,
|
||||||
_require_is_multimodal,
|
_require_is_multimodal,
|
||||||
)
|
)
|
||||||
@@ -289,6 +290,7 @@ class Qwen3_5ForCausalLMBase(
|
|||||||
IsHybrid,
|
IsHybrid,
|
||||||
SupportsEagle3,
|
SupportsEagle3,
|
||||||
SupportsLoRA,
|
SupportsLoRA,
|
||||||
|
SupportsMRoPE,
|
||||||
SupportsPP,
|
SupportsPP,
|
||||||
):
|
):
|
||||||
packed_modules_mapping = {
|
packed_modules_mapping = {
|
||||||
@@ -425,6 +427,14 @@ class Qwen3_5ForCausalLMBase(
|
|||||||
)
|
)
|
||||||
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
|
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
|
||||||
|
|
||||||
|
def get_mrope_input_positions(
|
||||||
|
self,
|
||||||
|
input_tokens: list[int],
|
||||||
|
mm_features: list[object],
|
||||||
|
) -> tuple[torch.Tensor, int]:
|
||||||
|
positions = torch.arange(len(input_tokens), dtype=torch.long)
|
||||||
|
return positions.unsqueeze(0).expand(3, -1), 0
|
||||||
|
|
||||||
|
|
||||||
class Qwen3_5ForCausalLM(Qwen3_5ForCausalLMBase):
|
class Qwen3_5ForCausalLM(Qwen3_5ForCausalLMBase):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user