Try Skill Builder

Try Skill Builder

Have a friendly voice chat about how you're using AI, get feedback on your skills, and find out what to learn or build next.
Take Me There

Quick Guide & Tips

💻   Accessing Utils File and Helper Functions

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Open"

You will be able to see all the notebook files for the lesson, including any helper functions used in the notebook on the left sidebar. See the following image for the steps above.


🔄   Reset User Workspace

If you need to reset your workspace to its original state, follow these quick steps:

1:   Access the Menu: Look for the three-dot menu (⋮) in the top-right corner of the notebook toolbar.

2:   Restore Original Version: Click on "Restore Original Version" from the dropdown menu.

For more detailed instructions, please visit our Reset Workspace Guide.


💻   Downloading Notebooks

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Download as"

3:   Then, click on "Notebook (.ipynb)"


💻   Uploading Your Files

After following the steps shown in the previous section ("File" => "Open"), then click on "Upload" button to upload your files.


📗   See Your Progress

Once you enroll in this course—or any other short course on the DeepLearning.AI platform—and open it, you can click on 'My Learning' at the top right corner of the desktop view. There, you will be able to see all the short courses you have enrolled in and your progress in each one.

Additionally, your progress in each short course is displayed at the bottom-left corner of the learning page for each course (desktop view).


📱   Features to Use

🎞   Adjust Video Speed: Click on the gear icon (⚙) on the video and then from the Speed option, choose your desired video speed.

🗣   Captions (English and Spanish): Click on the gear icon (⚙) on the video and then from the Captions option, choose to see the captions either in English or Spanish.

🔅   Video Quality: If you do not have access to high-speed internet, click on the gear icon (⚙) on the video and then from Quality, choose the quality that works the best for your Internet speed.

🖥   Picture in Picture (PiP): This feature allows you to continue watching the video when you switch to another browser tab or window. Click on the small rectangle shape on the video to go to PiP mode.

√   Hide and Unhide Lesson Navigation Menu: If you do not have a large screen, you may click on the small hamburger icon beside the title of the course to hide the left-side navigation menu. You can then unhide it by clicking on the same icon again.


🧑   Efficient Learning Tips

The following tips can help you have an efficient learning experience with this short course and other courses.

🧑   Create a Dedicated Study Space: Establish a quiet, organized workspace free from distractions. A dedicated learning environment can significantly improve concentration and overall learning efficiency.

📅   Develop a Consistent Learning Schedule: Consistency is key to learning. Set out specific times in your day for study and make it a routine. Consistent study times help build a habit and improve information retention.

Tip: Set a recurring event and reminder in your calendar, with clear action items, to get regular notifications about your study plans and goals.

☕   Take Regular Breaks: Include short breaks in your study sessions. The Pomodoro Technique, which involves studying for 25 minutes followed by a 5-minute break, can be particularly effective.

💬   Engage with the Community: Participate in forums, discussions, and group activities. Engaging with peers can provide additional insights, create a sense of community, and make learning more enjoyable.

✍   Practice Active Learning: Don't just read or run notebooks or watch the material. Engage actively by taking notes, summarizing what you learn, teaching the concept to someone else, or applying the knowledge in your practical projects.


📚   Enroll in Other Short Courses

Keep learning by enrolling in other short courses. We add new short courses regularly. Visit DeepLearning.AI Short Courses page to see our latest courses and begin learning new topics. 👇

👉👉 🔗 DeepLearning.AI – All Short Courses [+]


🙂   Let Us Know What You Think

Your feedback helps us know what you liked and didn't like about the course. We read all your feedback and use them to improve this course and future courses. Please submit your feedback by clicking on "Course Feedback" option at the bottom of the lessons list menu (desktop view).

Also, you are more than welcome to join our community 👉👉 🔗 DeepLearning.AI Forum


Sign in

Or, sign in with your email
Email
Password
Forgot password?
Don't have an account? Create account
By signing up, you agree to our Terms Of Use and Privacy Policy

Create Your Account

Or, sign up with your email
Email Address

Already have an account? Sign in here!

By signing up, you agree to our Terms Of Use and Privacy Policy

Choose Your Plan

Planning for more users?
MonthlyYearly

Change Your Plan

Your subscription plan will change at the end of your current billing period. You'll continue to have access to your current plan until then.

Learn More

Welcome back!

Hi ,

We'd like to know you better so we can create more relevant courses. What do you do for work?

Join Team Success

You have successfully joined undefined

You now have access to all Pro features. Click below to start learning!

Session Expired

Session expired — please return to Cornerstone to restart the session and complete the course.

DeepLearning.AI
  • Explore Courses
  • Membership
  • Community
    • Forum
    • Events
    • Ambassadors
    • Ambassador Spotlight
  • Elevate Your Career with Full Learning Experience

    Unlock Plus AI learning and gain exclusive insights from industry leaders

    Access exclusive features like graded notebooks and quizzes
    Earn unlimited certificates to enhance your resume
    Starting at $1 USD/mo after a free trial – cancel anytime
Welcome to this course on efficient inference with SGLang, where you learn about both text and image generation. This course is built in partnership with LMSys and RadixArk. LLM inference is one of the most expensive parts of running AI applications. It generates text one token at a time, and each new token depends on everything that came before it. So, if we were to use a naive implementation, then for every token the model generates, it has to reload all that prior context from memory. SGLang is an open-source inference engine to solve that memory bottleneck by caching and reusing computation that the model has already done. Our instructor for this course, Richard Chen, is a member of technical staff at RadixArk, where he's focused on making AI infrastructure open and accessible to everyone. Thanks, Andrew. The memory bottleneck you mentioned is exactly what we are addressing in this course. The first major optimization you will apply is the KV cache. Instead of recomputing all previous context for every new token, you store and reuse those intermediate values. This alone can give you a significant speed up. SGLang takes that further with RadixAttention, a method that extends caching across requests using a data structure called a radix tree. that identifies shared prefixes, so repeated context is only processed once. When multiple users share the same system prompts, or when a RAG application sends the same document as a context with different questions, RadixAttention recognizes the shared prefix and skips the redundant computation. This speed up grows quickly, especially when there's a lot of shared context across different requests. Exactly. And SGLang doesn't just work on text. It also accelerates image generation using similar caching strategies and multi-GPU parallelism. In this course, you will focus on three things. First, you will learn how LLM inference works under the hood to process text token by token. and how the KV cache stores intermediate computations for reuse. Next, you will see how SGLang's RadixAttention extends that caching across users and requests, and how to implement and measure those speedups yourself. And then, you'll apply similar techniques to diffusion models for faster image generation. Each lesson also includes hands-on practice so you can implement and measure these speed-ups yourself. Many people have worked to create this course. From RadixArk, I'd like to thank Liangsheng Yin, Mick Qian, Banghua Zhu, and Ying Sheng. And from DeepLearning.AI, Summer Rae also contributed to this course. In lesson one, we will walk through how a model processes a single request. from input token to the final generated response. By the end, you will understand exactly why inference gets expensive and you will be ready to dive into optimization that makes large scale LLM serving viable. Yep, that sounds wonderful. Let's head to the next video and get started.
course detail
Next Lesson
Efficient Inference with SGLang: Text and Image Generation
  • Introduction
    Video
    ・
    3 mins
  • Overview of Inference
    Video
    ・
    10 mins
  • LLM Inference Fundamentals
    Video with Code Example
    ・
    11 mins
  • Advanced LLM Inference Optimization
    Video with Code Example
    ・
    18 mins
  • SGLang Diffusion
    Video with Code Example
    ・
    19 mins
  • The future of inference– where do we go from here?
    Video
    ・
    6 mins
  • Conclusion
    Video
    ・
    1 min
  • Quiz

    Graded・Quiz

    ・
    10 mins
  • Accomplishment
    Course Info