-
Notifications
You must be signed in to change notification settings - Fork 18
Dev/qwen omni #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Dev/qwen omni #47
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
198d4dc
first commit
ngquangtrung57 8505f83
working qwen omni on small test
ngquangtrung57 a37ae7d
Fix freeze talker
ngquangtrung57 1c83dc2
More fixing
ngquangtrung57 0365e8c
fix position ids bug causes OOM
ngquangtrung57 14cbd6d
Fix liger, update docs
ngquangtrung57 3197757
Add examples and lint
ngquangtrung57 6492a5f
Fix use_audio_in_video
ngquangtrung57 4e7fe43
Fix handling audio input
ngquangtrung57 6c321a1
Merge branch 'main' into dev/qwen_omni
ngquangtrung57 d738704
Update example to use hf_trainer
ngquangtrung57 56f47de
fix audio loading
ngquangtrung57 1132e8e
refactor and fix rmpad, sp
ngquangtrung57 1914dcd
lint
ngquangtrung57 6ee1fe9
fix example
ngquangtrung57 f6b85ce
minor fix
ngquangtrung57 85b8ba5
Delete examples/qwen2_5_omni_test.yaml
ngquangtrung57 368814e
Fix loading Qwen Omni
ngquangtrung57 533988e
fix example
ngquangtrung57 b37d93a
Update mapping_func.py
ngquangtrung57 40363a3
Merge branch 'main' into dev/qwen_omni
ngquangtrung57 bed8723
Refactor qwen2_5_omni.yaml configuration structure
ngquangtrung57 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| - type: trainer | ||
| config: | ||
| trainer_type: hf_trainer | ||
|
|
||
| dataset_config: | ||
| dataset_type: vision_audio | ||
| dataset_format: json | ||
| dataset_path: | ||
| eval_dataset_path: | ||
|
|
||
| processor_config: | ||
| processor_name: "Qwen/Qwen2.5-Omni-7B" | ||
| processor_type: "Qwen2_5OmniProcessor" | ||
| extra_kwargs: | ||
| audio_max_length: 60 | ||
| video_max_pixels: 602112 | ||
| video_min_pixels: 28800 | ||
| image_max_pixels: 602112 | ||
| image_min_pixels: 28800 | ||
|
|
||
| extra_kwargs: | ||
| use_audio_in_video: true | ||
|
|
||
| video_backend: "qwen_omni_utils" | ||
| video_sampling_strategy: "fps" | ||
| fps: 1 | ||
| video_max_frames: 60 | ||
|
|
||
| model_config: | ||
| load_from_pretrained_path: "Qwen/Qwen2.5-Omni-7B" | ||
| attn_implementation: "flash_attention_2" | ||
| model_type: "qwen2_5_omni" | ||
| torch_dtype: "bfloat16" | ||
|
|
||
| per_device_train_batch_size: 1 | ||
| per_device_eval_batch_size: 1 | ||
| learning_rate: 1.0e-05 | ||
| weight_decay: 0.0 | ||
| gradient_accumulation_steps: 16 | ||
| gradient_checkpointing: true | ||
| num_train_epochs: 1 | ||
| save_steps: 100 | ||
| save_total_limit: 3 | ||
| report_to: "wandb" | ||
| output_dir: "" | ||
| warmup_ratio: 0.0 | ||
| run_name: "" | ||
| eval_strategy: "steps" | ||
| eval_steps: 100 | ||
| logging_steps: 5 | ||
| group_by_length: false | ||
| dataloader_num_workers: 0 | ||
| bf16: true | ||
| lr_scheduler_type: "constant" | ||
| torch_empty_cache_steps: 10 | ||
| use_liger_kernel: true | ||
| use_rmpad: true | ||
|
|
||
| fsdp: "full_shard" | ||
| fsdp_config: | ||
| fsdp_transformer_layer_cls_to_wrap: ["Qwen2_5OmniDecoderLayer", "Qwen2_5OmniAudioEncoderLayer", "Qwen2_5OmniVisionBlock"] | ||
| fsdp_backward_prefetch: "backward_pre" | ||
| fsdp_state_dict_type: "sharded_state_dict" | ||
| fsdp_use_orig_params: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably refactor this changes into a new qwen omni dataset that inherit from this and override and keep vision_audio_dataset unchanged