diff --git a/vllm_ascend/models/qwen2_vl.py b/vllm_ascend/models/qwen2_vl.py index d9b3e03..b601b16 100644 --- a/vllm_ascend/models/qwen2_vl.py +++ b/vllm_ascend/models/qwen2_vl.py @@ -314,6 +314,7 @@ class AscendQwen2VisionTransformer(Qwen2VisionTransformer): x: torch.Tensor, grid_thw: torch.Tensor, ) -> torch.Tensor: + grid_thw = torch.tensor(grid_thw, dtype=torch.int32) # compute cu_seqlens and avoid cumsum to fit operator unpadFA cu_seqlens = torch.repeat_interleave(grid_thw[:, 1] * grid_thw[:, 2], grid_thw[:, diff --git a/vllm_ascend/quantization/w8a8.py b/vllm_ascend/quantization/w8a8.py index 5c7d986..fec542c 100644 --- a/vllm_ascend/quantization/w8a8.py +++ b/vllm_ascend/quantization/w8a8.py @@ -99,8 +99,11 @@ class AscendW8A8LinearMethod: ) -> torch.Tensor: if x.dtype != torch.int8: layer_cls_name = layer.__class__.__name__ - weight_prefetch_method = get_forward_context( - ).weight_prefetch_method + try: + weight_prefetch_method = get_forward_context( + ).weight_prefetch_method + except AssertionError: + weight_prefetch_method = None # prefetch qkvo_proj.weight preprocess if weight_prefetch_method: