[Model] Add PaddleOCR-VL Model Support (#12953)
Co-authored-by: luoyuan.luo <luoyuan.luo@antgroup.com>
This commit is contained in:
co-authored by
luoyuan.luo
parent
ab0048793c
commit
9496f12d00
@@ -1702,7 +1702,10 @@ class MRotaryEmbedding(RotaryEmbedding):
|
||||
torch.arange(text_len).view(1, -1).expand(3, -1) + st_idx
|
||||
)
|
||||
|
||||
if model_type == "qwen2_5_vl":
|
||||
if model_type in (
|
||||
"qwen2_5_vl",
|
||||
"paddleocr_vl",
|
||||
):
|
||||
range_tensor = torch.arange(llm_grid_t).view(-1, 1)
|
||||
expanded_range = range_tensor.expand(
|
||||
-1, llm_grid_h * llm_grid_w
|
||||
|
||||
Reference in New Issue
Block a user