AI/ML frameworks for cloud TPUs
Skills:
LLM Foundations80%
Key Takeaways
The video covers AI/ML frameworks for cloud TPUs, including PyTorch, JAX, Keras, and Nvidia's Triton, highlighting their differences and use cases for model training, inference, and fine-tuning.
Full Transcript
[music] If you're already working in AI [music] or learning about it, you've probably dealt with a few frameworks. PyTorch, Caris, Jax, Triton, VLLM. But what are they all for? How are they different? And when should you use one over the other? We'll break them down and look at some of the trade-offs, give them a definition, and talk about which tests they're good at. In other words, we'll do a little if this then that comparison. First, let's cover model training frameworks. We all like shortcuts, right? Think of a framework as a toolkit. A shortcut from zero to production code. You could build everything from scratch if you're some kind of super genius. Or you could lean on these tools to pre-build part of the puzzle for you. Whether that's doing complex math, data handling, or optimization. For many, the perfect starting point is Caris. Caris is an easy to use interface or API for building models. It's like a clean dashboard that sits on top of a powerful engine. You can build a powerful neural network in just a few lines of caris code. And a huge advantage today is that caris is multibackend. That means you can write your caris code once and run it using jacks or pietorrch as the underlying execution engine. That kind of flexibility is incredible for defining your models. Underneath caris or for more granular control, we have pietorch and jax. PyTorch, an open-source framework originally created by Meta, is loved by researchers for its Pythonic feel and flexibility. Jax from Google is a high performance numerical computing library, excellent for research and large-scale model development due to its speed and automatic differentiation capabilities. These are the engines that power your model definitions. It's important to remember that while Caris, PyTorch, and Jax define models, they're also fully capable of training models directly. Researchers often leverage these frameworks for their full access to parameters, allowing for highly customized and experimental training workflows, allowing them full control over the process. But now that we've trained the model, what's next? Once you've defined and trained your model, you need to put it to work for end users. making predictions or generating outputs based upon new unseen data. While training is about learning, inference is about making it quick and easy for them to apply that knowledge, often in real time and at scale, allowing for them to serve predictions and generate text for whoever is using the model. To do that, you need dedicated inference frameworks and servers. These tools allow your models to handle anywhere from 10 to 10 million requests quickly and reliably in a production environment. Let's look at some key players on the inference stage. For GPUs, Nvidia's Triton inference server is a highly performant open-source inference server. It supports models from various training frameworks like TensorFlow, PyTorch and ON&NX runtime offering features like dynamic batching and concurrent model execution for maximum efficiency. TGI from hugging face is another popular solution specifically designed for deploying LLM for fast inference providing features like continuous batching and quantitization. It works great if you're solely working with textonly models deployed through hugging faces model garden. For more than just texton models, consider vlm. VLM is a wellknown as a fast and affordable library for LLM serving using techniques like page detention to manage memory efficiently during text generation. And when it comes to scaling up your inferencing workload to handle more incoming traffic, perhaps you might want to consider LLMD. LLMD is a powerful open-source framework designed for high throughput LLM serving, offering advanced features to optimize performance and cost for large-scale deployments. While many developers focus on inference, understanding fine-tuning is fundamental. This involves taking a pre-trained model, one that has already learned from a general data set, and further training it on a smaller specific data set to adapt it for a particular task or domain. It's way more efficient than training a model from scratch. For efficient fine-tuning of large models, especially LLM, a powerful approach is parameter efficient fine-tuning or PFT. Libraries like hugging faces PFT provide methods like Laura. Low rank adaptation that allow for you to adapt massive models to a new task with less compute and less data. But keep in mind that HuggingFace only offers tools for PyTorch. So to quickly recap, when you're looking to define your models, caris stands out for its user-friendly API, offering a highle abstraction that can run on powerful engines like PyTorch and Jax. For more granular control or cutting edge research, PyTorch provides a Pythonic and flexible environment, while Jax excels in high performance numerical computing and automatic differentiation, making them ideal choices for the underlying model definition and training. For inference, which is your primary interaction, tools like Triton Inference Server offer multi-framework support and GPU acceleration for maximum efficiency. TGI is a strong contender specifically for fast LLM deployment with features like continuous batching. And VLM provides an affordable and fast solution for LM serving through techniques like page attention. And for training and fine-tuning, you'll leverage the full capabilities of TensorFlow, PyTorch, and Jax. For efficient adaptation of large models, particularly LLM's hugging faces PFT provides methods like Laura, allowing you to fine-tune with significantly less compute and data, though it currently focuses on PyTorch. Although, don't forget there's no substitute for writing the code and seeing [music] these powerful frameworks in action for yourself. To learn more, check out the link in the description below. Heat. Heat. >> [music]
Original Description
Explore the diverse landscape of AI/ML frameworks, including, PyTorch, JAX, and Keras. This video breaks down what these frameworks are, how they differ, and when to choose one over another for model training, inference, and fine tuning. We cover additional specific purpose frameworks like Nvidia's Triton Inference Server and Hugging Face's TGI and PEFT, providing insights into their strengths for building and deploying efficient AI models.
Chapters:
0:00 - Introduction to AI/ML frameworks
0:34 - Defining your models: The builders
0:57 - Keras: The user friendly API
1:30 - PyTorch and JAX: Granular control and performance
2:23 - Inference: putting models to work
3:38 - vLLM for LLM serving
4:13 - Fine tuning: The learning process
4:58 - Conclusion and recap
Resources:
Keras Overview → https://goo.gle/3JOiCCX
PyTorch Overview → https://goo.gle/3LyarLE
Get Started with JAX → https://goo.gle/3LUjlTK
Get Started with vLLM → https://goo.gle/47xuYbQ
Hugging Face PEFT Documentation → https://goo.gle/49MZyzz
NVIDIA Triton Inference Server → https://goo.gle/4qTBv8f
Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#GoogleCloud #AIFrameworks
Speakers: Duncan Campbell
Products Mentioned: AI Infrastructure, JAX, PyTorch, Keras, Cloud TPUs
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Google Cloud Tech · Google Cloud Tech · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
I’m going for it #GoogleCloudCertified
Google Cloud Tech
I had to get #GoogleCloudCertified
Google Cloud Tech
Be better overall at what you do #GoogleCloudCertified
Google Cloud Tech
Cloud Monitoring on our radar #Analysis #Uptime
Google Cloud Tech
Introduction to Generative AI Studio
Google Cloud Tech
How to use Github Actions with Google's Workload Identity Federation
Google Cloud Tech
Introduction to Responsible AI
Google Cloud Tech
Networking updates and CDMC-certified architecture
Google Cloud Tech
Create and use a Cloud Storage bucket
Google Cloud Tech
How to digitize text from documents
Google Cloud Tech
Faster analytical queries with AlloyDB
Google Cloud Tech
Next ‘23 sessions and FaaS Wave
Google Cloud Tech
Introduction to Assured Open Source Software
Google Cloud Tech
BigQuery Cost Optimization: Storage
Google Cloud Tech
BigQuery Cost Optimization: Compute
Google Cloud Tech
BigQuery Cost Optimization: Select Queries
Google Cloud Tech
Remote Field Equipment Management with Manufacturing Data Engine
Google Cloud Tech
Supercharging your applications with Cloud SQL Enterprise Plus
Google Cloud Tech
Vector Support on our radar #GenAI
Google Cloud Tech
Architecting a blockchain startup with Google Cloud
Google Cloud Tech
Kubernetes and multitasking updates!
Google Cloud Tech
GKE: Using Kubernetes Events
Google Cloud Tech
How to configure firewall rules for Cloud Composer
Google Cloud Tech
Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Google Cloud Tech
Geospatial analytics on our radar #EarthEngine #BigQuery
Google Cloud Tech
Ensuring requests are set in Kubernetes
Google Cloud Tech
Cloud Next 2023, Google research program, and more!
Google Cloud Tech
How to migrate projects between organizations with Resource Manager
Google Cloud Tech
How to run #MySQL in Google Cloud
Google Cloud Tech
#GenerativeAI for enterprises and #Next2023
Google Cloud Tech
How Google Photos scales to store 4 trillion photos and videos
Google Cloud Tech
Google Cross-Cloud Interconnect (Demo 2)
Google Cloud Tech
GKE Cost Optimization Golden Signals: Introduction
Google Cloud Tech
GKE Cost Optimization Golden Signals: Workload Rightsizing
Google Cloud Tech
GKE Load Balancing: Overview
Google Cloud Tech
GKE Load Balancing: Best Practices
Google Cloud Tech
Disaster Recovery in GKE
Google Cloud Tech
How to configure IP masquerade agent in GKE Standard clusters
Google Cloud Tech
Enable and use GKE Control plane logs
Google Cloud Tech
Compliance in Australia with Assured Workloads
Google Cloud Tech
Creating budgets and budget alerts in Google Cloud #FinOps
Google Cloud Tech
Cloud SQL Enterprise Plus on our radar #mySQL
Google Cloud Tech
What's Next for Google Cloud?
Google Cloud Tech
How Loveholidays scaled with Contact Center AI
Google Cloud Tech
What is fleet team management in GKE?
Google Cloud Tech
Troubleshoot VPC Network Peering
Google Cloud Tech
Introduction to DocAI and Contact Center AI
Google Cloud Tech
Cloud Run Direct VPC egress explained
Google Cloud Tech
Database deployment options in GKE
Google Cloud Tech
Analyze cloud billing data with #BigQuery
Google Cloud Tech
Tips to becoming a world-class Prompt Engineer
Google Cloud Tech
Serverless is simple. Do I need CI/CD?
Google Cloud Tech
Accelerating model deployment with MLOps
Google Cloud Tech
How Hawaii's Department of Human Services scaled with CCAI
Google Cloud Tech
Pricing API on our #Radar
Google Cloud Tech
How Recommendations AI for Media can boost customer retention
Google Cloud Tech
Troubleshooting: Node Not Ready Status
Google Cloud Tech
One weekend until Cloud Next 2023!
Google Cloud Tech
#GoogleCloudNext starts tomorrow!
Google Cloud Tech
#GoogleCloudNext will be demand!
Google Cloud Tech
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
Help Choosing Neural Network Architecture for Matrix Classification
Reddit r/deeplearning
How to Choose the Best Deep Learning Model for Medical Imaging
Medium · Deep Learning
Another Way to Read Neural Geometry
Medium · Data Science
Another Way to Read Neural Geometry
Medium · Deep Learning
Chapters (8)
Introduction to AI/ML frameworks
0:34
Defining your models: The builders
0:57
Keras: The user friendly API
1:30
PyTorch and JAX: Granular control and performance
2:23
Inference: putting models to work
3:38
vLLM for LLM serving
4:13
Fine tuning: The learning process
4:58
Conclusion and recap
🎓
Tutor Explanation
DeepCamp AI