Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Benutzerdefiniertes Übersetzungsmodell erstellen
Benutzerdefiniertes Übersetzungsmodell mit der Google Cloud Konsole trainieren und verwenden Im folgenden Beispiel wird AutoML Translation verwendet, um ein Übersetzungsmodell vom Englischen ins Spanische zu trainieren. Dazu wird ein Dataset mit technologieorientierten Segmentpaaren aus der Softwarelokalisierung verwendet.
Hinweis
Bevor Sie AutoML Translation verwenden können, muss für Ihr Projekt die Cloud Translation API aktiviert sein. Außerdem benötigen Sie die Berechtigungen, die durch die folgenden Rollen gewährt werden:
Rolle Betrachter, um vorhandene Ressourcen in Ihrem Projekt anzusehen
Rolle Cloud Translation API-Bearbeiter zum Erstellen und Verwalten von Datasets und Modellen
Rolle Storage-Administrator zum Hochladen von Trainingsdaten in einen Cloud Storage-Bucket
Dataset zur Übersetzung erstellen und Segmentpaare importieren
Klicken Sie im Navigationsbereich auf Datasets, um die Seite Datasets aufzurufen.
Klicken Sie auf Dataset erstellen.
Geben Sie im Dialogfeld Dataset erstellen Details zum Dataset an:
Geben Sie tutorial_dataset als Namen für das Dataset ein.
Wählen Sie in der Drop-down-Liste Englisch (EN) als Quellsprache aus.
Wählen Sie Spanisch (ES) als Zielsprache aus.
Klicken Sie auf Erstellen.
Klicken Sie nach dem Erstellen des Datasets auf den Namen, um die Details aufzurufen.
Rufen Sie den Tab Importieren auf und laden Sie das Dataset en-es.tsv in Cloud Storage hoch:
Wählen Sie Dateien von Ihrem Computer hochladen aus.
Klicken Sie auf Dateien auswählen und wählen Sie die en-es.tsv-Datei aus, die Sie zuvor heruntergeladen und extrahiert haben.
Klicken Sie auf Durchsuchen, um einen neuen Cloud Storage-Bucket auszuwählen oder zu erstellen, in dem Ihre TSV-Datei gespeichert ist. Die Bucket-Region muss us-central1 sein.
Klicken Sie auf Weiter.
AutoML Translation teilt Ihre Daten automatisch in Trainings-, Validierungs- und Test-Datasets auf. Sie können sich diese Aufteilungen und die importierten Satzpaare auf dem Tab Sätze Ihres Datasets ansehen.
Rufen Sie im Navigationsbereich die Seite Modelle auf.
Klicken Sie auf das Modell tutorial_model.
Klicken Sie auf den Tab Evaluate (Bewerten).
Im Bereich Vorherige Bewertungen wird der BLEU-Wert Ihres Modells im Vergleich zum Google-NMÜ-Modell angezeigt. Der BLEU-Score (Bilingual Evaluation Understudy) gibt an, wie ähnlich der Kandidatentext den Referenztexten ist. Je näher die Werte an 100 liegen, desto ähnlicher sind die Texte.
Übersetzungsmodell verwenden
In der Google Cloud -Konsole können Sie Ihr benutzerdefiniertes Modell verwenden, um Text zu übersetzen.
Rufen Sie im Navigationsbereich die Seite Modelle auf.
Klicken Sie auf das Modell tutorial_model.
Klicken Sie auf den Tab Vorhersagen.
Geben Sie im Textfeld Englisch den zu übersetzenden Text ein und klicken Sie dann auf Übersetzen.
Die Ergebnisse Ihres benutzerdefinierten Modells können Sie mit dem NMT-Modell von Google vergleichen.
Bereinigen
Um unnötige Google Cloud -Gebühren zu vermeiden, löschen Sie Ihr Modell, den Datensatz und die en-es.tsv-Datei. Sie können das Projekt auch mitGoogle Cloud console löschen, wenn Sie es nicht mehr benötigen.
Nächste Schritte
Weitere Informationen zu benutzerdefinierten Modellen finden Sie im Leitfaden für Anfänger.
Wenn Sie ein eigenes Dataset und ein benutzerdefiniertes Modell erstellen möchten, finden Sie unter Trainingsdaten vorbereiten eine Anleitung zum Vorbereiten Ihrer Daten.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],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."]]