-
Notifications
You must be signed in to change notification settings - Fork 81
[QEff.finetuning] Hf config update #795
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
52 commits
Select commit
Hold shift + click to select a range
f81ef6e
General disagg fix for prefill-only model (#698)
ochougul c57392d
Adding Vae Decoder in Wan (#688)
mohiso22 75367b1
Evaluating the values of CCL lists for different scenarios (#710)
vjanfaza 1e63710
Updating 2-layer instruction for Wan (#715)
tv-karthikeya 1ef9935
Updated finetune docs for MULTI NODE Training (#717)
quic-akuruvil c76d5ea
Adding support for multi-node DDP training (#708)
smedhe 7a39933
Updating MDP partition config: prioritizing dump over load (#720)
asmigosw 08bce2c
Updated docs (#722)
quic-akuruvil 8b00c1b
HOTFIX: changes in alpaca and grammar dataset utils (#724)
smedhe b074af0
Fixing the default value of CCL in infer.py (#725)
vjanfaza 5fdde19
Adding support for multi-node PP+DDP (#726)
smedhe 1f2ac51
Added default NPI file (#657)
quic-akuruvil dcbb7be
Release 1.21 docs (#718)
tv-karthikeya 1ec3975
HOTFIX : Added support for repeat kv heads aligned Bias scaling for A…
quic-dhirajku e61a1a3
Removed OpenGVLab/InternVL2_5-1B and OpenGVLab/InternVL3_5-1B (#736)
quic-rishinr 47a0fec
Qeff versioning (#741)
quic-rishinr 3a8e5e9
Revert "Qeff versioning" (#746)
quic-rishinr 0ffa4ea
Fix for Qwen 2.5 VL with subfunction (#733)
abhishek-singh591 32f30c0
Fixed torch patch for subfunction with VLMs (#750)
abhishek-singh591 eb74758
Added support of subfunction for VLMs (#699)
abhishek-singh591 742b7bd
Updated reduce sum calculation to use einsum for gpt_oss (#754)
asmigosw 5a129c7
Updating pytest config for InternVL (#758)
tv-karthikeya b777e8b
Wan support to skip compilation (#734)
tv-karthikeya 75bf976
Fixing SW issue in Gemma3 (#740)
qcdipankar 3751f7e
Fix documentation of Multinode FT (#764)
quic-akuruvil 27ebe8e
Adding support for gemma3 in continous batching script for CI (#763)
qcdipankar 536e3fc
Subfunction Fix (#766)
abhishek-singh591 f64f703
Mainline version update (#752)
quic-rishinr 1a3e09c
Updated compile from qaic-exec to qaic-compile (#703)
asmigosw e8e5c43
Fix for Diffusers subfunction (#759)
tv-karthikeya fc42332
Added One hot fix for MOE model with subfunction (#777)
abhishek-singh591 544327a
Adding support of QEFFAutoModelForSequenceClassification (#729)
quic-amitraj facae5f
CI test optimization (#751)
quic-rishinr cd25784
Merge remote-tracking branch 'upstream/ft_experimental' into final_hf
tchawada 3f6315c
Adding qaic validation in config manager, default value to prompt_func
tchawada 9015bf6
Adding qaic validation in config manager, default value to prompt_func
tchawada fb28705
Adding a function to check whether NSP for given QAIC is free or not
tchawada 5f1470e
Moved is_nsp_free func to device_utils.py
tchawada 674b2f5
Adding num_samples in config
tchawada b47839f
Adding num_samples in config
tchawada 4e390e4
Adding integrated_test
tchawada 9f88237
updating is_nsp_free() function
tchawada 4b53a95
Adding more unit tests in test_config_manager.py
tchawada dbf2182
fixing lint error
tchawada f2d0cb4
Tested test_integrated.py for DDP
tchawada d254a29
Updated finetune_experimental.py
tchawada cf80242
Updated finetune_experimental.py
tchawada 6762d1a
Merge branch 'ft_experimental' into final_hf
tchawada 07b5e54
Updated hf_finetune.md and config.md
tchawada f77df70
Updating hf_finetune.md
tchawada dce11f8
Added output dir structure in config.md
tchawada 65b1693
Added output dir structure in config.md
tchawada 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
Some comments aren't visible on the classic Files Changed page.
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
47 changes: 0 additions & 47 deletions
47
QEfficient/finetune/experimental/configs/sample_config.yaml
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
QEfficient/finetune/experimental/configs/sft_ddp_config.yaml
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,54 @@ | ||
| # ----------------------------------------------------------------------------- | ||
| # | ||
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # ----------------------------------------------------------------------------- | ||
| # Model configuration | ||
| model: | ||
| model_type: "hf" # Hugging Face model | ||
| auto_class_name: "AutoModelForCausalLM" # Auto class to load the model with | ||
| model_name: "HuggingFaceTB/SmolLM-135M" # Pretrained model name | ||
| use_peft: true # Enable PEFT (Parameter Efficient Fine-Tuning) | ||
| peft_config: | ||
| lora_r: 16 | ||
| lora_alpha: 16 | ||
| lora_dropout: 0 | ||
| target_modules: ["k_proj","gate_proj","q_proj","up_proj","v_proj","down_proj","o_proj"] # Target modules for LoRA | ||
| task_type: "CAUSAL_LM" # Options: CAUSAL_LM, SEQ_2_SEQ_LM, etc. | ||
| peft_type: "LORA" # Options: LORA, IA3, etc.. | ||
|
|
||
| # Dataset configuration | ||
| dataset: | ||
| dataset_type: "sft_dataset" | ||
| dataset_name: "yahma/alpaca-cleaned" # Dataset name from Hugging Face Hub | ||
| prompt_func: "QEfficient.finetune.experimental.preprocessing.alpaca_func:create_alpaca_prompt" # Function to create prompt from dataset fields | ||
| completion_template: "{output}" # Template for completion field in dataset | ||
|
|
||
|
|
||
| # Training configuration | ||
| training: | ||
| type: "sft" | ||
| gradient_accumulation_steps: 2 # Number of steps to accumulate gradients | ||
| per_device_train_batch_size: 2 # Batch size per device during training | ||
| torch_compile: False # Whether to use torch.compile | ||
| ddp_config: # DDP configuration | ||
| ddp_backend: "qccl" | ||
| ddp_find_unused_parameters: False | ||
| ddp_bucket_cap_mb: 25 | ||
| ddp_broadcast_buffers: True | ||
| ddp_timeout: 1800 | ||
|
|
||
| # Optimizer configuration | ||
| optimizers: | ||
| optimizer_name: "AdamW" | ||
| lr: 2e-4 | ||
|
|
||
| scheduler: | ||
| scheduler_name: "cosine" | ||
|
|
||
| callbacks: | ||
| early_stopping: | ||
| early_stopping_patience: 3 # Number of epochs to wait before stopping training | ||
| early_stopping_threshold: 0.001 # Minimum change in metric to qualify as improvement | ||
| tensorboard: |
49 changes: 49 additions & 0 deletions
49
QEfficient/finetune/experimental/configs/sft_single_device_config.yaml
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,49 @@ | ||
| # ----------------------------------------------------------------------------- | ||
| # | ||
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # ----------------------------------------------------------------------------- | ||
| # Model configuration | ||
| model: | ||
| model_type: "hf" # Hugging Face model | ||
| auto_class_name: "AutoModelForCausalLM" # Auto class to load the model with | ||
| model_name: "HuggingFaceTB/SmolLM-135M" # Pretrained model name | ||
| use_peft: true # Enable PEFT (Parameter Efficient Fine-Tuning) | ||
| peft_config: | ||
| lora_r: 16 | ||
| lora_alpha: 16 | ||
| lora_dropout: 0 | ||
| target_modules: ["k_proj","gate_proj","q_proj","up_proj","v_proj","down_proj","o_proj"] # Target modules for LoRA | ||
| task_type: "CAUSAL_LM" # Options: CAUSAL_LM, SEQ_2_SEQ_LM, etc. | ||
| peft_type: "LORA" # Options: LORA, IA3, etc. | ||
|
|
||
| # Dataset configuration | ||
| dataset: | ||
| dataset_type: "sft_dataset" | ||
| dataset_name: "yahma/alpaca-cleaned" # Dataset name from Hugging Face Hub | ||
| prompt_func: "QEfficient.finetune.experimental.preprocessing.alpaca_func:create_alpaca_prompt" # Function to create prompt from dataset fields | ||
| completion_template: "{output}" # Template for completion field in dataset | ||
|
|
||
|
|
||
| # Training configuration | ||
| training: | ||
| type: "sft" | ||
| gradient_accumulation_steps: 2 # Number of steps to accumulate gradients | ||
| per_device_train_batch_size: 2 # Batch size per device during training | ||
| num_train_epochs: 1 | ||
| torch_compile: False # Whether to use torch.compile | ||
|
|
||
| # Optimizer configuration | ||
| optimizers: | ||
| optimizer_name: "AdamW" | ||
| lr: 2e-4 | ||
|
|
||
| scheduler: | ||
| scheduler_name: "cosine" | ||
|
|
||
| callbacks: | ||
| early_stopping: | ||
| early_stopping_patience: 3 # Number of epochs to wait before stopping training | ||
| early_stopping_threshold: 0.001 # Minimum change in metric to qualify as improvement | ||
| tensorboard: |
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.