0% found this document useful (0 votes)
36 views70 pages

Generative AI Course Overview & Code

The document provides a comprehensive summary of a course on Generative AI and Large Language Models (LLMs), covering 34 lectures that include theoretical concepts, practical demonstrations, and example code snippets. Key topics include the fundamentals of Generative AI, neural networks, transformers, prompt engineering, and ethical considerations. The course also features hands-on projects and discussions on deployment and the future of AI.

Uploaded by

nisarg.ecell01
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views70 pages

Generative AI Course Overview & Code

The document provides a comprehensive summary of a course on Generative AI and Large Language Models (LLMs), covering 34 lectures that include theoretical concepts, practical demonstrations, and example code snippets. Key topics include the fundamentals of Generative AI, neural networks, transformers, prompt engineering, and ethical considerations. The course also features hands-on projects and discussions on deployment and the future of AI.

Uploaded by

nisarg.ecell01
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Generative AI & LLMs - Complete

Course Summary
Comprehensive Notes from 34
Videos + Code Demonstrations
Lecture 1: Introduction to
Generative AI
• This lecture covers the key theoretical and
practical aspects of Introduction to Generative
AI. Concepts, workflows, and examples are
explained for better understanding.
Introduction to Generative AI -
Code Demonstration
• Example code snippet:
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained('gpt2')
tokenizer = AutoTokenizer.from_pretrained('gpt2')
Lecture 2: AI vs ML vs DL vs GenAI
• This lecture covers the key theoretical and
practical aspects of AI vs ML vs DL vs GenAI.
Concepts, workflows, and examples are
explained for better understanding.
AI vs ML vs DL vs GenAI - Code
Demonstration
• Example code snippet:
inputs = tokenizer('Hello AI!', return_tensors='pt')
outputs = [Link](inputs['input_ids'], max_length=50)
print([Link](outputs[0]))
Lecture 3: Neural Networks
Refresher
• This lecture covers the key theoretical and
practical aspects of Neural Networks
Refresher. Concepts, workflows, and examples
are explained for better understanding.
Neural Networks Refresher - Code
Demonstration
• Example code snippet:
from [Link] import PromptTemplate
prompt = PromptTemplate.from_template('Translate {sentence} to French.')
Lecture 4: Transformers
Architecture
• This lecture covers the key theoretical and
practical aspects of Transformers Architecture.
Concepts, workflows, and examples are
explained for better understanding.
Transformers Architecture - Code
Demonstration
• Example code snippet:
from [Link] import OpenAI
llm = OpenAI(model='gpt-3.5-turbo')
llm('What is Generative AI?')
Lecture 5: Self-Attention Explained
• This lecture covers the key theoretical and
practical aspects of Self-Attention Explained.
Concepts, workflows, and examples are
explained for better understanding.
Self-Attention Explained - Code
Demonstration
• Example code snippet:
from datasets import load_dataset
dataset = load_dataset('imdb')
Lecture 6: Embeddings &
Tokenization
• This lecture covers the key theoretical and
practical aspects of Embeddings &
Tokenization. Concepts, workflows, and
examples are explained for better
understanding.
Embeddings & Tokenization - Code
Demonstration
• Example code snippet:
from peft import LoraConfig
config = LoraConfig(r=8, lora_alpha=32)
Lecture 7: HuggingFace Basics
• This lecture covers the key theoretical and
practical aspects of HuggingFace Basics.
Concepts, workflows, and examples are
explained for better understanding.
HuggingFace Basics - Code
Demonstration
• Example code snippet:
import faiss
index = faiss.IndexFlatL2(768)
Lecture 8: Loading Pretrained
Models
• This lecture covers the key theoretical and
practical aspects of Loading Pretrained
Models. Concepts, workflows, and examples
are explained for better understanding.
Loading Pretrained Models - Code
Demonstration
• Example code snippet:
from [Link] import RetrievalQA
qa = RetrievalQA.from_chain_type(llm, retriever=retriever)
Lecture 9: Text Generation with
GPT
• This lecture covers the key theoretical and
practical aspects of Text Generation with GPT.
Concepts, workflows, and examples are
explained for better understanding.
Text Generation with GPT - Code
Demonstration
• Example code snippet:
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained('gpt2')
tokenizer = AutoTokenizer.from_pretrained('gpt2')
Lecture 10: Fine-tuning Models
• This lecture covers the key theoretical and
practical aspects of Fine-tuning Models.
Concepts, workflows, and examples are
explained for better understanding.
Fine-tuning Models - Code
Demonstration
• Example code snippet:
inputs = tokenizer('Hello AI!', return_tensors='pt')
outputs = [Link](inputs['input_ids'], max_length=50)
print([Link](outputs[0]))
Lecture 11: Parameter Efficient
Fine-tuning (LoRA/PEFT)
• This lecture covers the key theoretical and
practical aspects of Parameter Efficient Fine-
tuning (LoRA/PEFT). Concepts, workflows, and
examples are explained for better
understanding.
Parameter Efficient Fine-tuning
(LoRA/PEFT) - Code Demonstration
• Example code snippet:
from [Link] import PromptTemplate
prompt = PromptTemplate.from_template('Translate {sentence} to French.')
Lecture 12: Datasets for Training
LLMs
• This lecture covers the key theoretical and
practical aspects of Datasets for Training LLMs.
Concepts, workflows, and examples are
explained for better understanding.
Datasets for Training LLMs - Code
Demonstration
• Example code snippet:
from [Link] import OpenAI
llm = OpenAI(model='gpt-3.5-turbo')
llm('What is Generative AI?')
Lecture 13: Evaluation Metrics for
LLMs
• This lecture covers the key theoretical and
practical aspects of Evaluation Metrics for
LLMs. Concepts, workflows, and examples are
explained for better understanding.
Evaluation Metrics for LLMs - Code
Demonstration
• Example code snippet:
from datasets import load_dataset
dataset = load_dataset('imdb')
Lecture 14: Prompt Engineering
Fundamentals
• This lecture covers the key theoretical and
practical aspects of Prompt Engineering
Fundamentals. Concepts, workflows, and
examples are explained for better
understanding.
Prompt Engineering Fundamentals
- Code Demonstration
• Example code snippet:
from peft import LoraConfig
config = LoraConfig(r=8, lora_alpha=32)
Lecture 15: Advanced Prompting
(Chain of Thought, Few-shot)
• This lecture covers the key theoretical and
practical aspects of Advanced Prompting
(Chain of Thought, Few-shot). Concepts,
workflows, and examples are explained for
better understanding.
Advanced Prompting (Chain of
Thought, Few-shot) - Code
Demonstration
• Example code snippet:
import faiss
index = faiss.IndexFlatL2(768)
Lecture 16: LangChain Introduction
• This lecture covers the key theoretical and
practical aspects of LangChain Introduction.
Concepts, workflows, and examples are
explained for better understanding.
LangChain Introduction - Code
Demonstration
• Example code snippet:
from [Link] import RetrievalQA
qa = RetrievalQA.from_chain_type(llm, retriever=retriever)
Lecture 17: LangChain for Prompt
Chaining
• This lecture covers the key theoretical and
practical aspects of LangChain for Prompt
Chaining. Concepts, workflows, and examples
are explained for better understanding.
LangChain for Prompt Chaining -
Code Demonstration
• Example code snippet:
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained('gpt2')
tokenizer = AutoTokenizer.from_pretrained('gpt2')
Lecture 18: Vector Databases
(FAISS, Pinecone)
• This lecture covers the key theoretical and
practical aspects of Vector Databases (FAISS,
Pinecone). Concepts, workflows, and
examples are explained for better
understanding.
Vector Databases (FAISS, Pinecone)
- Code Demonstration
• Example code snippet:
inputs = tokenizer('Hello AI!', return_tensors='pt')
outputs = [Link](inputs['input_ids'], max_length=50)
print([Link](outputs[0]))
Lecture 19: Retrieval Augmented
Generation (RAG)
• This lecture covers the key theoretical and
practical aspects of Retrieval Augmented
Generation (RAG). Concepts, workflows, and
examples are explained for better
understanding.
Retrieval Augmented Generation
(RAG) - Code Demonstration
• Example code snippet:
from [Link] import PromptTemplate
prompt = PromptTemplate.from_template('Translate {sentence} to French.')
Lecture 20: Building a RAG Pipeline
• This lecture covers the key theoretical and
practical aspects of Building a RAG Pipeline.
Concepts, workflows, and examples are
explained for better understanding.
Building a RAG Pipeline - Code
Demonstration
• Example code snippet:
from [Link] import OpenAI
llm = OpenAI(model='gpt-3.5-turbo')
llm('What is Generative AI?')
Lecture 21: LLM Agents Basics
• This lecture covers the key theoretical and
practical aspects of LLM Agents Basics.
Concepts, workflows, and examples are
explained for better understanding.
LLM Agents Basics - Code
Demonstration
• Example code snippet:
from datasets import load_dataset
dataset = load_dataset('imdb')
Lecture 22: LangChain Agents
• This lecture covers the key theoretical and
practical aspects of LangChain Agents.
Concepts, workflows, and examples are
explained for better understanding.
LangChain Agents - Code
Demonstration
• Example code snippet:
from peft import LoraConfig
config = LoraConfig(r=8, lora_alpha=32)
Lecture 23: Memory in LLM
Applications
• This lecture covers the key theoretical and
practical aspects of Memory in LLM
Applications. Concepts, workflows, and
examples are explained for better
understanding.
Memory in LLM Applications -
Code Demonstration
• Example code snippet:
import faiss
index = faiss.IndexFlatL2(768)
Lecture 24: Tools & Plugins with
LLMs
• This lecture covers the key theoretical and
practical aspects of Tools & Plugins with LLMs.
Concepts, workflows, and examples are
explained for better understanding.
Tools & Plugins with LLMs - Code
Demonstration
• Example code snippet:
from [Link] import RetrievalQA
qa = RetrievalQA.from_chain_type(llm, retriever=retriever)
Lecture 25: OpenAI API Usage
• This lecture covers the key theoretical and
practical aspects of OpenAI API Usage.
Concepts, workflows, and examples are
explained for better understanding.
OpenAI API Usage - Code
Demonstration
• Example code snippet:
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained('gpt2')
tokenizer = AutoTokenizer.from_pretrained('gpt2')
Lecture 26: Google Gemini & Other
APIs
• This lecture covers the key theoretical and
practical aspects of Google Gemini & Other
APIs. Concepts, workflows, and examples are
explained for better understanding.
Google Gemini & Other APIs - Code
Demonstration
• Example code snippet:
inputs = tokenizer('Hello AI!', return_tensors='pt')
outputs = [Link](inputs['input_ids'], max_length=50)
print([Link](outputs[0]))
Lecture 27: Deploying LLM Apps
• This lecture covers the key theoretical and
practical aspects of Deploying LLM Apps.
Concepts, workflows, and examples are
explained for better understanding.
Deploying LLM Apps - Code
Demonstration
• Example code snippet:
from [Link] import PromptTemplate
prompt = PromptTemplate.from_template('Translate {sentence} to French.')
Lecture 28: Ethics in Generative AI
• This lecture covers the key theoretical and
practical aspects of Ethics in Generative AI.
Concepts, workflows, and examples are
explained for better understanding.
Ethics in Generative AI - Code
Demonstration
• Example code snippet:
from [Link] import OpenAI
llm = OpenAI(model='gpt-3.5-turbo')
llm('What is Generative AI?')
Lecture 29: Bias & Safety in LLMs
• This lecture covers the key theoretical and
practical aspects of Bias & Safety in LLMs.
Concepts, workflows, and examples are
explained for better understanding.
Bias & Safety in LLMs - Code
Demonstration
• Example code snippet:
from datasets import load_dataset
dataset = load_dataset('imdb')
Lecture 30: Scaling LLMs & Costs
• This lecture covers the key theoretical and
practical aspects of Scaling LLMs & Costs.
Concepts, workflows, and examples are
explained for better understanding.
Scaling LLMs & Costs - Code
Demonstration
• Example code snippet:
from peft import LoraConfig
config = LoraConfig(r=8, lora_alpha=32)
Lecture 31: Future of Generative AI
• This lecture covers the key theoretical and
practical aspects of Future of Generative AI.
Concepts, workflows, and examples are
explained for better understanding.
Future of Generative AI - Code
Demonstration
• Example code snippet:
import faiss
index = faiss.IndexFlatL2(768)
Lecture 32: Hands-on Project 1
• This lecture covers the key theoretical and
practical aspects of Hands-on Project 1.
Concepts, workflows, and examples are
explained for better understanding.
Hands-on Project 1 - Code
Demonstration
• Example code snippet:
from [Link] import RetrievalQA
qa = RetrievalQA.from_chain_type(llm, retriever=retriever)
Lecture 33: Hands-on Project 2
• This lecture covers the key theoretical and
practical aspects of Hands-on Project 2.
Concepts, workflows, and examples are
explained for better understanding.
Hands-on Project 2 - Code
Demonstration
• Example code snippet:
from transformers import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained('gpt2')
tokenizer = AutoTokenizer.from_pretrained('gpt2')
Lecture 34: Final Summary &
Course Wrap-up
• This lecture covers the key theoretical and
practical aspects of Final Summary & Course
Wrap-up. Concepts, workflows, and examples
are explained for better understanding.
Final Summary & Course Wrap-up -
Code Demonstration
• Example code snippet:
inputs = tokenizer('Hello AI!', return_tensors='pt')
outputs = [Link](inputs['input_ids'], max_length=50)
print([Link](outputs[0]))
Key Takeaways
• - Fundamentals of Generative AI and LLMs
• - HuggingFace, LangChain, and RAG pipelines
• - Fine-tuning and prompt engineering
• - Hands-on projects and deployment
• - Ethics, bias, and future of AI

You might also like