Skip to content

Commit

Permalink
update concat txt
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka committed May 21, 2024
1 parent 3be3652 commit 677f389
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ model: "Xenova/llama2.c-stories15M"
dataset: wikitext
dataset_config_name: "wikitext-2-raw-v1"
recipe: "tests/sparseml/transformers/finetune/test_alternate_recipe.yaml"
num_train_epochs: 2
num_train_epochs: 2
concat_txt: False
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ test_type: "regression"
model: "zoo:llama2-7b-ultrachat200k_llama2_pretrain-base"
dataset: "ultrachat-200k"
recipe: "tests/sparseml/transformers/finetune/test_alternate_recipe.yaml"
num_train_epochs: 1
num_train_epochs: 1
concat_txt: False
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _test_oneshot_and_finetune(self):

splits = {"train": "train[:50%]", "calibration": "train[50%:60%]"}
if self.dataset == "ultrachat-200k":
splits = {"train": "train_sft[:50%]", "calibration": "train_sft[50%:60%]"}
splits = {"train": "train_gen[:50%]", "calibration": "train_gen[50%:60%]"}

apply(
model=self.model,
Expand All @@ -42,7 +42,7 @@ def _test_oneshot_and_finetune(self):
output_dir=self.output,
recipe=self.recipe,
num_train_epochs=self.num_train_epochs,
concatenate_data=True,
concatenate_data=self.concat_txt,
splits=splits,
oneshot_device=self.device,
precision="bfloat16",
Expand All @@ -51,6 +51,8 @@ def _test_oneshot_and_finetune(self):
)

def tearDown(self):
# TODO: we get really nice stats from finetune that we should log
# stored in results.json
shutil.rmtree(self.output)


Expand All @@ -63,6 +65,7 @@ class TestOneshotAndFinetuneSmall(TestOneshotAndFinetune):
recipe = None
dataset_config_name = None
num_train_epochs = None
concat_txt = None

def setUp(self):
import torch
Expand All @@ -84,6 +87,7 @@ class TestOneshotAndFinetuneGPU(TestOneshotAndFinetune):
recipe = None
dataset_config_name = None
num_train_epochs = None
concat_txt = None

def setUp(self):
import torch
Expand Down

0 comments on commit 677f389

Please sign in to comment.