{"id":53520,"date":"2025-07-21T16:45:11","date_gmt":"2025-07-21T06:45:11","guid":{"rendered":"https:\/\/www.cloudproinc.com.au\/?p=53520"},"modified":"2025-07-21T16:49:55","modified_gmt":"2025-07-21T06:49:55","slug":"running-pytorch-in-microsoft-azure-machine-learning","status":"publish","type":"post","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/","title":{"rendered":"Running PyTorch in Microsoft Azure Machine Learning"},"content":{"rendered":"\n<p> This post will walk you through what PyTorch is, how it&#8217;s used in ML and LLM development, and how you can start running it in Azure ML using Jupyter notebooks.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>If you&#8217;re working on deep learning, computer vision, or building large language models (LLMs), you&#8217;ve probably come across PyTorch. But did you know you can easily run PyTorch on Microsoft&#8217;s Azure Machine Learning (Azure ML) platform?<\/p>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-what-is-pytorch\" data-level=\"2\">What is PyTorch?<\/a><\/li><li><a href=\"#h-why-use-pytorch-for-machine-learning-and-llms\" data-level=\"2\">Why Use PyTorch for Machine Learning and LLMs?<\/a><\/li><li><a href=\"#h-prerequisites-for-using-pytorch-in-azure-ml\" data-level=\"2\">Prerequisites for Using PyTorch in Azure ML<\/a><\/li><li><a href=\"#h-setup-azure-ml\" data-level=\"2\">Setup Azure ML<\/a><\/li><li><a href=\"#h-using-pytorch-in-azure-ml-jupyter-notebooks\" data-level=\"2\">Using PyTorch in Azure ML Jupyter Notebooks<\/a><\/li><li><a href=\"#h-conclusion\" data-level=\"2\">Conclusion<\/a><\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-pytorch\">What is PyTorch?<\/h2>\n\n\n\n<p>PyTorch is an open-source deep learning framework developed by Meta AI (formerly Facebook AI Research). It&#8217;s known for its dynamic computation graph, ease of use, and strong community support. PyTorch enables researchers and developers to build and train neural networks with flexibility and speed, making it a top choice for academic research and production-grade AI solutions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-use-pytorch-for-machine-learning-and-llms\">Why Use PyTorch for Machine Learning and LLMs?<\/h2>\n\n\n\n<p>PyTorch is widely adopted in both academia and industry for a range of machine learning tasks including image classification, natural language processing, and reinforcement learning. It&#8217;s also one of the foundational frameworks used in training large language models (LLMs) such as GPT and BERT variants. Thanks to its Pythonic design, PyTorch allows developers to iterate quickly and debug more easily, which is essential when fine-tuning or experimenting with complex models.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" data-src=\"\/wp-content\/uploads\/2025\/07\/image-17-1024x683.png\" alt=\"\" class=\"wp-image-53525 lazyload\" data-srcset=\"\/wp-content\/uploads\/2025\/07\/image-17-1024x683.png 1024w, \/wp-content\/uploads\/2025\/07\/image-17-300x200.png 300w, \/wp-content\/uploads\/2025\/07\/image-17-768x512.png 768w, \/wp-content\/uploads\/2025\/07\/image-17-1080x720.png 1080w, \/wp-content\/uploads\/2025\/07\/image-17-1280x853.png 1280w, \/wp-content\/uploads\/2025\/07\/image-17-980x653.png 980w, \/wp-content\/uploads\/2025\/07\/image-17-480x320.png 480w, \/wp-content\/uploads\/2025\/07\/image-17.png 1536w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/683;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites-for-using-pytorch-in-azure-ml\">Prerequisites for Using PyTorch in Azure ML<\/h2>\n\n\n\n<p>To get started, you need the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An Azure subscription<\/li>\n\n\n\n<li>An Azure Machine Learning workspace<\/li>\n\n\n\n<li>Basic knowledge of Python and Jupyter notebooks<\/li>\n<\/ul>\n\n\n\n<p>Azure ML supports PyTorch out-of-the-box, and you can use curated environments or create your own with the desired PyTorch version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setup-azure-ml\">Setup Azure ML <\/h2>\n\n\n\n<p>To run PyTorch, create an Azure Machine Learning workspace and open it using ML Studio. Before running any code, we need to add compute resources to the workspace. To add a compute resource (available under Manage)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"221\" height=\"221\" data-src=\"\/wp-content\/uploads\/2025\/07\/image-14.png\" alt=\"\" class=\"wp-image-53521 lazyload\" data-srcset=\"\/wp-content\/uploads\/2025\/07\/image-14.png 221w, \/wp-content\/uploads\/2025\/07\/image-14-150x150.png 150w\" data-sizes=\"(max-width: 221px) 100vw, 221px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 221px; --smush-placeholder-aspect-ratio: 221\/221;\" \/><\/figure>\n\n\n\n<p>Click on add to add a resource and select GPU machine type. In our case, we are using Nvidia Tesla T4 GPU. Note that you might need to submit a request for a quota increase to access GPU-based compute for your subscription.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"941\" height=\"236\" data-src=\"\/wp-content\/uploads\/2025\/07\/image-15.png\" alt=\"\" class=\"wp-image-53522 lazyload\" data-srcset=\"\/wp-content\/uploads\/2025\/07\/image-15.png 941w, \/wp-content\/uploads\/2025\/07\/image-15-300x75.png 300w, \/wp-content\/uploads\/2025\/07\/image-15-768x193.png 768w, \/wp-content\/uploads\/2025\/07\/image-15-480x120.png 480w\" data-sizes=\"(max-width: 941px) 100vw, 941px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 941px; --smush-placeholder-aspect-ratio: 941\/236;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-using-pytorch-in-azure-ml-jupyter-notebooks\">Using PyTorch in Azure ML Jupyter Notebooks<\/h2>\n\n\n\n<p>Azure ML provides hosted Jupyter notebooks where you can run and manage your ML experiments. Once your workspace is ready, you can start a compute instance and open a notebook to write and run PyTorch code. You can select the PyTorch image from the Kernel list menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"280\" height=\"237\" data-src=\"\/wp-content\/uploads\/2025\/07\/image-16.png\" alt=\"\" class=\"wp-image-53523 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 280px; --smush-placeholder-aspect-ratio: 280\/237;\" \/><\/figure>\n\n\n\n<p>Here&#8217;s a simple example of training a basic neural network using PyTorch in Azure ML:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6274d3a86bba411b6e58ac1c8f8d4237\"><code>import torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader, TensorDataset\n\n# Check version, and GPU mode\ntorch.cuda.is_available()\nprint(torch.__version__)\n\n# Sample dataset\ndata_x = torch.randn(100, 10)\ndata_y = torch.randint(0, 2, (100,))\ndataset = TensorDataset(data_x, data_y)\ndataloader = DataLoader(dataset, batch_size=10, shuffle=True)\n\n# Simple neural network\nclass SimpleNN(nn.Module):\n    def __init__(self):\n        super(SimpleNN, self).__init__()\n        self.fc = nn.Linear(10, 2)\n\n    def forward(self, x):\n        return self.fc(x)\n\nmodel = SimpleNN()\ncriterion = nn.CrossEntropyLoss()\noptimizer = optim.Adam(model.parameters(), lr=0.01)\n\n# Training loop\nfor epoch in range(5):\n    for batch_x, batch_y in dataloader:\n        optimizer.zero_grad()\n        outputs = model(batch_x)\n        loss = criterion(outputs, batch_y)\n        loss.backward()\n        optimizer.step()\n    print(f\"Epoch {epoch+1}, Loss: {loss.item():.4f}\")\n<\/code><\/pre>\n\n\n\n<p>This code can be run directly in a notebook inside your Azure ML workspace using a compute instance with a PyTorch-enabled environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>PyTorch&#8217;s flexibility and developer-friendly interface make it a strong choice for machine learning and LLM tasks. Running it in Azure Machine Learning combines PyTorch&#8217;s power with Azure&#8217;s scalable and secure infrastructure. Whether you&#8217;re training a simple neural network or fine-tuning a massive transformer model, Azure ML offers a seamless platform to accelerate your PyTorch development.<\/p>\n\n\n\n<ul class=\"wp-block-yoast-seo-related-links yoast-seo-related-links\">\n<li><a href=\"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2024\/09\/06\/how-to-create-an-azure-ai-language-account-using-rest-api\/\">How to Create an Azure AI Language Account Using REST API<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/03\/28\/simplifying-windows-10-integration-with-microsoft-intune-using-a-deep-link\/\">Simplifying Windows 10 Integration with Microsoft Intune Using a Deep Link<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/09\/10\/simplifying-azure-management-with-github-copilot-for-azure\/\">Simplifying Azure Management with GitHub Copilot for Azure<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2025\/06\/30\/run-azure-powershell-cmdlets-using-docker-containers\/\">Run Azure PowerShell cmdlets using Docker Containers<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/07\/increase-phpmyadmin-upload-size-limit-on-azure-web-app\/\">Increase PHPMyAdmin Upload Size Limit on Azure Web App<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This post will walk you through what PyTorch is, how it&#8217;s used in ML and LLM development, and how you can start running it in Azure ML using Jupyter notebooks.<\/p>\n","protected":false},"author":1,"featured_media":53376,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Running PyTorch in Microsoft Azure Machine Learning","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.","_yoast_wpseo_opengraph-title":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_twitter-title":"","_yoast_wpseo_twitter-description":"","_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[24,13,74,75],"tags":[],"class_list":["post-53520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-blog","category-machine-learning","category-pytorch"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Running PyTorch in Microsoft Azure Machine Learning - CPI Consulting<\/title>\n<meta name=\"description\" content=\"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Running PyTorch in Microsoft Azure Machine Learning\" \/>\n<meta property=\"og:description\" content=\"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"CPI Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-21T06:45:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-21T06:49:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudproinc.azurewebsites.net\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo-1024x683.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CPI Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CPI Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/\"},\"author\":{\"name\":\"CPI Staff\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\"},\"headline\":\"Running PyTorch in Microsoft Azure Machine Learning\",\"datePublished\":\"2025-07-21T06:45:11+00:00\",\"dateModified\":\"2025-07-21T06:49:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/\"},\"wordCount\":575,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Add-bootstrap-logo.png\",\"articleSection\":[\"AI\",\"Blog\",\"Machine Learning\",\"PyTorch\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#respond\"]}],\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/\",\"name\":\"Running PyTorch in Microsoft Azure Machine Learning - CPI Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Add-bootstrap-logo.png\",\"datePublished\":\"2025-07-21T06:45:11+00:00\",\"dateModified\":\"2025-07-21T06:49:55+00:00\",\"description\":\"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#primaryimage\",\"url\":\"\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Add-bootstrap-logo.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Add-bootstrap-logo.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/07\\\/21\\\/running-pytorch-in-microsoft-azure-machine-learning\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cloudproinc.com.au\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Running PyTorch in Microsoft Azure Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"name\":\"Cloud Pro Inc - CPI Consulting Pty Ltd\",\"description\":\"Cloud, AI &amp; Cybersecurity Consulting | Melbourne\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cloudproinc.com.au\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\",\"name\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"width\":500,\"height\":500,\"caption\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\",\"name\":\"CPI Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"caption\":\"CPI Staff\"},\"sameAs\":[\"http:\\\/\\\/www.cloudproinc.com.au\"],\"url\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/index.php\\\/author\\\/cpiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Running PyTorch in Microsoft Azure Machine Learning - CPI Consulting","description":"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"Running PyTorch in Microsoft Azure Machine Learning","og_description":"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.","og_url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/","og_site_name":"CPI Consulting","article_published_time":"2025-07-21T06:45:11+00:00","article_modified_time":"2025-07-21T06:49:55+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/cloudproinc.azurewebsites.net\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo-1024x683.png","type":"image\/png"}],"author":"CPI Staff","twitter_card":"summary_large_image","twitter_misc":{"Written by":"CPI Staff","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#article","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/"},"author":{"name":"CPI Staff","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e"},"headline":"Running PyTorch in Microsoft Azure Machine Learning","datePublished":"2025-07-21T06:45:11+00:00","dateModified":"2025-07-21T06:49:55+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/"},"wordCount":575,"commentCount":0,"publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo.png","articleSection":["AI","Blog","Machine Learning","PyTorch"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#respond"]}],"accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/","url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/","name":"Running PyTorch in Microsoft Azure Machine Learning - CPI Consulting","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo.png","datePublished":"2025-07-21T06:45:11+00:00","dateModified":"2025-07-21T06:49:55+00:00","description":"Learn how to run PyTorch in Microsoft Azure Machine Learning for deep learning and large language model development.","breadcrumb":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#primaryimage","url":"\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo.png","contentUrl":"\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/21\/running-pytorch-in-microsoft-azure-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cloudproinc.com.au\/"},{"@type":"ListItem","position":2,"name":"Running PyTorch in Microsoft Azure Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/cloudproinc.com.au\/#website","url":"https:\/\/cloudproinc.com.au\/","name":"Cloud Pro Inc - CPI Consulting Pty Ltd","description":"Cloud, AI &amp; Cybersecurity Consulting | Melbourne","publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudproinc.com.au\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudproinc.com.au\/#organization","name":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd","url":"https:\/\/cloudproinc.com.au\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/","url":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","contentUrl":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","width":500,"height":500,"caption":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd"},"image":{"@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e","name":"CPI Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","caption":"CPI Staff"},"sameAs":["http:\/\/www.cloudproinc.com.au"],"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/author\/cpiadmin\/"}]}},"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/05\/Add-bootstrap-logo.png","jetpack-related-posts":[{"id":53547,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/07\/26\/understanding-the-softmax-function-in-ai\/","url_meta":{"origin":53520,"position":0},"title":"Understanding the Softmax Function in AI","author":"CPI Staff","date":"July 26, 2025","format":false,"excerpt":"The softmax function is a cornerstone of machine learning, especially in tasks involving classification. It transforms raw prediction scores (logits) into probabilities, making them easy to interpret and use for decision-making. This blog post will dive deep into what the softmax function is, why it\u2019s important, and how to effectively\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/07\/create-a-featured-image-for-a-blog-post-about-the.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/07\/create-a-featured-image-for-a-blog-post-about-the.png 1x, \/wp-content\/uploads\/2025\/07\/create-a-featured-image-for-a-blog-post-about-the.png 1.5x, \/wp-content\/uploads\/2025\/07\/create-a-featured-image-for-a-blog-post-about-the.png 2x"},"classes":[]},{"id":53865,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/09\/15\/loading-and-saving-pytorch-weights\/","url_meta":{"origin":53520,"position":1},"title":"Loading and Saving PyTorch Weights","author":"CPI Staff","date":"September 15, 2025","format":false,"excerpt":"Learn practical, safe patterns for saving, loading, and resuming PyTorch models. We cover state_dicts, checkpoints, device mapping, distributed training, and common pitfalls.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png 1x, \/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png 1.5x, \/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png 2x, \/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png 3x, \/wp-content\/uploads\/2025\/09\/best-practices-for-loading-and-saving-pytorch-weights-in-production.png 4x"},"classes":[]},{"id":53573,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/08\/06\/how-to-code-and-build-a-gpt-large-language-model\/","url_meta":{"origin":53520,"position":2},"title":"How to Code and Build a GPT Large Language Model","author":"CPI Staff","date":"August 6, 2025","format":false,"excerpt":"In this blog post, you\u2019ll learn how to code and build a GPT LLM from scratch or fine-tune an existing one. We\u2019ll cover the architecture, key tools, libraries, frameworks, and essential resources to get you started fast. Table of contentsUnderstanding GPT LLM ArchitectureModel Architecture DiagramTools and Libraries to Build a\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/CreateLLM.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/CreateLLM.png 1x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 1.5x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 2x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 3x, \/wp-content\/uploads\/2025\/08\/CreateLLM.png 4x"},"classes":[]},{"id":53539,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/07\/25\/understanding-transformers-the-architecture-driving-ai-innovation\/","url_meta":{"origin":53520,"position":3},"title":"Understanding Transformers: The Architecture Driving AI Innovation","author":"CPI Staff","date":"July 25, 2025","format":false,"excerpt":"In this blog post titled \"Understanding Transformers: The Architecture Driving AI Innovation,\" we'll delve into what Transformer architecture is, how it works, the essential tools we use to build transformer-based models, some technical insights, and practical examples to illustrate its impact and utility. The Transformer architecture has revolutionized the field\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/07\/create-a-highly-detailed-high-resolution-image-depicting-the-transformer-architecture.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/07\/create-a-highly-detailed-high-resolution-image-depicting-the-transformer-architecture.png 1x, \/wp-content\/uploads\/2025\/07\/create-a-highly-detailed-high-resolution-image-depicting-the-transformer-architecture.png 1.5x, \/wp-content\/uploads\/2025\/07\/create-a-highly-detailed-high-resolution-image-depicting-the-transformer-architecture.png 2x"},"classes":[]},{"id":53721,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/08\/27\/what-are-tensors-in-ai-and-large-language-models-llms\/","url_meta":{"origin":53520,"position":4},"title":"What Are Tensors in AI and Large Language Models (LLMs)?","author":"CPI Staff","date":"August 27, 2025","format":false,"excerpt":"In this post \"What Are Tensors in AI and Large Language Models (LLMs)?\", we\u2019ll explore what tensors are, how they are used in AI and LLMs, and why they matter for organizations looking to leverage machine learning effectively. Artificial Intelligence (AI) and Large Language Models (LLMs) like GPT-4 or LLaMA\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png 1x, \/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png 1.5x, \/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png 2x, \/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png 3x, \/wp-content\/uploads\/2025\/08\/what-are-tensors-in-ai-and-large-language-models-llms.png 4x"},"classes":[]},{"id":53594,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/08\/11\/llm-self-attention-mechanism-explained\/","url_meta":{"origin":53520,"position":5},"title":"LLM Self-Attention Mechanism Explained","author":"CPI Staff","date":"August 11, 2025","format":false,"excerpt":"In this post, \"LLM Self-Attention Mechanism Explained\"we\u2019ll break down how self-attention works, why it\u2019s important, and how to implement it with code examples. Self-attention is one of the core components powering Large Language Models (LLMs) like GPT, BERT, and Transformer-based architectures. It allows a model to dynamically focus on different\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png 1x, \/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png 1.5x, \/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png 2x, \/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png 3x, \/wp-content\/uploads\/2025\/08\/ChatGPT-Image-Aug-11-2025-08_28_04-PM.png 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/53520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=53520"}],"version-history":[{"count":2,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/53520\/revisions"}],"predecessor-version":[{"id":53527,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/53520\/revisions\/53527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media\/53376"}],"wp:attachment":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=53520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=53520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=53520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}