How heyisula/infosage-13b works
InfoSage is an educational assistant that combines a locally loaded, fine-tuned Llama model with local and optional live retrieval, exposed through a browser dashboard or terminal. The dashboard workflow is user → web UI → Flask API → response generation, with chat history handled separately. Training and index-building are distinct preparation paths that supply model adapters and retrieval data to local inference. The graph follows the README and shown source excerpts; some runtime details and notebook internals were not sampled, so undocumented links are omitted.
Main entry points: chat_llm.py Chat Engine · build_rag_index.py Index Builder · app.py Flask API · script.js Chat Interface
Components 18
Cloud Training
- QLoRA Training
train.ipynb
Knowledge Retrieval
- Index Builder
build_rag_index.py - Embedding Model
build_rag_index.py - FAISS Knowledge Base
- Live Dataset Search
chat_llm.py - Local Retrieval
chat_llm.py
Local Inference
- Chat Engine
chat_llm.py - Llama Inference
chat_llm.py - Response Cleanup
chat_llm.py - Terminal Chat
chat_llm.py
Dashboard
- Chat Interface
gui/static/script.js - Flask API
gui/app.py - Chat History
gui/app.py
Other components
- User
- Browser
- FineWeb-Edu
- Google Drive
- LoRA Adapter
Connections 19
- User → Chat Interface: asks
README.md - Browser → Chat Interface: opens
README.md - Chat Interface → Flask API: sends requests
gui/static/script.js - Flask API → Chat Engine: calls
gui/app.py - Flask API → Chat History: reads and writes
gui/app.py - Chat Engine → Local Retrieval: retrieves locally
chat_llm.py - Local Retrieval → FAISS Knowledge Base: searches
chat_llm.py - Chat Engine → Live Dataset Search: searches when enabled
chat_llm.py - Live Dataset Search → FineWeb-Edu: streams dataset
chat_llm.py - Chat Engine → Llama Inference: generates
chat_llm.py - Llama Inference → Response Cleanup: cleans response
chat_llm.py - Index Builder → FineWeb-Edu: streams samples
build_rag_index.py - Index Builder → Embedding Model: encodes passages
build_rag_index.py - Index Builder → FAISS Knowledge Base: writes index
build_rag_index.py - QLoRA Training → FineWeb-Edu: trains on
README.md - QLoRA Training → Google Drive: saves checkpoints
README.md - Google Drive → LoRA Adapter: migrates weights
README.md - LoRA Adapter → Chat Engine: loads for inference
README.md - User → Terminal Chat: enters prompt
chat_llm.py