-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/domain losses #21
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,3 +28,4 @@ packaging | |
| ninja | ||
| swanlab[dashboard] | ||
| liger-kernel | ||
| colorama | ||
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,71 @@ | ||
| enable_list="multimodal model.model.embed_tokens model.model.layers model.lm_head" | ||
| experiment_name="Qwen3_1.7B_Omics_sft_1014_all_task_test" | ||
| output_path="/mnt/shared-storage-user/ai4agr-share/wangzhefan/molly_checkpoint/${experiment_name}" | ||
|
|
||
| export OMP_NUM_THREADS=4 | ||
| export MKL_NUM_THREADS=4 | ||
|
|
||
| # export TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC=3600 | ||
| # export TORCH_NCCL_ASYNC_ERROR_HANDLING=1 | ||
| # export NCCL_TIMEOUT=3600 | ||
|
|
||
| options="--experiment-name $experiment_name \ | ||
| --output_dir $output_path \ | ||
| --text-model-path /mnt/shared-storage-user/ai4agr-share/lijinzhe/PreModel/Qwen3-1.7B \ | ||
| --dna-rna-model-path /mnt/shared-storage-user/ai4agr-share/lijinzhe/PreModel/nucleotide-transformer-v2-500m-multi-species/ \ | ||
| --dna-rna-k-tokens 1024 \ | ||
| --protein-model-path /mnt/shared-storage-user/ai4agr-share/lijinzhe/PreModel/esm2_t33_650M_UR50D/ \ | ||
| --protein-k-tokens 1024 \ | ||
| --device cuda \ | ||
| --train-mlp \ | ||
| --train-llm \ | ||
| --train-dataset-path /mnt/shared-storage-user/wangzhefan/multimodel/data/molly/train_all_task_merged_labelled.parquet \ | ||
| --eval-dataset-path /mnt/shared-storage-user/wangzhefan/multimodel/data/molly/dev_all_task_merged_labelled.parquet \ | ||
| --max-len 3072 \ | ||
| --max-src-len 3072 \ | ||
| --eval-max-len 3072 \ | ||
| --eval-max-src-len 3072 \ | ||
| --mode sft \ | ||
| --per_device_train_batch_size 4 \ | ||
| --per_device_eval_batch_size 4 \ | ||
| --read-nums 10240000000 \ | ||
| --eval-read-nums 10240000000 \ | ||
| --num_train_epochs 5 \ | ||
| --learning_rate 3e-5 \ | ||
| --bf16 \ | ||
| --enable-list $enable_list \ | ||
| --save_strategy steps \ | ||
| --save_steps 80000 \ | ||
| --eval_steps 80000 \ | ||
| --eval_strategy steps \ | ||
| --logging_strategy steps \ | ||
| --logging_steps 1 \ | ||
| --save_trainable False \ | ||
| --save-total-limit 500 \ | ||
| --warmup_ratio 0.1 \ | ||
| --early-stopping-patience 1000000000 \ | ||
| --gradient-accumulation-steps 1 \ | ||
| --save_only_model \ | ||
| --attn_impl flash_attention_2 \ | ||
| --use_liger True \ | ||
| --swanlab \ | ||
| --swanlab-mode local \ | ||
| --swanlab-team BioMLLM_report \ | ||
| --swanlab-project BioMLLM \ | ||
| --seed 42 \ | ||
| --compute-domain-losses True\ | ||
| " | ||
| # --load_best_model_at_end \ | ||
| # --save_safetensors \ | ||
| # --greater_is_better \ | ||
| # --use-lora | ||
| # --load-pretrained \ | ||
|
|
||
| deepspeed \ | ||
| --include localhost:0 \ | ||
| src/train.py \ | ||
| --deepspeed_config src/configs/ds_z0_config.json \ | ||
| $options | ||
|
|
||
|
|
||
| # py-spy dump -p 11499 --locals | head -60 |
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 |
|---|---|---|
|
|
@@ -67,4 +67,4 @@ src/train.py \ | |
| $options | ||
|
|
||
|
|
||
| # py-spy dump -p 11499 --locals | head -60 | ||
| # py-spy dump -p 11499 --locals | head -60 | ||
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 |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| from .omics_trainer import OmicsTrainer | ||
| from .domain_loss import CausalLMOutputWithPast, my_inner_training_loop, my_maybe_log_save_evaluate, my_training_step, my_lce_forward | ||
|
|
||
| __all__ = [ | ||
| "OmicsTrainer", | ||
| "CausalLMOutputWithPast", | ||
| "my_inner_training_loop", | ||
| "my_maybe_log_save_evaluat", | ||
| "my_training_step,my_lce_forward" | ||
| ] |
Oops, something went wrong.
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.