此翻译任务的训练完成后,如何获取模型输出文件?

问题描述 投票:0回答:1

我正在研究约鲁巴语的变音项目。这是尼日利亚语言。

我正在使用 HuggingFace codebase 来执行我的工作。训练、评估和预测阶段运行良好。但是,我在任何地方都看不到模型输出。我怎么才能得到它?我应该做什么才能得到这个文件。我需要将其部署在网络服务器上。

参见我用来训练模型的命令:

CUDA_VISIBLE_DEVICES=0 python run_translation.py --model_name_or_path Davlan/oyo-t5-small --do_train --do_eval --source_lang unyo --target_lang dcyo --source_prefix "<unyo2dcyo>: " --train_file data_prep_eng/output_data/bible_train.json --validation_file data_prep_eng/output_data/dev.json --test_file data_prep_eng/output_data/test.json --output_dir oyot5_small_unyo_dcyo_bible --max_source_length 512 --max_target_length 512 --per_device_train_batch_size=24 --per_device_eval_batch_size=24 --num_train_epochs 3 --overwrite_output_dir --predict_with_generate --save_steps 10000 --num_beams 10 --do_predict 

run_translation.py
文件只是 HuggingFace 存储库的直接 copy

我缺少获取此模型的命令吗?

在完成训练、评估和预测步骤后查看模型的输出

python deep-learning translation huggingface-transformers huggingface
1个回答
0
投票

因此,经过几天的搜索,HuggingFace 团队解决了这个问题。您可以在这里找到它。您还需要更新您的变压器库。请参阅此帖子StackOverflow

模型不再命名为

pytorch_model.bin
。他们被命名为
model.safetensors

© www.soinside.com 2019 - 2024. All rights reserved.