-
Notifications
You must be signed in to change notification settings - Fork 78
[QEff.finetune] Adding style remix dataset config #858
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
quic-akuruvil
merged 6 commits into
quic:ft_experimental
from
tchawada:hf_custom_function
Mar 26, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a4ee682
Adding style remix dataset config
tchawada 6f66c42
Added documentation for style-remix
tchawada ed42e52
Removing grammar dataset from config.md
tchawada 644c18f
Corrected prompt_func
tchawada 65f937a
Adding seed to dataset
tchawada 45b4ec3
Added seed for dataset
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
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
50 changes: 50 additions & 0 deletions
50
QEfficient/finetune/experimental/configs/sft_single_device_custom_dataset_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,50 @@ | ||
| # ----------------------------------------------------------------------------- | ||
| # | ||
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # ----------------------------------------------------------------------------- | ||
| # Dataset: Style-Remix (hallisky/DiSC) | ||
| # 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: 8 | ||
| 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: "hallisky/DiSC" # Dataset name from Hugging Face Hub | ||
| prompt_template: "### Original:{original} \n ### Rewrite:\n" # function to create prompt from dataset fields | ||
| completion_template: "{generation}" # Model will be trained on this part. | ||
| dataset_disc_style: "sarcasm_more" # Style of dataset to use | ||
| data_seed: 42 # Random seed for dataset shuffling | ||
|
|
||
| # Training configuration | ||
| training: | ||
| type: "sft" | ||
| gradient_accumulation_steps: 1 # Number of steps to accumulate gradients | ||
| per_device_train_batch_size: 1 # 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 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.