Skip to content

Commit 44cecce

Browse files
committed
fix qwen 2.5 vl
Signed-off-by: Dylan Chen <[email protected]>
1 parent 3524732 commit 44cecce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/llm_ptq/example_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_tokenizer(ckpt_path, trust_remote_code=False, **kwargs):
5656
ckpt_path, trust_remote_code=trust_remote_code, **kwargs
5757
)
5858

59-
if "qwen" in type(tokenizer).__name__.lower():
59+
if "qwen" in type(tokenizer).__name__.lower() and "vl" not in ckpt_path.lower():
6060
# qwen use token id 151643 as pad and eos tokens
6161
tokenizer.pad_token = tokenizer.convert_ids_to_tokens(151643)
6262
tokenizer.eos_token = tokenizer.convert_ids_to_tokens(151643)

examples/vlm_ptq/scripts/huggingface_example.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ case "${MODEL_TYPE}" in
145145
VISUAL_FEATURE=576
146146
VLM_ARGS=" --max_multimodal_len=$((BUILD_MAX_BATCH_SIZE * VISUAL_FEATURE)) "
147147
;;
148+
"qwen")
149+
VISUAL_FEATURE=1280
150+
VLM_ARGS=" --max_multimodal_len=$((BUILD_MAX_BATCH_SIZE * VISUAL_FEATURE)) "
151+
;;
148152
"mllama")
149153
PTQ_ARGS+=" --kv_cache_qformat none "
150154
VLM_ARGS=" --max_encoder_input_len=6404 --skip_run"

0 commit comments

Comments
 (0)