Copy of https://github.com/h2oai/h2ogpt for own use
1
stars
5
commits
Python
primary language
Oct 14, 2023
updated
Turn ★ into ⭐ (top-right corner) if you like the project!
Query and summarize your documents or just chat with local private GPT LLMs using h2oGPT, an Apache V2 open-source project.
To quickly try out h2oGPT on CPU with limited document Q/A capability using LLaMa2 7B Chat, create a fresh Python 3.10 environment and run:
git clone https://github.com/h2oai/h2ogpt.git
cd h2ogpt
pip install -r requirements.txt
pip install -r reqs_optional/requirements_optional_langchain.txt
pip install -r reqs_optional/requirements_optional_gpt4all.txt
python generate.py --base_model='llama' --prompt_type=llama2 --model_path_llama=https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin --max_seq_len=4096
then go to your browser by visiting http://127.0.0.1:7860 or http://localhost:7860. Choose 13B for better model than 7B. If encounter issues with llama-cpp-python or other packages that try to compile and fail, try binary wheels for your platform as linked in the detailed instructions below.
We recommend quantized (e.g. GGML) models for most small-GPU systems, e.g. LLaMa-2-7B-Chat-GGML or 9GB+ GPU memory or larger models for LLaMa-2-13B-Chat-GGML if have 16GB+ GPU memory.
One-click Installers Oct 6, 2023:
Aug 19, 2023:
The installers include all dependencies for document Q/A, except models (LLM, embedding, reward) that are downloadable via UI. After installation, go to start and run h2oGPT, and a web browser will open for h2oGPT. To use LLaMa model, go to Models tab, select llama base model, then click load to download from preset URL. Then use as normal. To terminate the app, in task manager kill the Python process named pythonw.exe as will also show up in nvidia-smi if using GPUs. Set environment variables (in system properties->advanced->environment variables) to control things:
n_jobs: number of cores for various tasksOMP_NUM_THREADS thread count for LLaMaCUDA_VISIBLE_DEVICES which GPUs are used. Recommend set to single fast GPU, e.g. CUDA_VISIBLE_DEVICES=0 if have multiple GPUs. Note that UI cannot control which GPUs (or CPU mode) for LLaMa models.python generate.py --help with environment variable set as h2ogpt_x, e.g. h2ogpt_h2ocolors to False.h2ogpt_server_name to actual IP address for LAN to see app, e.g. h2ogpt_server_name to 192.168.1.172 and allow access through firewall if have Windows Defender activated.CPU mode uses GPT4ALL and LLaMa.cpp, e.g. gpt4all-j, requiring about 14GB of system RAM in typical use.
Live h2oGPT Document Q/A Demohttps://github.com/h2oai/h2ogpt/assets/2249614/2f805035-2c85-42fb-807f-fd0bca79abc6
YouTube 4K version: https://www.youtube.com/watch?v=_iktbj4obAI
These are not part of normal installation instructions and are experimental.
wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin
pip install requirements-parser pytest-instafail
pytest --instafail -s -v tests
# for client tests
make -C client setup
make -C client build
pytest --instafail -s -v client/tests
or tweak/run tests/test4gpus.sh to run tests in parallel.Flash attention support, see Flash Attention
More Links, context, competitors, models, datasets
Our Makers at H2O.ai have built several world-class Machine Learning, Deep Learning and AI platforms:
We also built platforms for deployment and monitoring, and for data wrangling and governance:
Many of our customers are creating models and deploying them enterprise-wide and at scale in the H2O AI Cloud:
We are proud to have over 25 (of the world's 280) Kaggle Grandmasters call H2O home, including three Kaggle Grandmasters who have made it to world #1.
Please read this disclaimer carefully before using the large language model provided in this repository. Your use of the model signifies your agreement to the following terms and conditions.
By using the large language model provided in this repository, you agree to accept and comply with the terms and conditions outlined in this disclaimer. If you do not agree with any part of this disclaimer, you should refrain from using the model and any content generated by it.
5 commits
Python
91.1%
TeX
3.7%
HTML
2.7%
Shell
1.5%
Copy of https://github.com/h2oai/h2ogpt for own use
1
stars
5
commits
Python
primary language
Oct 14, 2023
updated
Turn ★ into ⭐ (top-right corner) if you like the project!
Query and summarize your documents or just chat with local private GPT LLMs using h2oGPT, an Apache V2 open-source project.
To quickly try out h2oGPT on CPU with limited document Q/A capability using LLaMa2 7B Chat, create a fresh Python 3.10 environment and run:
git clone https://github.com/h2oai/h2ogpt.git
cd h2ogpt
pip install -r requirements.txt
pip install -r reqs_optional/requirements_optional_langchain.txt
pip install -r reqs_optional/requirements_optional_gpt4all.txt
python generate.py --base_model='llama' --prompt_type=llama2 --model_path_llama=https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin --max_seq_len=4096
then go to your browser by visiting http://127.0.0.1:7860 or http://localhost:7860. Choose 13B for better model than 7B. If encounter issues with llama-cpp-python or other packages that try to compile and fail, try binary wheels for your platform as linked in the detailed instructions below.
We recommend quantized (e.g. GGML) models for most small-GPU systems, e.g. LLaMa-2-7B-Chat-GGML or 9GB+ GPU memory or larger models for LLaMa-2-13B-Chat-GGML if have 16GB+ GPU memory.
One-click Installers Oct 6, 2023:
Aug 19, 2023:
The installers include all dependencies for document Q/A, except models (LLM, embedding, reward) that are downloadable via UI. After installation, go to start and run h2oGPT, and a web browser will open for h2oGPT. To use LLaMa model, go to Models tab, select llama base model, then click load to download from preset URL. Then use as normal. To terminate the app, in task manager kill the Python process named pythonw.exe as will also show up in nvidia-smi if using GPUs. Set environment variables (in system properties->advanced->environment variables) to control things:
n_jobs: number of cores for various tasksOMP_NUM_THREADS thread count for LLaMaCUDA_VISIBLE_DEVICES which GPUs are used. Recommend set to single fast GPU, e.g. CUDA_VISIBLE_DEVICES=0 if have multiple GPUs. Note that UI cannot control which GPUs (or CPU mode) for LLaMa models.python generate.py --help with environment variable set as h2ogpt_x, e.g. h2ogpt_h2ocolors to False.h2ogpt_server_name to actual IP address for LAN to see app, e.g. h2ogpt_server_name to 192.168.1.172 and allow access through firewall if have Windows Defender activated.CPU mode uses GPT4ALL and LLaMa.cpp, e.g. gpt4all-j, requiring about 14GB of system RAM in typical use.
Live h2oGPT Document Q/A Demohttps://github.com/h2oai/h2ogpt/assets/2249614/2f805035-2c85-42fb-807f-fd0bca79abc6
YouTube 4K version: https://www.youtube.com/watch?v=_iktbj4obAI
These are not part of normal installation instructions and are experimental.
wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin
pip install requirements-parser pytest-instafail
pytest --instafail -s -v tests
# for client tests
make -C client setup
make -C client build
pytest --instafail -s -v client/tests
or tweak/run tests/test4gpus.sh to run tests in parallel.Flash attention support, see Flash Attention
More Links, context, competitors, models, datasets
Our Makers at H2O.ai have built several world-class Machine Learning, Deep Learning and AI platforms:
We also built platforms for deployment and monitoring, and for data wrangling and governance:
Many of our customers are creating models and deploying them enterprise-wide and at scale in the H2O AI Cloud:
We are proud to have over 25 (of the world's 280) Kaggle Grandmasters call H2O home, including three Kaggle Grandmasters who have made it to world #1.
Please read this disclaimer carefully before using the large language model provided in this repository. Your use of the model signifies your agreement to the following terms and conditions.
By using the large language model provided in this repository, you agree to accept and comply with the terms and conditions outlined in this disclaimer. If you do not agree with any part of this disclaimer, you should refrain from using the model and any content generated by it.
5 commits
Python
91.1%
TeX
3.7%
HTML
2.7%
Shell
1.5%