berkamphoon commited on
Commit
cef23c3
·
verified ·
1 Parent(s): 5d30a05

Training in progress, epoch 1

Browse files
README.md CHANGED
@@ -27,7 +27,7 @@ print(output["generated_text"])
27
 
28
  ## Training procedure
29
 
30
- [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/yoon307-kaist/medgemma-27b-it-dr5-Project/runs/lqwj9jus)
31
 
32
 
33
  This model was trained with SFT.
 
27
 
28
  ## Training procedure
29
 
30
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/yoon307-kaist/medgemma-27b-it-dr5-Project/runs/ozcexaa1)
31
 
32
 
33
  This model was trained with SFT.
adapter_config.json CHANGED
@@ -28,16 +28,16 @@
28
  "rank_pattern": {},
29
  "revision": null,
30
  "target_modules": [
31
- "gate_proj",
 
 
 
32
  "up_proj",
 
33
  "v_proj",
34
  "q_proj",
35
- "fc1",
36
- "fc2",
37
- "k_proj",
38
- "out_proj",
39
  "down_proj",
40
- "o_proj"
41
  ],
42
  "task_type": "CAUSAL_LM",
43
  "trainable_token_indices": null,
 
28
  "rank_pattern": {},
29
  "revision": null,
30
  "target_modules": [
31
+ "k_proj",
32
+ "fc1",
33
+ "out_proj",
34
+ "o_proj",
35
  "up_proj",
36
+ "gate_proj",
37
  "v_proj",
38
  "q_proj",
 
 
 
 
39
  "down_proj",
40
+ "fc2"
41
  ],
42
  "task_type": "CAUSAL_LM",
43
  "trainable_token_indices": null,
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6e9aadb597ce536c66a4aa231ada2b97f84829426c830024ead25e411768ccd5
3
  size 6127553104
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c271ed2f9968755796be47d4c4cf031d2381369b29dfd7f819615ec1b3c05133
3
  size 6127553104
runs/Jul23_16-31-18_meedgxh100a/events.out.tfevents.1753302680.meedgxh100a.1938592.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f98e127043eadf647992549cbb08091a95d5a485861b0bbb7c20f5d7f6a235f1
3
+ size 9594
train_medgemma_ft_copy.py CHANGED
@@ -215,7 +215,7 @@ if __name__ == '__main__':
215
  pos = [s for s in data if s[task_idx] != '0.0']
216
  num_sample = len(pos)
217
  if train:
218
- return random.sample(neg, 8*num_sample), random.sample(pos, num_sample)
219
  else:
220
  return random.sample(neg, num_sample), pos
221
  # return random.sample(neg, 15), random.sample(pos, 15)
@@ -290,7 +290,7 @@ if __name__ == '__main__':
290
  from peft import PeftModel
291
  print("🔁 Loading trained PEFT weights...")
292
  # model = PeftModel.from_pretrained(model, exp_name)
293
- model = PeftModel.from_pretrained(model, exp_name+"/checkpoint-322")
294
  # model = PeftModel.from_pretrained(model, "llava-1.5-7b-hf-dr-all/checkpoint-80")
295
  phase= "val"
296
  else:
@@ -304,7 +304,7 @@ if __name__ == '__main__':
304
  training_args = SFTConfig(
305
  output_dir=exp_name,
306
  num_train_epochs= 10, # Number of training epochs
307
- per_device_train_batch_size=4, # Batch size per device during training
308
  per_device_eval_batch_size=4, # Batch size per device during evaluation
309
  gradient_accumulation_steps=8, # Number of steps before performing a backward/update pass
310
  gradient_checkpointing=True, # Enable gradient checkpointing to reduce memory usage
@@ -317,8 +317,8 @@ if __name__ == '__main__':
317
  bf16=True, # Use bfloat16 precision
318
  max_grad_norm=0.3, # Max gradient norm based on QLoRA paper
319
  warmup_ratio=0.03, # Warmup ratio based on QLoRA paper
320
- lr_scheduler_type="linear", # Use linear learning rate scheduler
321
- # lr_scheduler_type="constant", # Use linear learning rate scheduler
322
  push_to_hub=True, # Push model to Hub
323
  report_to="tensorboard", # Report metrics to tensorboard
324
  gradient_checkpointing_kwargs={"use_reentrant": False}, # Set gradient checkpointing to non-reentrant to avoid issues
 
215
  pos = [s for s in data if s[task_idx] != '0.0']
216
  num_sample = len(pos)
217
  if train:
218
+ return random.sample(neg, 4*num_sample), random.sample(pos, num_sample)
219
  else:
220
  return random.sample(neg, num_sample), pos
221
  # return random.sample(neg, 15), random.sample(pos, 15)
 
290
  from peft import PeftModel
291
  print("🔁 Loading trained PEFT weights...")
292
  # model = PeftModel.from_pretrained(model, exp_name)
293
+ model = PeftModel.from_pretrained(model, exp_name+"/checkpoint-140")
294
  # model = PeftModel.from_pretrained(model, "llava-1.5-7b-hf-dr-all/checkpoint-80")
295
  phase= "val"
296
  else:
 
304
  training_args = SFTConfig(
305
  output_dir=exp_name,
306
  num_train_epochs= 10, # Number of training epochs
307
+ per_device_train_batch_size=2, # Batch size per device during training
308
  per_device_eval_batch_size=4, # Batch size per device during evaluation
309
  gradient_accumulation_steps=8, # Number of steps before performing a backward/update pass
310
  gradient_checkpointing=True, # Enable gradient checkpointing to reduce memory usage
 
317
  bf16=True, # Use bfloat16 precision
318
  max_grad_norm=0.3, # Max gradient norm based on QLoRA paper
319
  warmup_ratio=0.03, # Warmup ratio based on QLoRA paper
320
+ # lr_scheduler_type="linear", # Use linear learning rate scheduler
321
+ lr_scheduler_type="constant", # Use linear learning rate scheduler
322
  push_to_hub=True, # Push model to Hub
323
  report_to="tensorboard", # Report metrics to tensorboard
324
  gradient_checkpointing_kwargs={"use_reentrant": False}, # Set gradient checkpointing to non-reentrant to avoid issues
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb66972ee590bc57ef4d362043585c1839ff4ce291054e9c1c8483beae8c6abf
3
  size 5816
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e147aa0e16b367fbd031cef2ce0cf2fe5787b369b303bafe971b91c4bfc69c69
3
  size 5816