add e2e tests

Former-commit-id: 0156a37450604641c4f5f9756ad84324698fc88c
This commit is contained in:
hiyouga
2024-09-05 21:52:28 +08:00
parent d6ce902d80
commit 9bdba2f6a8
9 changed files with 270 additions and 94 deletions

View File

@@ -100,7 +100,9 @@ def load_tokenizer(model_args: "ModelArguments") -> "TokenizerModule":
setattr(processor, "tokenizer", tokenizer)
setattr(processor, "image_seqlen", get_image_seqlen(config))
setattr(processor, "image_resolution", model_args.image_resolution)
setattr(processor, "video_resolution", model_args.video_resolution)
setattr(processor, "video_fps", model_args.video_fps)
setattr(processor, "video_maxlen", model_args.video_maxlen)
if getattr(config, "model_type", None) == "qwen2_vl":
setattr(processor, "video_factor", 2)
else: