mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-18 04:40:35 +08:00
[model] add qwen2.5 vl models (#6779)
This commit is contained in:
@@ -176,7 +176,10 @@ class HuggingfaceEngine(BaseEngine):
|
||||
if torch.is_floating_point(value): # cast data dtype for paligemma
|
||||
value = value.to(model.dtype)
|
||||
|
||||
gen_kwargs[key] = value.to(model.device)
|
||||
if key == "second_per_grid_ts": # qwen2.5vl special case
|
||||
gen_kwargs[key] = value.tolist()
|
||||
else:
|
||||
gen_kwargs[key] = value.to(model.device)
|
||||
|
||||
if getattr(model.config, "model_type", None) in ["minicpmv", "minicpmo"]:
|
||||
gen_kwargs["input_ids"] = inputs
|
||||
|
||||
Reference in New Issue
Block a user