TensorFlow 2.Zero on Azure: High quality-tuning BERT for query tagging

This submit is co-authored by Abe Omorogbe, Program Supervisor, Azure Machine Studying, and John Wu, Program Supervisor, Azure Machine Studying

Congratulations to the TensorFlow neighborhood on the launch of TensorFlow 2.0! On this weblog, we intention to spotlight among the ways in which Azure can streamline the constructing, coaching, and deployment of your TensorFlow mannequin. Along with studying this weblog, try the demo mentioned in additional element under, exhibiting how you need to use TensorFlow 2.Zero in Azure to fine-tune a BERT (Bidirectional Encoder Representations from Transformers) mannequin for robotically tagging questions.

TensorFlow 1.x is a robust framework that allows practitioners to construct and run deep studying fashions at huge scale. TensorFlow 2.Zero builds on the capabilities of TensorFlow 1.x by integrating extra tightly with Keras (a library for constructing neural networks), enabling keen mode by default, and implementing a streamlined API floor.

TensorFlow 2.Zero on Azure

We have built-in Tensorflow 2.Zero with the Azure Machine Studying service to make bringing your TensorFlow workloads into Azure as seamless as doable. Azure Machine Studying service offers an SDK that permits you to write machine studying fashions in your most well-liked framework and run them on the compute goal of your alternative, together with a single digital machine (VM) in Azure, a GPU (graphics processing unit) cluster in Azure, or your native machine. The Azure Machine Studying SDK for Python has a devoted TensorFlow estimator that makes it straightforward to run TensorFlow coaching scripts on any compute goal you select.

As well as, the Azure Machine Studying service Pocket book VM comes with TensorFlow 2.Zero pre-installed, making it straightforward to run Jupyter notebooks that use TensorFlow 2.0.

TensorFlow 2.Zero on Azure demo: Automated labeling of questions with TF 2.0, Azure, and BERT

As we’ve talked about, TensorFlow 2.Zero makes it straightforward to get began constructing deep studying fashions. Utilizing TensorFlow 2.Zero on Azure makes it straightforward to get the efficiency advantages of Microsoft’s international, enterprise-grade cloud for no matter your utility could also be.

To spotlight the end-to-end use of TensorFlow 2.Zero in Azure, we ready a workshop that can be delivered at TensorFlow World, on utilizing TensorFlow 2.Zero to coach a BERT mannequin to counsel tags for questions which can be requested on-line. Take a look at the complete GitHub repository, or undergo the higher-level overview under.

Demo Aim

Consistent with Microsoft’s emphasis on buyer obsession, Azure engineering groups attempt to assist reply consumer questions on on-line boards. Azure groups can solely reply questions if we all know that they exist, and one of many methods we’re alerted to new questions is by waiting for user-applied tags. Customers may not all the time know the most effective tag to use to a given query, so it might be useful to have an AI agent to robotically counsel good tags for brand spanking new questions.

We intention to coach an AI agent to robotically tag new Azure-related questions.


First, try the coaching pocket book. After getting ready our knowledge in Azure Databricks, we prepare a Keras mannequin on an Azure GPU cluster utilizing the Azure Machine Studying service TensorFlow Estimator class. Discover how straightforward it’s to combine Keras, TensorFlow, and Azure’s compute infrastructure. We will simply monitor the progress of coaching with the run object.


Subsequent, open up the inferencing pocket book. Azure makes it easy to deploy your educated TensorFlow 2.Zero mannequin as a REST endpoint with a view to get tags related to new questions.

Machine Studying Operations

Subsequent, open up the Machine Studying Operations directions. If we intend to make use of the mannequin in a manufacturing setting, we are able to convey extra robustness to the pipeline with ML Ops, an providing by Microsoft that brings a DevOps mindset to machine studying, enabling a number of knowledge scientists to work on the identical mannequin whereas guaranteeing that solely fashions that meet sure standards can be put into manufacturing.

Subsequent steps

TensorFlow 2.Zero opens up thrilling new horizons for practitioners of deep studying, each previous and new. If you need to get began, try the next assets:

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button