jimboHsueh commited on
Commit
a4ab28e
·
1 Parent(s): 40517c3

Upload README-4.md

Browse files
Files changed (1) hide show
  1. README-4.md +38 -0
README-4.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # **HW2**
2
+
3
+ ## **Environment**
4
+ ```
5
+ pip install -r requirements.txt
6
+ ```
7
+
8
+ ## **Download**
9
+ Download adapter checkpoints
10
+ ```
11
+ bash ./download.sh
12
+ ```
13
+
14
+ ## **Fine tuning mT5 model**
15
+ ```
16
+ python train.py --base_model_path jimboHsueh/save_hw3 \
17
+ --peft_path ./PETH \
18
+ --train_data_path train.json \
19
+ --per_device_train_batch_size 2 \
20
+ --gradient_accumulation_steps 8 \
21
+ --test_data_path public_test.json \
22
+ --output_dir HW3_4 \
23
+ --push_to_hub
24
+ ```
25
+ -**base_model_path**: Path to Taiwan_llama.
26
+
27
+ -**peft_path**: Path to peft model.
28
+
29
+ -**train_data_path**: Path to train.json.
30
+
31
+ -**test_data_path**: Path to test.json.
32
+
33
+ ## **Generate prediction.json**
34
+ ```
35
+ bash ./download.sh
36
+ bash ./run.sh python /path/to/Taiwan-LLaMa-folder /path/to/adapter_checkpoint \
37
+ /path/to/input.json /path/to/output.json
38
+ ```