jimboHsueh commited on
Commit
2e64eea
·
1 Parent(s): 62cf5a8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # **HW2**
2
+
3
+ ## **Environment**
4
+ ```
5
+ pip install -r requirements.txt
6
+ ```
7
+
8
+ ## **Download**
9
+ Download training and validation data, as well as fine-tuned mT5 model.
10
+ ```
11
+ bash ./download.sh
12
+ ```
13
+
14
+ ## **Fine tuning mT5 model**
15
+ ```
16
+ python ./code/run_summarization.py \
17
+ --model_name_or_path google/mt5-small \
18
+ --train_file train.jsonl \
19
+ --validation_file public.jsonl \
20
+ --dataset_config "3.0.0" \
21
+ --source_prefix "summarize: " \
22
+ --output_dir ./HW2 \
23
+ --num_train_epochs 3 \
24
+ --num_beams 1 \
25
+ --do_sample False \
26
+ --push_to_hub
27
+ ```
28
+ -**model_name_or_path**: Path to pretrained model.
29
+
30
+ -**output_dir**: Path to directory which saves the model outputs.
31
+
32
+ -**train_file**: Path to train.jsonl.
33
+
34
+ -**validation_file**: Path to public.jsonl.
35
+
36
+ ## **Generate output.jsonl**
37
+ ```
38
+ bash ./download.sh
39
+ bash ./run.sh /path/to/input.jsonl /path/to/output.jsonl
40
+ ```