Create tran.py
Browse files
tran.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!python /content/run_translation.py \
|
2 |
+
--model_name_or_path Helsinki-NLP/opus-mt-en-ar \
|
3 |
+
--do_train \
|
4 |
+
--do_eval \
|
5 |
+
--source_lang en \
|
6 |
+
--target_lang ar \
|
7 |
+
--source_prefix "translate English to Arabic: " \
|
8 |
+
--dataset_name sdyy/en-ar \
|
9 |
+
--dataset_config_name default \
|
10 |
+
--train_file train_file.jsonl \
|
11 |
+
--validation_file validation_dataset.jsonl \
|
12 |
+
--output_dir /content/tst-translation \
|
13 |
+
--per_device_train_batch_size 4 \
|
14 |
+
--per_device_eval_batch_size 4 \
|
15 |
+
--overwrite_output_dir \
|
16 |
+
--predict_with_generate
|