Skip to content

[QEff. Finetune]: Removed samsum dataset references from FT code. #482

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 5 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions QEfficient/finetune/configs/dataset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
from dataclasses import dataclass


@dataclass
class samsum_dataset:
dataset: str = "samsum_dataset"
train_split: str = "train"
test_split: str = "validation"


@dataclass
class grammar_dataset:
dataset: str = "grammar_dataset"
Expand Down
6 changes: 3 additions & 3 deletions QEfficient/finetune/configs/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class TrainConfig:
weight_decay (float): Weight decay for optimizer (default: 0.0).
gamma (float): Learning rate decay factor (default: 0.85).
seed (int): Random seed for reproducibility (default: 42).
dataset (str): Dataset name for training (default: "samsum_dataset").
dataset (str): Dataset name for training (default: "alpaca_dataset").
task_type (str): Type of task for which the finetuning is to be done. Options: "generation" and "seq_classification". (default: "generation")
use_peft (bool): Whether to use PEFT (default: True).
peft_method (str): Parameter-efficient fine-tuning method (default: "lora").
from_peft_checkpoint (str): Path to PEFT checkpoint (default: "").
output_dir (str): Directory to save outputs (default: "meta-llama-samsum").
output_dir (str): Directory to save outputs (default: "training_results").
save_model (bool): Save the trained model (default: True).
save_metrics (bool): Save training metrics (default: True).
intermediate_step_save (int): Steps between intermediate saves (default: 1000).
Expand All @@ -49,7 +49,7 @@ class TrainConfig:
convergence_loss (float): Loss threshold for convergence (default: 1e-4).
use_profiler (bool): Enable profiling (default: False).
enable_ddp (bool): Enable distributed data parallel (default: False).
dump_root_dir (str): Directory for mismatch dumps (default: "meta-llama-samsum-mismatches/step_").
dump_root_dir (str): Directory for mismatch dumps (default: "mismatches/step_").
opByOpVerifier (bool): Enable operation-by-operation verification (default: False).
"""

Expand Down
4 changes: 0 additions & 4 deletions QEfficient/finetune/dataset/dataset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@
from QEfficient.finetune.dataset.imdb_dataset import (
get_preprocessed_imdb as get_imdb_dataset,
)
from QEfficient.finetune.dataset.samsum_dataset import (
get_preprocessed_samsum as get_samsum_dataset,
)

DATASET_PREPROC = {
"alpaca_dataset": partial(get_alpaca_dataset),
"grammar_dataset": get_grammar_dataset,
"samsum_dataset": get_samsum_dataset,
"gsm8k_dataset": get_gsm8k_dataset,
"custom_dataset": get_custom_dataset,
"imdb_dataset": get_imdb_dataset,
Expand Down
48 changes: 0 additions & 48 deletions QEfficient/finetune/dataset/samsum_dataset.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/finetune.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To run fine tuning for any user specific dataset, prepare the dataset using the
3. Inside the newly created efficient-transformers/dataset/custom_dataset.py, define a function named 'get_custom_dataset'.
4. get_custom_dataset() should have following 4 parameters: dataset_config, tokenizer, split, context_length.
5. Inside get_custom_dataset(), user needs to apply prompt and tokenize the dataset accordingly. Please refer the below template on how to define get_custom_dataset().
6. For examples, please refer python files present in [dataset](https://github.com/quic/efficient-transformers/tree/main/QEfficient/finetune/dataset). In case of Samsum dataset, get_preprocessed_samsum() of efficient-transformers/QEfficient/finetune/dataset/samsum_dataset.py is called.
6. For examples, please refer python files present in [dataset](https://github.com/quic/efficient-transformers/tree/main/QEfficient/finetune/dataset).
7. In [dataset_config.py](https://github.com/quic/efficient-transformers/blob/main/QEfficient/finetune/configs/dataset_config.py), for custom_dataset class, pass the appropriate value for train_split and test_split. As an alternative, these values can be passed as command line arguments as well with the finetune command. For example "--train_split train".
8. While running fine tuning, pass argument "-–dataset custom_dataset" to finetune on custom dataset.

Expand Down
Loading