LLM Course With Slides

LLM 101 - This slide session walk thru LLM applications, architecture and building blocks. Slides describe open source vs closed LLM and how to choose. Slides also focus on LLM steerability. Session slides also describe prompt engineering , tokenization and factors to consider while building applications using LLM. At last it describe process architectur, component architecture and how to estimate cost of LLM.
SLIDE1
SLIDE1
        
SLIDE2
SLIDE2
        
SLIDE3
SLIDE3
        
SLIDE4
SLIDE4
        
SLIDE5
SLIDE5
        
SLIDE6
SLIDE6
        
SLIDE7
SLIDE7
        
SLIDE8
SLIDE8
        
SLIDE9
SLIDE9
        
SLIDE10
SLIDE10
        
SLIDE11
SLIDE11
        
SLIDE12
SLIDE12
        
SLIDE13
SLIDE13
        
SLIDE14
SLIDE14
        
SLIDE15
SLIDE15
        
SLIDE16
SLIDE16
        
SLIDE17
SLIDE17
        
SLIDE18
SLIDE18
        
SLIDE19
SLIDE19
        
SLIDE20
SLIDE20
        
SLIDE21
SLIDE21
        
SLIDE22
SLIDE22
        
SLIDE23
SLIDE23
        
SLIDE24
SLIDE24
        
SLIDE25
SLIDE25
        
SLIDE26
SLIDE26
        
SLIDE27
SLIDE27
        
SLIDE28
SLIDE28
        
SLIDE29
SLIDE29
        
SLIDE30
SLIDE30
        
SLIDE31
SLIDE31
        
SLIDE32
SLIDE32
        
SLIDE33
SLIDE33
        
SLIDE34
SLIDE34
        
SLIDE35
SLIDE35
        
SLIDE36
SLIDE36
        
SLIDE37
SLIDE37
        
SLIDE38
SLIDE38
        
SLIDE39
SLIDE39
        
SLIDE40
SLIDE40
        
SLIDE41
SLIDE41
        
SLIDE42
SLIDE42
        
SLIDE43
SLIDE43
        
SLIDE44
SLIDE44
        
SLIDE45
SLIDE45
        
SLIDE46
SLIDE46
        
SLIDE47
SLIDE47
        
SLIDE48
SLIDE48
        
SLIDE49
SLIDE49
        
SLIDE50
SLIDE50
        
SLIDE51
SLIDE51
        
SLIDE52
SLIDE52
        
SLIDE53
SLIDE53
        
SLIDE54
SLIDE54
        
SLIDE55
SLIDE55
        
SLIDE56
SLIDE56
        
SLIDE57
SLIDE57
        
SLIDE58
SLIDE58
        
SLIDE59
SLIDE59
        
SLIDE60
SLIDE60
        
SLIDE61
SLIDE61
        


Large Language Models (LLMs)


LLMs are a type of artificial intelligence (AI) capable of processing and generating human-like text in response to a wide range of prompts and questions. Trained on massive datasets of text and code, they can perform various tasks such as:

Generating different creative text formats: poems, code, scripts, musical pieces, emails, letters, etc.
Answering open ended, challenging, or strange questions in an informative way: drawing on their internal knowledge and understanding of the world.
Translating languages: seamlessly converting text from one language to another.
Writing different kinds of creative content: stories, poems, scripts, musical pieces, etc., often indistinguishable from human-written content.

Retrieval Augmented Generation (RAG)


RAG is a novel approach that combines the strengths of LLMs with external knowledge sources. It works by:

Retrieval: When given a prompt, RAG searches through an external database of relevant documents to find information related to the query.
Augmentation: The retrieved information is then used to enrich the context provided to the LLM. This can be done by incorporating facts, examples, or arguments into the prompt.
Generation: Finally, the LLM uses the enhanced context to generate a response that is grounded in factual information and tailored to the specific query.
RAG offers several advantages over traditional LLM approaches:

Improved factual accuracy: By anchoring responses in real-world data, RAG reduces the risk of generating false or misleading information.
Greater adaptability: As external knowledge sources are updated, RAG can access the latest information, making it more adaptable to changing circumstances.
Transparency: RAG facilitates a clear understanding of the sources used to generate responses, fostering trust and accountability.
However, RAG also has its challenges:

Data quality: The accuracy and relevance of RAG's outputs depend heavily on the quality of the external knowledge sources.
Retrieval efficiency: Finding the most relevant information from a large database can be computationally expensive.
Integration complexity: Combining two different systems (retrieval and generation) introduces additional complexity in terms of design and implementation.

Prompt Engineering


Prompt engineering is a crucial technique for guiding LLMs towards generating desired outputs. It involves crafting prompts that:

Clearly define the task: Specify what the LLM should do with the provided information.
Provide context: Give the LLM enough background knowledge to understand the prompt and generate an appropriate response.
Use appropriate language: Frame the prompt in a way that aligns with the LLM's capabilities and training data.





When to finetune LLM




Fine Tuning Steps




Verify LLM and AI Assistant Answers





How to evaluate LLM


Method Description
Perplexity Perplexity measures how well a language model predicts a sample of text. Lower perplexity indicates better performance.
BLEU Score BLEU (Bilingual Evaluation Understudy) Score is commonly used to evaluate the quality of machine-translated text by comparing it to human-generated translations.
ROUGE Score ROUGE (Recall-Oriented Understudy for Gisting Evaluation) Score is used to evaluate the quality of summaries produced by a language model by comparing them to reference summaries.
Human Evaluation Human evaluation involves having human judges assess the quality of text generated by the language model based on criteria such as fluency, coherence, and relevance.
Word Error Rate (WER) WER measures the difference between the words generated by the language model and the reference text. Lower WER indicates better performance.







Home     

01-article-tech      Slide1