How hamzafarooq/building-llm-applications-from-scratch works
Main Components
• Course Modules as Individual Components: Each “Module X” folder is essentially a self-contained lesson or project example. They represent different layers of the architecture – for example:
• Module 1 & 2: Fundamental LLM principles and basic LLM examples.
• Module 3: Focuses on vector search capabilities and FAISS integration.
• Module 4: Centers on semantic search and includes a Streamlit-based deployment demo (with data files like CSVs, embeddings, pickles).
• Module 5: Deals with Retrieval-Augmented Generation (RAG) architectures.
• Module 6 & 7: Emphasize fine-tuning models, including interfacing with ChatGPT and other LLMs (e.g., Alpaca, Gemma2) as well as advanced prompt engineering.
• Core Architectural Blocks:
• LLM Core Engine: Represents the underlying language model (or models) that are trained/fine-tuned.
• Data Processing/Preprocessing: Implied in several modules for preparing datasets (e.g., tokenization, embedding generation).
• Semantic/Vector Search Engine: Highlighted in Modules 3 and 4 (using FAISS or custom algorithms).
• Retrieval System: Component that supports RAG architectures, using retrieval notebooks and integration points from Module 5.
• Deployment/UI Layer: Exemplified by the Streamlit app within Module 4, including additional data artifacts such as CSVs, pickled objects, and Python scripts.
Relationships and Interactions
• Interface with External Libraries/Technologies: For example, indicate the use of FAISS for vector search, Hugging Face APIs for model access, and Streamlit for the demonstration UI.
Architectural Patterns and Design Principles
• Modular Design: Emphasize that each module addresses a discrete aspect of the overall LLM application ecosystem.
• Separation of Concerns: Distinguish between model training, vector-based search, retrieval components, and deployment — mirroring the separation between backend processing and frontend demonstration (UI).
Relevant Technologies
• Jupyter Notebooks: Represent them as “interactive learning/execution environments” that drive each of the lessons.
• FAISS: Specifically note its role in Module 3 for vector search.
• Streamlit: As the front-facing UI layer in Module 4.
• Hugging Face / Custom APIs: For model fine-tuning and deployment tasks, as seen in Modules 6 and 7.
A Detailed Approach
1. Data & Preprocessing Layer (input data, embedding generation, tokenization).
2. Processing & Model Layer (LLM training/fine-tuning, RAG implementation, vector search with FAISS).
3. Deployment & UI Layer (Streamlit app, demo pipelines, result presentation).