Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan integrasi PyTorch Vertex AI dan menyediakan referensi
yang menunjukkan cara menggunakan PyTorch di Vertex AI. Integrasi PyTorch Vertex AI
memudahkan Anda melatih, men-deploy, dan mengorkestrasi model PyTorch
dalam produksi.
Menjalankan kode di notebook
Vertex AI menyediakan dua opsi untuk menjalankan kode Anda di notebook, yaitu Colab Enterprise dan Vertex AI Workbench.
Untuk mempelajari lebih lanjut opsi ini, lihat memilih solusi notebook.
Container bawaan untuk pelatihan
Vertex AI menyediakan image container Docker bawaan untuk pelatihan model.
Container ini diatur menurut framework machine learning dan versi
framework serta menyertakan dependensi umum yang mungkin ingin Anda gunakan dalam
kode pelatihan. Untuk mempelajari versi PyTorch yang memiliki container pelatihan
siap pakai dan cara melatih model dengan container pelatihan siap pakai, lihat
Container siap pakai untuk pelatihan kustom.
Container bawaan untuk menayangkan inferensi
Vertex AI menyediakan image container Docker bawaan untuk menayangkan inferensi
batch dan online.
Container ini diatur menurut framework machine learning dan versi
framework serta menyertakan dependensi umum yang mungkin ingin Anda gunakan dalam
kode inferensi. Untuk mempelajari versi PyTorch yang memiliki container inferensi
siap pakai dan cara menayangkan model dengan container inferensi siap pakai, lihat
Container siap pakai untuk pelatihan kustom.
Pelatihan terdistribusi
Anda dapat menjalankan pelatihan terdistribusi model PyTorch di Vertex AI. Untuk
pelatihan multi-pekerja, Anda dapat menggunakan Reduction Server untuk mengoptimalkan performa
lebih baik lagi untuk operasi kolektif dengan pengurangan penuh. Untuk mempelajari
pelatihan terdistribusi di Vertex AI lebih lanjut, lihat
Pelatihan terdistribusi.
Referensi untuk menggunakan PyTorch di Vertex AI
Untuk mempelajari lebih lanjut dan mulai menggunakan PyTorch di Vertex AI, lihat referensi
berikut:
Tutorial: Menggunakan Vertex AI untuk melatih model klasifikasi
gambar PyTorch di salah satu lingkungan container bawaan Vertex AI
menggunakan konsol Google Cloud .
Untuk mengikuti panduan langkah demi langkah tugas ini langsung di
Google Cloud konsol, klik Pandu saya:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# PyTorch integration\n\n| To see an example of PyTorch integration,\n| run the \"Training, tuning and deploying a PyTorch text sentiment classification model\" notebook in one of the following\n| environments:\n|\n| [Open in Colab](https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/training/pytorch-text-sentiment-classification-custom-train-deploy.ipynb)\n|\n|\n| \\|\n|\n| [Open in Colab Enterprise](https://console.cloud.google.com/vertex-ai/colab/import/https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Ftraining%2Fpytorch-text-sentiment-classification-custom-train-deploy.ipynb)\n|\n|\n| \\|\n|\n| [Open\n| in Vertex AI Workbench](https://console.cloud.google.com/vertex-ai/workbench/deploy-notebook?download_url=https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Ftraining%2Fpytorch-text-sentiment-classification-custom-train-deploy.ipynb)\n|\n|\n| \\|\n|\n[View on GitHub](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/training/pytorch-text-sentiment-classification-custom-train-deploy.ipynb) \n\nThis page explains Vertex AI's PyTorch integration and provides resources\nthat show you how to use PyTorch on Vertex AI. Vertex AI's PyTorch\nintegration makes it easier for you to train, deploy, and orchestrate PyTorch\nmodels in production.\n\nRun code in notebooks\n---------------------\n\nVertex AI provides two options for running your code in\nnotebooks, Colab Enterprise and Vertex AI Workbench.\nTo learn more about these options, see\n[choose a notebook solution](/vertex-ai/docs/workbench/notebook-solution).\n\nPrebuilt containers for training\n--------------------------------\n\nVertex AI provides prebuilt Docker container images for model training.\nThese containers are organized by machine learning frameworks and framework\nversions and include common dependencies that you might want to use in your\ntraining code. To learn about which PyTorch versions have prebuilt training\ncontainers and how to train models with a prebuilt training container, see\n[Prebuilt containers for custom training](/vertex-ai/docs/training/pre-built-containers#pytorch).\n\nPrebuilt containers for serving inferences\n------------------------------------------\n\nVertex AI provides prebuilt Docker container images for serving both\nbatch and online inferences.\nThese containers are organized by machine learning frameworks and framework\nversions and include common dependencies that you might want to use in your\ninference code. To learn about which PyTorch versions have prebuilt inference\ncontainers and how to serve models with a prebuilt inference container, see\n[Prebuilt containers for custom training](/vertex-ai/docs/predictions/pre-built-containers).\n\nDistributed training\n--------------------\n\nYou can run distributed training of PyTorch models on Vertex AI. For\nmulti-worker training, you can use Reduction Server to optimize performance\neven further for all-reduce collective operations. To learn more about\ndistributed training on Vertex AI, see\n[Distributed training](/vertex-ai/docs/training/distributed-training).\n\nResources for using PyTorch on Vertex AI\n----------------------------------------\n\nTo learn more and start using PyTorch in Vertex AI, see the following\nresources:\n\n- [How to train and tune PyTorch models on Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-train-and-tune-pytorch-models-vertex-ai): Learn how to use [Vertex AI Training](/vertex-ai/docs/training/overview) to build and train a sentiment text classification model using PyTorch and [Vertex AI Hyperparameter Tuning](/vertex-ai/docs/training/using-hyperparameter-tuning) to tune hyperparameters of PyTorch models.\n- [How to deploy PyTorch models on Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-deploy-pytorch-models-vertex-ai): Walk through the deployment of a Pytorch model using [TorchServe](https://pytorch.org/serve/) as a custom container, by deploying the model artifacts to a [Vertex AI Inference](/vertex-ai/docs/predictions/overview) service.\n- [Orchestrating PyTorch ML Workflows on Vertex AI Pipelines](https://cloud.google.com/blog/topics/developers-practitioners/orchestrating-pytorch-ml-workflows-vertex-ai-pipelines): See how to build and orchestrate ML pipelines for training and deploying PyTorch models on Google Cloud Vertex AI using [Vertex AI Pipelines](/vertex-ai/docs/pipelines/introduction).\n- [Scalable ML Workflows using PyTorch on Kubeflow Pipelines and Vertex Pipelines](https://cloud.google.com/blog/topics/developers-practitioners/scalable-ml-workflows-using-pytorch-kubeflow-pipelines-and-vertex-pipelines): Take a look at examples of [PyTorch](https://pytorch.org/)-based ML workflows on OSS [Kubeflow Pipelines](https://www.kubeflow.org/docs/components/pipelines/), (part of the Kubeflow project) and [Vertex AI Pipelines](/vertex-ai/docs/pipelines). We share [new PyTorch built-in components](https://github.com/kubeflow/pipelines/tree/master/components/PyTorch/pytorch-kfp-components) added to the Kubeflow Pipelines.\n- [Serving PyTorch image models with prebuilt containers on\n Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/prediction/pytorch_image_classification_with_prebuilt_serving_containers.ipynb): This notebook deploys a PyTorch image classification model on Vertex AI using prebuilt PyTorch serving images.\n\nWhat's next\n-----------\n\n- Tutorial: Use Vertex AI to train a PyTorch image classification model in one of Vertex AI's prebuilt container environments by using the Google Cloud console.\n\n *** ** * ** ***\n\n To follow step-by-step guidance for this task directly in the\n Google Cloud console, click **Guide me**:\n\n [Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=vertex-pytorch-custom-training)\n\n *** ** * ** ***"]]