train_mbart_cc25_enro.sh 1.33 KB
Newer Older
Sylvain Gugger's avatar
Sylvain Gugger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
14

Sylvain Gugger's avatar
Sylvain Gugger committed
15
16
17
18
python finetune_trainer.py \
    --model_name_or_path=facebook/mbart-large-cc25 \
    --data_dir $ENRO_DIR \
    --output_dir mbart_cc25_enro --overwrite_output_dir \
19
    --learning_rate=3e-5 \
Sylvain Gugger's avatar
Sylvain Gugger committed
20
    --warmup_steps 500 \ 
21
    --fp16 \
Sylvain Gugger's avatar
Sylvain Gugger committed
22
    --label_smoothing 0.1 \
23
    --adam_eps 1e-06 \
Sylvain Gugger's avatar
Sylvain Gugger committed
24
    --src_lang en_XX --tgt_lang ro_RO \
25
    --freeze_embeds \
Sylvain Gugger's avatar
Sylvain Gugger committed
26
    --per_device_train_batch_size=4 --per_device_eval_batch_size=4 \
Sylvain Gugger's avatar
Sylvain Gugger committed
27
    --max_source_length 128 --max_length 128 --eval_max_length 128 \
Sylvain Gugger's avatar
Sylvain Gugger committed
28
29
30
31
32
33
34
    --sortish_sampler \
    --num_train_epochs 6 \
    --save_steps 25000 --eval_steps 25000 --logging_steps 1000 \
    --do_train --do_eval --do_predict \
    --evaluation_strategy steps \
    --predict_with_generate --logging_first_step \
    --task translation \
35
    "$@"