• Stars
    star
    11,235
  • Rank 2,977 (Top 0.06 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Private chat with local GPT with document, images, video, etc. 100% private, Apache 2.0. Supports oLLaMa, Mixtral, llama.cpp, and more. Demo: https://gpt.h2o.ai/ https://gpt-docs.h2o.ai/

h2oGPT

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.

  • Private offline database of any documents (PDFs, Excel, Word, Images, Code, Text, MarkDown, etc.)
    • Persistent database (Chroma, Weaviate, or in-memory FAISS) using accurate embeddings (instructor-large, all-MiniLM-L6-v2, etc.)
    • Efficient use of context using instruct-tuned LLMs (no need for LangChain's few-shot approach)
    • Parallel summarization reaching 80 tokens/second output 13B LLaMa2
  • Variety of models supported (LLaMa2, Falcon, Vicuna, WizardLM including AutoGPTQ, 4-bit/8-bit, LORA)
    • GPU support from HF and LLaMa.cpp GGML models, and CPU support using HF, LLaMa.cpp, and GPT4ALL models
  • UI or CLI with streaming of all models
    • Upload and View documents via UI (control multiple collaborative or personal collections)
    • Bake-off UI mode against many models at same time
    • Easy Download of model artifacts and control over models like LLaMa.cpp via UI
    • Authentication in UI by user/password
    • State Preservation in UI by user/password
  • Linux, Docker, MAC, and Windows support
    • Easy Windows Installer for Windows 10 64-bit
  • Inference Servers support (HF TGI server, vLLM, Gradio, ExLLaMa, Replicate, OpenAI, Azure OpenAI)
  • OpenAI-compliant Python client API for client-server control
  • Evaluate performance using reward models
  • Quality maintained with over 1000 unit and integration tests taking over 4 GPU-hours

Getting Started

GitHub license Linux macOS Windows Docker

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
# if don't have wget, copy the below link to browser and download and place file into h2ogpt folder
wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin
python generate.py --base_model='llama' --prompt_type=llama2

then go to your browser by visiting http://127.0.0.1:7860 or http://localhost:7860. 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.


Windows 10/11 64-bit with full document Q/A capability

  • One-click Installers

    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 tasks
    • OMP_NUM_THREADS thread count for LLaMa
    • CUDA_VISIBLE_DEVICES which GPUs are visible
    • Any CLI argument from python generate.py --help with environment variable set as h2ogpt_x, e.g. h2ogpt_h2ocolors to False.
    • Set env 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.
  • Windows 10/11 Manual Install and Run Docs


Linux (CPU/CUDA) with full document Q/A capability


MACOS (CPU/M1/M2) with full document Q/A capability


Example Models

GPU mode requires CUDA support via torch and transformers. A 7B/13B model in 16-bit uses 14GB/26GB of GPU memory to store the weights (2 bytes per weight). Compression such as 4-bit precision (bitsandbytes, AWQ, GPTQ, etc.) can further reduce memory requirements down to less than 6GB when asking a question about your documents (see low-memory mode).

CPU mode uses GPT4ALL and LLaMa.cpp, e.g. gpt4all-j, requiring about 14GB of system RAM in typical use.


Live Demos

Inference Benchmarks for Summarization & Generation

Resources

Partners

Video Demo

demo2.mp4

YouTube 4K version: https://www.youtube.com/watch?v=_iktbj4obAI

Docs Guide

Roadmap

  • Integration of code and resulting LLMs with downstream applications and low/no-code platforms
  • Complement h2oGPT chatbot with search and other APIs
  • High-performance distributed training of larger models on trillion tokens
  • Enhance the model's code completion, reasoning, and mathematical capabilities, ensure factual correctness, minimize hallucinations, and avoid repetitive output
  • Add other tools like search
  • Add agents for SQL and CSV question/answer

Development

  • To create a development environment for training and generation, follow the installation instructions.
  • To fine-tune any LLM models on your data, follow the fine-tuning instructions.
  • To run h2oGPT tests:
    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.

Help

Acknowledgements

Why H2O.ai?

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:

  • H2O MLOps to deploy and monitor models at scale
  • H2O Feature Store in collaboration with AT&T
  • Open-source Low-Code AI App Development Frameworks Wave and Nitro
  • Open-source Python datatable (the engine for H2O Driverless AI feature engineering)

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.

Disclaimer

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.

  • Biases and Offensiveness: The large language model is trained on a diverse range of internet text data, which may contain biased, racist, offensive, or otherwise inappropriate content. By using this model, you acknowledge and accept that the generated content may sometimes exhibit biases or produce content that is offensive or inappropriate. The developers of this repository do not endorse, support, or promote any such content or viewpoints.
  • Limitations: The large language model is an AI-based tool and not a human. It may produce incorrect, nonsensical, or irrelevant responses. It is the user's responsibility to critically evaluate the generated content and use it at their discretion.
  • Use at Your Own Risk: Users of this large language model must assume full responsibility for any consequences that may arise from their use of the tool. The developers and contributors of this repository shall not be held liable for any damages, losses, or harm resulting from the use or misuse of the provided model.
  • Ethical Considerations: Users are encouraged to use the large language model responsibly and ethically. By using this model, you agree not to use it for purposes that promote hate speech, discrimination, harassment, or any form of illegal or harmful activities.
  • Reporting Issues: If you encounter any biased, offensive, or otherwise inappropriate content generated by the large language model, please report it to the repository maintainers through the provided channels. Your feedback will help improve the model and mitigate potential issues.
  • Changes to this Disclaimer: The developers of this repository reserve the right to modify or update this disclaimer at any time without prior notice. It is the user's responsibility to periodically review the disclaimer to stay informed about any changes.

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.

Star History

Star History Chart

More Repositories

1

h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
Jupyter Notebook
6,862
star
2

h2o-llmstudio

H2O LLM Studio - a framework and no-code GUI for fine-tuning LLMs. Documentation: https://docs.h2o.ai/h2o-llmstudio/
Python
3,991
star
3

wave

Realtime Web Apps and Dashboards for Python and R
Python
3,966
star
4

h2o-2

Please visit https://github.com/h2oai/h2o-3 for latest H2O
Java
2,222
star
5

datatable

A Python package for manipulating 2-dimensional tabular data structures
C++
1,807
star
6

h2o-tutorials

Tutorials and training material for the H2O Machine Learning Platform
Jupyter Notebook
1,457
star
7

sparkling-water

Sparkling Water provides H2O functionality inside Spark cluster
Scala
958
star
8

mli-resources

H2O.ai Machine Learning Interpretability Resources
Jupyter Notebook
479
star
9

h2o4gpu

H2Oai GPU Edition
C++
455
star
10

h2o-meetups

Presentations from H2O meetups & conferences by the H2O.ai team
Jupyter Notebook
412
star
11

awesome-h2o

A curated list of research, applications and projects built using the H2O Machine Learning platform
353
star
12

db-benchmark

reproducible benchmark of database-like ops
R
299
star
13

pystacknet

Jupyter Notebook
286
star
14

deepwater

Deep Learning in H2O using Native GPU Backends
C++
285
star
15

h2o-wizardlm

Open-Source Implementation of WizardLM to turn documents into Q:A pairs for LLM fine-tuning
Python
242
star
16

driverlessai-recipes

Recipes for Driverless AI
Python
224
star
17

nitro

Create apps 10x quicker, without Javascript/HTML/CSS.
TypeScript
200
star
18

wave-apps

Sample AI Apps built with H2O Wave.
Python
144
star
19

h2o-flow

Web based interactive computing environment for H2O
CoffeeScript
131
star
20

tutorials

This is a repo for all the tutorials put out by H2O.ai. This includes learning paths for Driverless AI, H2O-3, Sparkling Water and more...
Jupyter Notebook
129
star
21

enterprise-h2ogpte

Client Code Examples, Use Cases and Benchmarks for Enterprise h2oGPTe RAG-Based GenAI Platform
Python
79
star
22

rsparkling

RSparkling: Use H2O Sparkling Water from R (Spark + R + Machine Learning)
R
64
star
23

steam

DEPRECATED Build, manage and deploy H2O's high-speed machine learning models.
Java
61
star
24

h2o-world-2014-training

training material
Java
47
star
25

h2o-sparkling

DEPRECATED! Use https://github.com/h2oai/sparkling-water repository! H2O and Spark interoperability based on Tachyon.
Scala
43
star
26

app-consumer-loan

HTML
41
star
27

h2o-kubeflow

Jsonnet
37
star
28

h2o-droplets

Templates for projects based on top of H2O.
Java
37
star
29

driverlessai-tutorials

H2OAI Driverless AI Code Samples and Tutorials
Jupyter Notebook
37
star
30

app-malicious-domains

Domain name classifier looking for good vs. possibly malicious providers
HTML
33
star
31

data-science-examples

A collection of data science examples implemented across a variety of languages and libraries.
CSS
33
star
32

xgboost-predictor

Java
32
star
33

wave-ml

Automatic Machine Learning (AutoML) for Wave Apps
Python
32
star
34

AITD

Jupyter Notebook
31
star
35

h2o-LLM-eval

Large-language Model Evaluation framework with Elo Leaderboard and A-B testing
Jupyter Notebook
28
star
36

Deep-Learning-with-h2o-in-R

Deep neural networks on over 50 classification problems from the UC Irvine Machine Learning Repository
R
23
star
37

sql-sidekick

Experiment on QnA tabular data using LLMs and SQL
Python
22
star
38

h2o.js

Node.js bindings to H2O, the open-source prediction engine for big data science.
CoffeeScript
21
star
39

perf

Performance Benchmarks
Jupyter Notebook
21
star
40

typesentry

Python 2.7 & 3.5+ runtime type-checker
Python
20
star
41

covid19-datasets

20
star
42

h2o-kubernetes

H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.
Rust
20
star
43

mlops-dai-runtimes

Production ready templates for deploying Driverless AI (DAI) scorers. https://h2oai.github.io/dai-deployment-templates/
Java
17
star
44

genai-app-store-apps

GenAI apps from H2O made Wave
Python
16
star
45

qcon2015

Repository for SF QConf 2015 Workshop
Java
16
star
46

h2o3-sagemaker

Integrating H2O-3 AutoML with Amazon Sagemaker
Python
13
star
47

wave-image-styling-playground

A interactive playground to style and edit images, generate art and have fun.
Python
13
star
48

article-information-2019

Article for Special Edition of Information: Machine Learning with Python
Jupyter Notebook
13
star
49

social_ml

Python
12
star
50

challenge-wildfires

Starter kit for H2O.ai competition Challenge Wildfires.
Jupyter Notebook
11
star
51

h2o-jenkins-pipeline-lib

Library of different Jenkins pipeline building blocks.
Groovy
11
star
52

haic-tutorials

Jupyter Notebook
10
star
53

wave-h2o-automl

Wave App for H2O AutoML
Python
9
star
54

cvpr-multiearth-deforestation-segmentation

Jupyter Notebook
8
star
55

ht-catalog

Diverse collection of 100 Hydrogen Torch Use-Cases by different industries, data-types, and problem types
HTML
8
star
56

app-ask-craig

Ask Craig application
Scala
7
star
57

dai-deployment-examples

Examples for deploying Driverless AI (DAI) scorers.
Java
7
star
58

ml-security-audits

TeX
7
star
59

wave-big-data-visualizer

Python
6
star
60

xai_guidelines

Guidelines for the responsible use of explainable AI and machine learning
Jupyter Notebook
5
star
61

authn-py

Universal Token Provider
Python
5
star
62

h2o-scoring-service

Scoring service backend by model POJOs.
Java
5
star
63

app-news-classification

Scala
5
star
64

jdupes

H2O.ai fork of https://codeberg.org/jbruchon/jdupes
C
5
star
65

covid19-backtesting-publication

Jupyter Notebook
5
star
66

fluid

Rapid application development for a more... civilized age.
CoffeeScript
5
star
67

app-mojo-servlet

Example of putting a mojo zip file as a resource into a java servlet.
Java
5
star
68

cloud-discovery-py

H2O Cloud Discovery Client.
Python
4
star
69

jacocoHighlight

Java
4
star
70

h2o-automl-paper

H2O AutoML paper
R
4
star
71

docai-recipes

Jupyter Notebook
4
star
72

deepwater-nae

Python
3
star
73

h2oai-power-nae

Shell
3
star
74

nitro-matplotlib

Matplotlib plugin for H2O Nitro
Python
3
star
75

h2o-cloud

H2O Cloud code.
Jupyter Notebook
3
star
76

nitro-plotly

Plotly plugin for H2O Nitro
Python
3
star
77

h2o-rf1-bench

Python
3
star
78

residuals-vis

JavaScript
3
star
79

wave-r-data-table

This wave application is a R data.table tutorial and interactive learning environment developed using the wave library for R.
R
3
star
80

python-chat-ui

3
star
81

h2o_genai_training

Repository for H2O.ai's Generative AI Training
Jupyter Notebook
3
star
82

roc-chart

JavaScript
2
star
83

driverlessai-alt-containers

Shell
2
star
84

camelot

Modified version of https://github.com/camelot-dev/camelot
Python
2
star
85

nitro-bokeh

Bokeh plugin for H2O Nitro
Python
2
star
86

wave-amlb

Wave Dashboard for the OpenML AutoML Benchmark
Python
2
star
87

h2o-evals

Bring Your Own Evals
Python
2
star
88

pydart

Dart/Flutter <-> Python transpiler
Python
2
star
89

app-titanic

HTML
2
star
90

h2o3-xgboost-nae

Shell
2
star
91

residuals-vis-example-project

JavaScript
2
star
92

py-repo

Python package repository
HTML
2
star
93

dai-centos7-x86_64-nae

Dockerfile
1
star
94

correlation-graph

JavaScript
1
star
95

lightning

High performance, interactive statistical graphics engine for the web.
CoffeeScript
1
star
96

residuals-vis-data

JavaScript
1
star
97

2017-06-21-hackathon

Meetup Hackathon 06/21/2017
HTML
1
star
98

h2o-health

An initiate of H2O.ai to build AI apps to solve complex healthcare and life science problems
Makefile
1
star
99

h2o-google-bigquery

Python
1
star
100

dallas-tutorials

Temporary repository for fast git cloning during the h2o dallas event.
Jupyter Notebook
1
star