Skip to content

Commit

Permalink
Add sanity test for QLoRA
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeet-dhumal authored and openshift-merge-bot[bot] committed Sep 24, 2024
1 parent 907bbfa commit ee3fc6b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/kfto/core/config_qlora.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"model_name_or_path": "/tmp/model/bloom-560m",
"training_data_path": "/etc/config/twitter_complaints_small.json",
"output_dir": "/tmp/out",
"save_model_dir": "/tmp/out",
"num_train_epochs": 1.0,
"per_device_train_batch_size": 4,
"per_device_eval_batch_size": 4,
"gradient_accumulation_steps": 4,
"save_strategy": "no",
"learning_rate": 1e-4,
"weight_decay": 0.0,
"lr_scheduler_type": "cosine",
"include_tokens_per_second": true,
"response_template": "\n### Label:",
"dataset_text_field": "output",
"use_flash_attn": false,
"peft_method": "qlora",
"target_modules": ["all-linear"],
"use_4bit": true,
"bnb_4bit_compute_dtype": "float16",
"bnb_4bit_quant_type": "nf4",
"use_nested_quant": false,
"fp16": false,
"bf16": false
}
3 changes: 3 additions & 0 deletions tests/kfto/core/kfto_kueue_sft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func TestPytorchjobWithSFTtrainerFinetuning(t *testing.T) {
func TestPytorchjobWithSFTtrainerLoRa(t *testing.T) {
runPytorchjobWithSFTtrainer(t, "config_lora.json")
}
func TestPytorchjobWithSFTtrainerQLoRa(t *testing.T) {
runPytorchjobWithSFTtrainer(t, "config_qlora.json")
}

func runPytorchjobWithSFTtrainer(t *testing.T, modelConfigFile string) {
test := With(t)
Expand Down

0 comments on commit ee3fc6b

Please sign in to comment.