Tatvajsh commited on
Commit
a2898dc
·
1 Parent(s): 1cf77cd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -1
README.md CHANGED
@@ -16,7 +16,66 @@ should probably proofread and complete it, then remove this comment. -->
16
  This model is a fine-tuned version of [openlm-research/open_llama_3b_v2](https://huggingface.co/openlm-research/open_llama_3b_v2) on the None dataset.
17
 
18
  ## Model description
19
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  More information needed
21
 
22
  ## Intended uses & limitations
 
16
  This model is a fine-tuned version of [openlm-research/open_llama_3b_v2](https://huggingface.co/openlm-research/open_llama_3b_v2) on the None dataset.
17
 
18
  ## Model description
19
+ training_arguments = TrainingArguments(
20
+ per_device_train_batch_size=8,
21
+ num_train_epochs=10,
22
+ learning_rate=3e-5,
23
+ gradient_accumulation_steps=2,
24
+ optim="adamw_hf",
25
+ fp16=True,
26
+ logging_steps=1,
27
+ # debug=True,
28
+ output_dir="/kaggle/Tatvajsh/Lllama_AHS_V_7.0/"
29
+ # warmup_steps=100,
30
+ )
31
+
32
+ trainer = SFTTrainer(
33
+ model=model,
34
+ tokenizer=tokenizer,
35
+ train_dataset=dataset,
36
+ dataset_text_field="text",
37
+ peft_config=lora_config,
38
+ max_seq_length=512,
39
+ args=training_arguments,
40
+ # packing=True,#change
41
+ )
42
+
43
+ trainer.train()
44
+
45
+
46
+ EPOCHS=[30-50]
47
+
48
+
49
+ from peft import LoraConfig, get_peft_model
50
+
51
+ lora_config = LoraConfig(
52
+ r=16,
53
+ lora_alpha=64,
54
+ target_modules=['base_layer','gate_proj', 'v_proj','up_proj','down_proj','q_proj','k_proj','o_proj'],
55
+ lora_dropout=0.05,
56
+ bias="none",
57
+ task_type="CAUSAL_LM"
58
+ )
59
+
60
+
61
+ def generate_prompt(row) -> str:
62
+ prompt=f"""
63
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
64
+
65
+ ### Instruction:
66
+
67
+ {row['Instruction']}
68
+
69
+ ### Response:
70
+
71
+ {row['Answer']}
72
+
73
+ ### End
74
+ """
75
+ return prompt
76
+
77
+
78
+ WHEN THE TRAINING LOSS IN NOT REDUCING THEN TRY SETTING FOR LESSER VALUE OF LEARNING RATE I.E. 2E-5 TO 3E-5,ETC.
79
  More information needed
80
 
81
  ## Intended uses & limitations