General Introduction
LocalGPT is an open source project designed to allow users to talk to documents on local devices and ensure data privacy. By using a variety of open source models, LocalGPT can process and understand document content without uploading data to the cloud. The project supports multiple platforms, including GPU, CPU, HPU and MPS, and provides rich features such as session history, API interfaces, and GUIs.The design goal of LocalGPT is to provide users with a secure and private document interaction environment for scenarios that require high privacy protection.
Function List
- data privacy: All data processing is performed on the local device, ensuring 100% data security.
- Multi-model support: A variety of open source models are supported, including HF, GPTQ, GGML and GGUF.
- Multiple Embedding: A variety of open source embedding options are available.
- Model Reuse: The LLM can be reused after downloading, no need to download it again and again.
- conversational history: Memorize the history of conversations in a session.
- API interface: Provides an API interface to facilitate the building of RAG applications.
- graphical user interface (GUI): Provides API-based and standalone GUI (streamlit-based).
- Multi-platform support: Supports multiple platforms such as CUDA, CPU, HPU (Intel® Gaudi®) and MPS.
Using Help
Installation process
- clone warehouse: Run the following command in a terminal to clone the LocalGPT repository:
git clone https://github.com/PromtEngineer/localGPT.git
- Installation of dependencies: Go to the project directory and install the required dependencies:
cd localGPT
pip install -r requirements.txt
- Configuration environment: Configure environment variables and model paths as needed.
Usage
- Starting services: Run the following command to start the LocalGPT service:
python run_localGPT.py
- access interface: Open a browser and visit the local address provided to access the GUI.
- Upload a document: Upload the documents to be processed in the interface.
- Starting a conversation: Enter a question in the dialog box and LocalGPT will generate an answer based on the content of the document.
Detailed Function Operation
- data privacy: All data processing is performed on local devices, ensuring 100% data security. Users do not need to worry about data leakage.
- Multi-model support: LocalGPT supports a variety of open source models , users can choose the appropriate model for document processing according to the needs .
- conversational history: LocalGPT records the history of conversations in a session, making it easy for users to view and manage the content of previous conversations.
- API interface: LocalGPT provides API interfaces that developers can use to build their own RAG applications for more customization.
- graphical user interface (GUI): LocalGPT provides a streamlit-based graphical user interface, which allows users to upload and dialog with documents through an intuitive interface.
Example operation flow
- Upload a documentClick on the "Upload Document" button and select the document file to be processed.
- Input Issues: Enter a question in the dialog box, such as "What is the main point of this document?". .
- View Answer: LocalGPT will generate answers based on the content of the document and display them in a dialog box.
- Manage Sessions: Users can view and manage session history for easy subsequent reference and use.