[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Create a custom translation model\n=================================\n\n| **Note:** Translation LLM can be customized with your training data using [Vertex AI supervised fine-tuning - Public Preview](/vertex-ai/generative-ai/docs/models/translation-supervised-tuning).\n\nTrain and use a custom translation model by using the Google Cloud console. The\nfollowing example uses AutoML Translation to train an English-to-Spanish\ntranslation model by using a dataset that contains technology-oriented segment\npairs from software localization.\n| **Note:** The following tutorial assumes that, for your project, the Google Cloud console is using the Cloud Translation API instead of the AutoML API to create datasets. This condition is true if you have at least one native Cloud Translation resource or no legacy AutoML resources in your project. If you have only legacy AutoML resources, see [Upgrade AutoML resources](/translate/docs/advanced/automl-upgrade) for more information.\n\nBefore you begin\n----------------\n\nBefore you can start using AutoML Translation, your project must have the\nCloud Translation API enabled, and you must have the permissions that are granted by\nthe following roles:\n\n- **Viewer** role to view existing resources in your project\n- **Cloud Translation API Editor** role to create and manage datasets and models\n- **Storage Admin** role to upload training data to a Cloud Storage bucket\n\nCreate a translation dataset and import segment pairs\n-----------------------------------------------------\n\n1. [Download](/static/translate/docs/advanced/sample/automl-translation-data.zip) the\n archive file that contains the sample data for training the model, and\n extract the files.\n\n For this tutorial, you'll use the English to Spanish TSV file.\n2. Go to the AutoML Translation console.\n\n [Go to the\n Translation page](https://console.cloud.google.com/translation)\n3. From the navigation pane, click **Datasets** to go to the **Datasets** page.\n\n4. Click **Create dataset**.\n\n5. In the **Create dataset** dialog, specify details about the dataset:\n\n 1. Enter `tutorial_dataset` as the name for the dataset.\n 2. Select **English (EN)** as your source language from the drop-down list.\n 3. Select **Spanish (ES)** as your target language.\n 4. Click **Create**.\n6. After the dataset is created, click the dataset name to view its details.\n\n7. Go to the **Import** tab and upload the `en-es.tsv` dataset to\n Cloud Storage:\n\n 1. Select **Upload files from your computer**.\n 2. Click **Select files** , and choose the `en-es.tsv` file that you previously downloaded and extracted.\n 3. Click **Browse** to select or create a new Cloud Storage bucket where your TSV is stored. The bucket region must be `us-central1`.\n8. Click **Continue**.\n\n AutoML Translation automatically splits your data into training,\n validation, and testing sets. You can view these splits and the imported\n sentence pairs in the **Sentences** tab of your dataset.\n\nTrain a model\n-------------\n\n1. Go to the AutoML Translation console.\n\n [Go to the\n Translation page](https://console.cloud.google.com/translation)\n2. From the navigation pane, go to the **Datasets** page.\n\n3. Click the **tutorial_dataset** dataset.\n\n4. Go to the **Train** tab.\n\n5. Click **Start training** , which opens the **Train new model** pane.\n\n6. Enter `tutorial_model` for the model name.\n\n7. Click **Start training**.\n\nTraining a model can take several hours to complete.\n\nEvaluate the model\n------------------\n\nCheck to see how the model compares to the default Google NMT model that is\nbased on segment pairs from your test set.\n\n1. Go to the AutoML Translation console.\n\n [Go to the\n Translation page](https://console.cloud.google.com/translation)\n2. From the navigation pane, go to the **Models** page.\n\n3. Click the **tutorial_model** model.\n\n4. Click the **Evaluate** tab.\n\nIn the **Previous evaluations** section, Cloud Translation shows your model's\nBLEU score compared to the Google NMT model. The [BLEU (Bilingual Evaluation\nUnderstudy)](/translate/docs/advanced/automl-evaluate#bleu)\nscore indicates how similar the candidate text is to the reference\ntexts; values closer to 100 represent more similar texts.\n\nUse the translation model\n-------------------------\n\nFrom the Google Cloud console, you can use your custom model to translate some\ntext.\n\n1. Go to the AutoML Translation console.\n\n [Go to the\n Translation page](https://console.cloud.google.com/translation)\n2. From the navigation pane, go to the **Models** page.\n\n3. Click the **tutorial_model** model.\n\n4. Click the **Predict** tab.\n\n5. In the **English** text box, enter text to translate and then click\n **Translate**.\n\n You can compare the results from your custom model to the Google NMT model.\n\nClean up\n--------\n\nTo avoid unnecessary Google Cloud charges, delete your [model](/translate/docs/advanced/automl-models#delete-model),\n[dataset](/translate/docs/advanced/automl-datasets#delete-dataset), and `en-es.tsv` file. You can also use the\n[Google Cloud console](https://console.cloud.google.com/) to delete your project if you don't need it.\n\nWhat's next\n-----------\n\n- To learn about custom models, see the [Beginner's guide](/translate/docs/advanced/automl-beginner).\n- To create your own dataset and custom model, see [Prepare training\n data](/translate/docs/advanced/automl-prepare) for instructions on how to prepare your data."]]