llmops-duke-aipi

LLMOps Syllabus

Large Language Model Operations (LLMOps) course

Course Description

In this course, you will learn about the methodologies involved in operationalizing Large Language Models. By the end of the course, you will be able to develop applications that use software development best practices with large language models.

Faculty

Table of Contents
* [Prerequisites](#prerequisites) * [Week 1: Introduction to Generative AI Concepts](#week-1-introduction-to-generative-ai-concepts) * [Week 2: Setup Development Environment](#week-2-setup-development-environment) * [Week 3: Interacting with Large Language Models](#week-3-interacting-with-large-language-models) * [Week 4: Using Local Large Language Models](#week-4-using-local-large-language-models) * [Week 5: Applied Solutions with LLMs](#week-5-applied-solutions-with-llms) * [Week 6: Extensibility Using Plugins and Functions](#week-6-extensibility-using-plugins-and-functions) * [Week 7: Using Retrieval Augmented Generation](#week-7-using-retrieval-augmented-generation) * [Week 8: Introduction to Python Web Frameworks for APIs](#week-8-introduction-to-python-web-frameworks-for-apis) * [Week 9: DevOps Principles](#week-9-devops-principles) * [Week 10: Deploying Machine Learning APIs](#week-10-deploying-machine-learning-apis) * [Week 11: LLM Platforms](#week-11-llm-platforms) * [Week 12: Final Presentations](#week-12-final-presentations)

Course Objectives

By the end of the course, you will be able to:

[!NOTE] Diversity Statement: As educators and learners, we must share a commitment to diversity and equity, removing barriers to education so that everyone may participate fully in the community. In this course, we respect and embrace the unique experiences that brought each person here, including backgrounds, identities, learning styles, ways of expression, and academic interests. The broad spectrum of perspectives represented by our students enrich everyone’s experiences, and we strive to meet each perspective with openness and respect.

Prerequisites

This course requires basic Linux and programming skills. You can complete all coursework with either Python or Rust. Use the following recommendations to get up to speed on these skills.

Linux If students lack basic Linux skills it is recommended to take this course: Duke+Coursera: Python, Bash and SQL Essentials for Data Engineering Specialization

[!IMPORTANT] You don’t need both programming languages for this course, you can pick either or.

Python

These two modules from the Introduction to Python course covers the basics of Python:

Rust

This course on Rust Fundamentals covers the basics of the Rust Programming Language.

Additional Resources

Although this course is based on the Large Language Model Operations (LLMOPs) specialization, you can use these additional resources as supporting material:

Courses:

Books:

12 week Syllabus

These are all the resources you need for this course.

[!IMPORTANT] You are not required to watch and read every single resource. You aren’t graded on consumption of content or memorization of facts. Use the content as support for your project.

Week 0 (Optional): Refresh Python or Rust Skills

Rust:

Python:

Week 1: Introduction to Generative AI concepts

Weekly Demo video prompt: Discuss your plan and idea to build out your individual project and how you will do them on time. Use the Public Speaking guidelines to make sure you are delivering great demos.

Week 2: Setup Development Environment

Python:

Rust:

Weekly Demo video prompt: Describe your programming language choice and what are some of the advantages and potential pitfalls.

Week 3: Interacting with Large Language Models

Weekly Demo video prompt: Explain what are some challenges for your application when working with Large Language Model output and what you will do to mitigate them.

Week 4: Using Local Large Language Models

Weekly Demo video prompt: Describe your evaluation of the different Local Large Language and Small Language Models available with Llamafile and which one would work best for your project.

Week 5: Applied solutions with LLMs

Weekly Demo video prompt: Explain the architectural overview of your application and what are some challenges with this type of design.

Week 6: Extensibility using plugins and functions

Weekly Demo video prompt: What are some benefits of adding plugins and functions to your application idea? What would be a challenge in a production environment?

Week 7: Using Retrieval Augmented Generation

Weekly Demo video prompt: How would adding RAG to your application affect the overall experience for an end user? Why or why wouldn’t you consider using RAG in your application?

Week 8: Introduction to Python web frameworks for APIs

Weekly Demo video prompt: What are some benefits of using the framework you chose? Describe how you will make it work with your application.

Week 9: DevOps Principles

Weekly Demo video prompt: How would you apply DevOps, Responsible AI Principles, and automation for your application? What are some challenges you may face?

Week 10: Deploying Machine Learning APIs

Weekly Demo video prompt: What are some difficulties of using automation? How will using automation benefit your application?

Week 11: LLM Platforms

Weekly Demo video prompt: How would adding a cloud platform enable your application? What are some potential drawbacks in using an LLM platform?

Week 12: Final Presentations

Course Project

This class is based on a single and individual class project. You will start work on this project from Week 1 and will deliver the completed project with final presentation on Week 12.

See the rubric for more details.

[!IMPORTANT] Do not build a model yourself. Reuse a LLM or an SLM model. Use Mozilla Llamafile as a reference.

The primary two resources you will need to build an LLM solution using a local API are these:

  1. Beginning Llamafile for Local Large Language Models (LLMs)
  2. Getting Started with Open Source Ecosystem

Machine Learning References

AutoML References

Python References

Referenced Media and Resources

Optional Supplementary Readings & Media

AWS
GCP
Python

https://learning.oreilly.com/videos/python-for-data/62062021VIDEOPAIML/

Linux and Systems Engineering

Assignment Overview and Grading Breakdown

Grading and feedback turnaround will be one week from the due date. You will be notified if the turnaround will be longer than one week.

The discussion forums, written assignments, demo videos, and final project will be graded based on specific criteria or a rubric. The criteria or rubric for each type of assessment will be available in the course. To view the discussion forum rubric, click the gear icon in the upper right corner of the page and choose Show Rubric. The Written Assignment Rubric and Final Project Rubric will automatically appear on the page.

Late Work Policy

Late work will be accepted only in the event of an instructor-approved absence. Contact your instructor as soon as possible, at least 24 hours in advance.

Online Communication and Interaction Expectations

Discussion Forums

The purpose of the discussion boards is to allow students to freely exchange ideas. It is imperative to remain respectful of all viewpoints and positions and, when necessary, agree to respectfully disagree. While active and frequent participation is encouraged, cluttering a discussion board with inappropriate, irrelevant, or insignificant material will not earn additional points and may result in receiving less than full credit. Frequency matters, but contributing content that adds value is paramount. Please remember to cite all sources—when relevant—in order to avoid plagiarism. Please post your viewpoints first and then discuss others’ viewpoints.

The quality of your posts and how others view and respond to them are the most valued. A single statement mostly implying “I agree” or “I do not agree” is not counted as a post. Explain, clarify, politely ask for details, provide details, persuade, and enrich communications for a great discussion experience. Please note, there is a requirement to respond to at least two fellow class members’ posts. Also, remember to cite all sources—when relevant—in order to avoid plagiarism.

Online Communication Etiquette

Beyond interacting with your instructor and peers in discussions, you will be expected to communicate by Canvas message, email, and sync session. Your instructor may also make themselves available by phone or text. In all contexts, keep your communication professional and respect the instructor’s posted availability.

Just as you expect a response when you send a message to your instructor, please respond promptly when your instructor contacts you. Your instructor will expect a response within two business days. This will require that you log into the course site regularly and set up your notifications to inform you when the instructor posts an announcement, provides feedback on work or sends you a message.

Participation and Attendance

This course will not meet at a particular time each week. All course goals, session learning objectives, and assessments are supported through classroom elements that can be accessed at any time. To measure class participation (or attendance), your participation in threaded discussion boards is required, graded, and paramount to your success in this course. Please note that any scheduled synchronous meetings are optional. While your attendance is highly encouraged, it is not required and you will not be graded on your attendance or participation.

Course Technology

This course will involve a number of different types of interactions. These interactions will take place primarily through Microsoft Teams. Please take the time to navigate through the course and become familiar with the course syllabus, structure, and content and review the list of resources below.

Required Technical Skills

Students in an online program should be able to do the following:

Required Digital Literacy Skills

In order to be successful in an online course, students should be able to locate, evaluate, apply, create, and communicate information using technology.

Students in this online course should be able to do the following:

Associated Certifications

You may want to complement this course with the following certifications: