{"id":13565986,"url":"https://github.com/jlonge4/local_llama","last_synced_at":"2025-04-03T23:30:48.896Z","repository":{"id":167673504,"uuid":"643298670","full_name":"jlonge4/local_llama","owner":"jlonge4","description":"This repo is to showcase how you can run a model locally and offline, free of OpenAI dependencies.","archived":false,"fork":false,"pushed_at":"2024-07-12T22:18:50.000Z","size":73,"stargazers_count":238,"open_issues_count":10,"forks_count":39,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-04T19:42:28.389Z","etag":null,"topics":["artificial-intelligence","langchain","llama-cpp","llamaindex","machinelearning","offline","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlonge4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-20T18:05:24.000Z","updated_at":"2024-10-31T12:15:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"a98b5a14-11ef-440e-bfbe-fb5e070e28fc","html_url":"https://github.com/jlonge4/local_llama","commit_stats":null,"previous_names":["jlonge4/local_llama"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlonge4%2Flocal_llama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlonge4%2Flocal_llama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlonge4%2Flocal_llama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlonge4%2Flocal_llama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlonge4","download_url":"https://codeload.github.com/jlonge4/local_llama/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097620,"owners_count":20883122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","langchain","llama-cpp","llamaindex","machinelearning","offline","python"],"created_at":"2024-08-01T13:01:59.521Z","updated_at":"2025-04-03T23:30:47.751Z","avatar_url":"https://github.com/jlonge4.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Local Llama\n\nThis project enables you to chat with your PDFs, TXT files, or Docx files entirely offline, free from OpenAI dependencies. It's an evolution of the gpt_chatwithPDF project, now leveraging local LLMs for enhanced privacy and offline functionality.\n\n## Features\n\n- Offline operation: Run in airplane mode\n- Local LLM integration: Uses Ollama for improved performance\n- Multiple file format support: PDF, TXT, DOCX, MD\n- Persistent vector database: Reusable indexed documents\n- Streamlit-based user interface\n\n## New Updates\n\n- Ollama integration for significant performance improvements\n- Uses nomic-embed-text and llama3:8b models (can be changed to your liking)\n- Upgraded to Haystack 2.0\n- Persistent Chroma vector database to enable re-use of previously updloaded docs\n\n## Installation\n\n1. Install Ollama from https://ollama.ai/download\n2. Clone this repository\n3. Install dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n4. Pull required Ollama models:\n   ```\n   ollama pull nomic-embed-text\n   ollama pull llama3:8b\n   ```\n\n## Usage\n\n1. Start the Ollama server:\n   ```\n   ollama serve\n   ```\n2. Run the Streamlit app:\n   ```\n   python -m streamlit run local_llama_v3.py\n   ```\n3. Upload your documents and start chatting!\n\n## How It Works\n\n1. Document Indexing: Uploaded files are processed, split, and embedded using Ollama.\n2. Vector Storage: Embeddings are stored in a local Chroma vector database.\n3. Query Processing: User queries are embedded and relevant document chunks are retrieved.\n4. Response Generation: Ollama generates responses based on the retrieved context and chat history.\n\n\n## License\n\nThis project is licensed under the Apache 2.0 License.\n\n## Acknowledgements\n\n- Ollama team for their excellent local LLM solution\n- Haystack for providing the RAG framework\n- The-Bloke for the GGUF models\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlonge4%2Flocal_llama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlonge4%2Flocal_llama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlonge4%2Flocal_llama/lists"}