DSG IIT Roorkee Bootcamp
  • Start Here: Welcome to the Bootcamp
    • Course Structure
    • Course Syllabus and Timelines
    • Know your Educators
    • Action Items and Prerequisites
    • Kick-Off Session for the Bootcamp
  • Module 1: Basics of LLMs
    • What is Generative AI?
    • What is a Large Language Model?
    • Advantages and Applications of LLMs
    • Bonus Resource: Multimodal LLMs and Google Gemini
  • Module 2: Word Vectors, Simplified
    • What is a Word Vector?
    • Word Vector Relationships
    • Role of Context in LLMs
    • Transforming Vectors into LLM Responses
    • Bonus: Overview of the Transformer Architecture
      • Attention Mechanism
      • Multi-Head Attention and Transformer Architecture
      • Vision Transformers (ViTs)
    • Bonus: Future of LLMs? | By Transformer Co-inventor
    • Graded Quiz 1
  • Module 3: Prompt Engineering and Token Limits
    • What is Prompt Engineering
    • Prompt Engineering and In-context Learning
    • For Starters: Best Practices
    • Navigating Token Limits
    • Hallucinations in LLMs
    • Prompt Engineering Excercise (Ungraded)
      • Story for the Excercise: The eSports Enigma
      • Your Task fror the Module
  • Module 4: RAG and LLM Architecture
    • What is Retrieval Augmented Generation (RAG)?
    • Primer to RAG: Pre-trained and Fine-Tuned LLMs
    • In-context Learning
    • High-level LLM Architecture Components for In-context Learning
    • Diving Deeper: LLM Architecture Components
    • Basic RAG Architecture with Key Components
    • RAG versus Fine-Tuning and Prompt Engineering
    • Versatility and Efficiency in RAG
    • Key Benefits of using RAG in an Enterprise/Production Setup
    • Hands-on Demo: Performing Similarity Search in Vectors (Bonus Module)
      • Implementation of RAG for Production Use Cases
    • Using kNN and LSH to Enhance Similarity Search (Bonus Module)
    • Bonus Video: Implementing End-to-End RAG | 1-Hour Session
    • Graded Quiz 2
  • Module 5: Hands-on Development
    • Build Your Own AI Slide Search Pipeline
    • Prerequisites (Must)
    • Docker Basics
    • Your Hands-on RAG Journey
    • 1 – First RAG Pipeline
      • Building with Open AI
      • How it Works
      • RAG with Gemini and other Open AI Alternatives
      • RAG with Open Source and Running "Examples"
    • 2 – Amazon Discounts App
      • How the Project Works
      • Building the App
    • 3 – Private RAG with Mistral, Ollama and Pathway
      • Building a Private RAG project
      • (Bonus) Adaptive RAG Overview
    • 4 – Realtime RAG with LlamaIndex/LangChain and Pathway
      • Understand the Basics
      • Implementation with LlamaIndex and LangChain
    • Cloud Deployment Basics
  • Module 6: Project Tracks and Submission
    • Prizes and Giveaways
    • Suggested Tracks for Ideation
    • Sample Projects and Additional Resources
    • Submit Project for Review
Powered by GitBook
On this page
  • Up Next: Explainer by Mike Chambers from AWS
  • Bonus Links
  1. Module 2: Word Vectors, Simplified

Transforming Vectors into LLM Responses

PreviousRole of Context in LLMsNextBonus: Overview of the Transformer Architecture

Now that you're familiar with word vectors and the significance of context, it's vital to grasp other fundamental components like tokenizers and detokenizers before we investigate the sophisticated processes that power Large Language Models (LLMs).

Consider a tokenizer as a "sentence divider." Its job is to dissect sentences into smaller fragments such as words, characters, subwords, or symbols that the model can process. The specific approach varies based on the model's design and size. Conversely, detokenizers perform the opposite function; they assemble the pieces outputted by the LLM into coherent sentences that we can comprehend. This step is essential for LLMs to convert human language into executable actions.

Up Next: Explainer by Mike Chambers from AWS

Upcoming: Informative Video by Mike Chambers from AWS To further enhance your understanding, we will turn to an instructive video by Mike Chambers. In this presentation, he clarifies the chain of events triggered by your 'prompt' (the text input you provide) to an LLM.

While the underlying mathematics might be complex, the main objective remains simple: predicting words. The video will walk you through the process of how your prompts are handled to produce intelligible text responses. This serves as a precursor to our forthcoming discussions about Prompt Engineering and LLM workflows. By doing so, we aim to present a unified view of the operational aspects of these models.

Here you see how a Large Language Model’s job is to predict the next word based on the context.

Now that you understand the role of "context," you might want to grasp some concepts to appreciate how these models work at a granular level. These are bonus resources that are not necessary for you to complete, given the timelines of this course.

  • Attention in Large Language Models: Imagine being in a room where multiple conversations are happening. Your ability to focus on one conversation over the others is similar to how Attention works in neural networks. It allows the model to 'focus' on relevant parts of the input for tasks.

  • Encoder-Decoder Architecture: In this, an encoder translates the input (e.g., a sentence) into a fixed-size context vector. The decoder takes this context vector to generate an output sequence (e.g., a translated sentence). When the attention mechanism is in action, it guides the Decoder to focus on certain parts of the Encoder’s output, enhancing the translation or text generation task. The concept of Attention complements the Encoder-Decoder architecture, making it more effective and efficient. This architecture is a building block for LLMs such as GPT-3.5.

Bonus Links

If you're interested in delving further into the details, you may find the following bonus links on embeddings, attention mechanisms, and encoder-decoder architecture beneficial. A foundational understanding of neural networks, backpropagation, the softmax function, and cross-entropy will enhance your comprehension of these resources.

  • Understanding Transformers: Check the Bonus Module Right Ahead.

  • Videos around Vector Embeddings and Seq2Seq

  • Videos around attention mechanism (recommended after you go through the bonus module on transformers up ahead).

Deep-dive into the Process of Tokenization | Video by Andrej Karpathy

| Video by StatQuest

| Video by StatQuest

| Intro by Google Cloud

| Read the Paper on ArXiv

| Watch the seminar by Stanford Online

| Watch the video by 3Blue1Brown

⬇️
Word2Vec and Word Embeddings
Seq2Seq Encoder-Decoder Neural Networks
Attention mechanism: Overview
Attention is all you need
Attention is all you need
Visual Introduction to Transformers
(Credits: Mike Chambers and Build on AWS)