Coconote
AI notes
AI voice & video notes
Try for free
📚
Integrating Knowledge into Language Models
Mar 15, 2025
Lecture Notes: Adding Knowledge Files to Large Language Models
Introduction
Presenter
: Dave
Topic
: How to add your own knowledge files and documents to a large language model (LLM) both locally and online.
Key Methods for Adding Information
Retraining a Model
Retrieval Augmented Generation (RAG)
Uploading Documents to the Context Window
Demonstration
Demo of a modest-sized LLM running locally on Dual Nvidia RTX 60008 setup.
Comparison between running a 1 billion parameter model and a 70 billion parameter model.
1 billion model: Sustains over 300 tokens/second.
70 billion model: Around 20 tokens/second.
Adding Information Methods Explained
1. Retraining a Model
Analogy
: Like sending a student back to school with new books for permanent knowledge.
Pros
: Long-term, permanent update of knowledge.
Cons
: Requires significant resources and computing power.
2. Retrieval Augmented Generation (RAG)
Analogy
: Student consulting a library for the latest information.
Pros
: Agile and dynamic; no deep permanent learning.
Cons
: Requires a database for information retrieval.
3. Uploading Documents to the Context Window
Analogy
: Student using a cheat sheet during an exam.
Pros
: Quickest way to provide immediate knowledge.
Cons
: Temporary; only lasts during the session.
Why Not Retrain?
Openness
: Lack of access to modify models like ChatGPT.
Hardware & Software Requirements
: Need for serious hardware and programming skills.
Focus on RAG and Context
Detailed steps for using RAG and context documents.
Using ChatGPT
Uploading documents using the upload button to enhance current context.
Demo
: Uploading PDP 1134 manual and querying for specific information.
Creating Custom GPTs with Context Documents
Steps
:
Use "Create" function in ChatGPT to form a specialized GPT.
Upload relevant documents (e.g., PDP manuals).
Query the custom GPT for specific knowledge.
Local Usage with oLama and Open WebUI
Demonstration of setting up context documents locally.
Steps
:
Run Open WebUI on a local machine.
Upload files and set as context.
Query using context documents.
RAG Setup
Benefits
: Efficiently handles large data, pulls necessary information.
Steps
:
Configure RAG by scanning and indexing documents.
Use in queries to combine dynamic retrieval with existing knowledge.
Conclusion
Summary
: Retraining, RAG, and context window usage each have unique strengths for different user requirements.
Final Note
: Follow Dave's channel for more episodes and insights.
Additional Resources
Dave's Attic
: Weekly podcast covering viewer questions and further discussions.
📄
Full transcript