-
Notifications
You must be signed in to change notification settings - Fork 410
【CI】add qwen3.5 cases #1593
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
Open
kkscilife
wants to merge
11
commits into
main
Choose a base branch
from
ci/cases
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+169
−2
Open
【CI】add qwen3.5 cases #1593
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cd48679
add case config
kkscilife 9ebacd1
run case
kkscilife 6be68b6
run case
kkscilife e82fe15
Merge branch 'main' into ci/cases
kkscilife a1a47ef
run rl case
kkscilife 3701d0a
update run info
kkscilife 8d055be
fix config
kkscilife 5ae8e2a
baseline
kkscilife 5b6beb7
ready to PR
kkscilife 9738f70
Merge branch 'main' into ci/cases
kkscilife ac4fd02
optimize format
kkscilife 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
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,63 @@ | ||
| import os | ||
|
|
||
| from xtuner.v1.config import AdamWConfig, FSDPConfig, LRConfig | ||
| from xtuner.v1.datasets import Qwen3VLTokenizeFnConfig | ||
| from xtuner.v1.datasets.config import DataloaderConfig, DatasetConfig | ||
| from xtuner.v1.loss.ce_loss import CELossConfig | ||
| from xtuner.v1.model import Qwen3_5_VLMoE35BA3Config | ||
| from xtuner.v1.train import TrainerConfig | ||
|
|
||
|
|
||
| MEDIA_ROOT = os.environ["MEDIA_ROOT"] | ||
| MODEL_PATH = os.environ["MODEL_PATH"] | ||
| DATA_PATH = os.environ["DATA_PATH"] | ||
|
|
||
|
|
||
| moe_cfg = Qwen3_5_VLMoE35BA3Config() | ||
|
|
||
| optim_cfg = AdamWConfig(lr=6e-05) | ||
| lr_cfg = LRConfig(lr_type="cosine", lr_min=1e-6) | ||
| fsdp_cfg = FSDPConfig( | ||
| torch_compile=True, | ||
| cpu_offload=False, | ||
| ) | ||
|
|
||
| dataset_config = [ | ||
| { | ||
| "dataset": DatasetConfig( | ||
| name="sft", | ||
| anno_path=DATA_PATH, | ||
| class_name="VLMJsonlDataset", | ||
| media_root=MEDIA_ROOT, | ||
| sample_ratio=1.0, | ||
| ), | ||
| "tokenize_fn": Qwen3VLTokenizeFnConfig( | ||
| processor_path=MODEL_PATH, | ||
| max_length=16384, | ||
| add_vision_id=True, | ||
| ), | ||
| }, | ||
| ] | ||
|
|
||
| dataloader_config = DataloaderConfig( | ||
| dataset_config_list=dataset_config, | ||
| pack_max_length=16384, | ||
| collator="qwen3_vl_sft_collator", | ||
| ) | ||
|
|
||
| loss_cfg = CELossConfig(mode="chunk", chunk_size=1024) | ||
|
|
||
| trainer = TrainerConfig( | ||
| load_from=MODEL_PATH, | ||
| model_cfg=moe_cfg, | ||
| optim_cfg=optim_cfg, | ||
| fsdp_cfg=fsdp_cfg, | ||
| dataloader_cfg=dataloader_config, | ||
| lr_cfg=lr_cfg, | ||
| loss_cfg=loss_cfg, | ||
| tokenizer_path=MODEL_PATH, | ||
| global_batch_size=16, | ||
| total_epoch=1, | ||
| work_dir=f"{os.environ['WORK_DIR']}", | ||
| seed=0, | ||
| ) |
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,55 @@ | ||
| import os | ||
|
|
||
| from xtuner.v1.config import AdamWConfig, FSDPConfig, LRConfig | ||
| from xtuner.v1.datasets import FTDPTokenizeFnConfig | ||
| from xtuner.v1.datasets.config import DataloaderConfig, DatasetConfig | ||
| from xtuner.v1.loss.ce_loss import CELossConfig | ||
| from xtuner.v1.model.moe.qwen3 import Qwen3MoE30BA3Config | ||
| from xtuner.v1.train import TrainerConfig | ||
|
|
||
|
|
||
| QWEN3_MOE_PATH = os.environ["QWEN3_MOE_PATH"] | ||
| ALPACA_PATH = os.environ["ALPACA_PATH"] | ||
| CACHE_DIR = os.environ["CACHE_DIR"] | ||
|
|
||
|
|
||
| moe_cfg = Qwen3MoE30BA3Config() | ||
| optim_cfg = AdamWConfig(lr=6e-05) | ||
| lr_cfg = LRConfig(lr_type="cosine", lr_min=1e-6) | ||
| fsdp_cfg = FSDPConfig( | ||
| torch_compile=False, | ||
| cpu_offload=False, | ||
| ep_size=moe_cfg.ep_size, | ||
| ) | ||
|
|
||
| dataset_config = [ | ||
| { | ||
| "dataset": DatasetConfig( | ||
| name="alpaca", | ||
| anno_path=ALPACA_PATH, | ||
| sample_ratio=1.0, | ||
| cache_dir=CACHE_DIR, | ||
| ), | ||
| "tokenize_fn": FTDPTokenizeFnConfig(max_length=16384), | ||
| }, | ||
| ] | ||
|
|
||
| dataloader_config = DataloaderConfig(pack_max_length=16384) | ||
|
|
||
| loss_cfg = CELossConfig(mode="chunk", chunk_size=1024) | ||
|
|
||
| trainer = TrainerConfig( | ||
| load_from=QWEN3_MOE_PATH, | ||
| model_cfg=moe_cfg, | ||
| optim_cfg=optim_cfg, | ||
| fsdp_cfg=fsdp_cfg, | ||
| dataset_cfg=dataset_config, | ||
| dataloader_cfg=dataloader_config, | ||
kkscilife marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| lr_cfg=lr_cfg, | ||
| loss_cfg=loss_cfg, | ||
| tokenizer_path=QWEN3_MOE_PATH, | ||
| global_batch_size=16, | ||
| total_epoch=1, | ||
| work_dir=f"{os.environ['WORK_DIR']}", | ||
| seed=0, | ||
| ) | ||
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.
Uh oh!
There was an error while loading. Please reload this page.