Skip to content

Question-answering CLI app for scientific papers built with LangChain, llama.cpp, and FAISS.

License

Notifications You must be signed in to change notification settings

antonhosgood/paper-qa-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paper Question-Answering CLI

Paper QA is a command-line interface (CLI) application for question-answering over scientific papers. It uses LangChain, llama.cpp, FAISS, with the UI built using Textual.

Installation

Python Environment

This project requires Python 3.10. To set up a virtual environment:

python3.10 -m venv .venv
source .venv/bin/activate

Install dependencies (without hardware acceleration):

pip install -r requirements.txt

To use a different backend, follow the installation instructions provided by llama-cpp-python.

For example, to enable Metal (MPS) support for M-series Macs:

CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install -r requirements.txt

Model

Paper QA uses models in GGUF format, which must be downloaded and placed in the models directory.

To get started, download the CapybaraHermes-2.5-Mistral-7B model using the provided script:

sh download_model.sh

How to use

To start the application, run:

python3 main.py

You will be greeted with an interface like this:

All models found in the models directory will be available in the model selector. You can also switch the embeddings model to any sentence-transformers model.

Paste the URL of a web-based paper or the path to a local PDF, enter your question, and press Enter:

About

Question-answering CLI app for scientific papers built with LangChain, llama.cpp, and FAISS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors