gpt4all/README.md

156 lines
5.6 KiB
Markdown
Raw Normal View History

2023-03-28 00:20:59 +00:00
<h1 align="center">GPT4All</h1>
2023-05-11 16:31:08 +00:00
<p align="center">Open-source assistant-style large language models that run locally on CPU</p>
2023-05-10 16:05:42 +00:00
<p align="center">
<a href="https://gpt4all.io">GPT4All Website</a>
</p>
<p align="center">
<a href="https://discord.gg/mGZE39AS3e">Discord</a>
</p>
<p align="center">
<a href="https://gpt4all.io/reports/GPT4All_Technical_Report_3.pdf">:green_book: Technical Report 3: GPT4All Snoozy and Groovy </a>
</p>
2023-03-28 20:04:18 +00:00
<p align="center">
2023-04-13 21:42:01 +00:00
<a href="https://static.nomic.ai/gpt4all/2023_GPT4All-J_Technical_Report_2.pdf">:green_book: Technical Report 2: GPT4All-J </a>
2023-04-13 16:56:08 +00:00
</p>
<p align="center">
<a href="https://s3.amazonaws.com/static.nomic.ai/gpt4all/2023_GPT4All_Technical_Report.pdf">:green_book: Technical Report 1: GPT4All</a>
2023-03-28 20:04:18 +00:00
</p>
2023-04-13 15:16:31 +00:00
<p align="center">
2023-05-11 16:31:08 +00:00
<a href="https://github.com/nomic-ai/gpt4all/tree/main/gpt4all-bindings/python/README.md">:snake: Official Python Bindings</a>
2023-04-13 15:16:31 +00:00
</p>
<p align="center">
<a href="https://github.com/nomic-ai/gpt4all-ts">:computer: Official Typescript Bindings</a>
</p>
2023-04-13 20:42:46 +00:00
<p align="center">
2023-05-10 16:18:45 +00:00
<a href="https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-chat/README.md">:speech_balloon: Official Chat Interface</a>
2023-04-13 20:42:46 +00:00
</p>
<p align="center">
2023-05-10 16:05:42 +00:00
<a href="https://github.com/nomic-ai/gpt4all-ui">:speech_balloon: Official Web Chat Interface</a>
2023-04-13 20:42:46 +00:00
</p>
2023-03-29 01:07:04 +00:00
<p align="center">
2023-05-10 16:05:42 +00:00
<a href="https://python.langchain.com/en/latest/modules/models/llms/integrations/gpt4all.html">🦜️🔗 Official Langchain Backend</a>
2023-03-29 01:07:04 +00:00
</p>
2023-03-28 20:04:18 +00:00
2023-04-14 02:04:42 +00:00
2023-04-13 18:33:52 +00:00
<p align="center">
GPT4All is made possible by our compute partner <a href="https://www.paperspace.com/">Paperspace</a>.
</p>
2023-05-10 16:05:42 +00:00
## GPT4All: An ecosystem of open-source on-edge large language models.
2023-04-13 20:34:14 +00:00
![gpt4all-j-demo](https://user-images.githubusercontent.com/13879686/231876409-e3de1934-93bb-4b4b-9013-b491a969ebbc.gif)
2023-04-13 16:56:08 +00:00
2023-04-13 21:02:19 +00:00
Run on an M1 Mac (not sped up!)
2023-04-13 16:56:08 +00:00
2023-05-11 16:31:08 +00:00
## Contributing
GPT4All welcomes contribution, involvment, and discussion from the open source community!
Please see CONTRIBUTING.md and follow the issue, bug report, and PR markdown templates.
2023-05-11 16:37:02 +00:00
Check project discord, with project owners, or through existing issues/PRs to avoid duplicate work.
2023-05-11 16:43:16 +00:00
Please make sure to tag all of the above with relevant project identifiers or your contribution could potentially get lost.
2023-05-11 16:37:02 +00:00
Example tags: `backend`, `bindings`, `python-bindings`, `documentation`, etc.
2023-05-11 16:31:08 +00:00
2023-05-10 16:05:42 +00:00
### Chat Client
Run any GPT4All model natively on your home desktop with the auto-updating desktop chat client. See website for exaustive list of models.
<p align="center">
<a href="https://gpt4all.io">GPT4All Website</a>
</p>
Direct Installer Links:
2023-04-13 16:56:08 +00:00
2023-04-17 22:14:42 +00:00
[Mac/OSX](https://gpt4all.io/installers/gpt4all-installer-darwin.dmg)
2023-04-13 16:56:08 +00:00
2023-04-17 22:14:42 +00:00
[Windows](https://gpt4all.io/installers/gpt4all-installer-win64.exe)
2023-04-13 16:56:08 +00:00
2023-04-17 22:14:42 +00:00
[Ubuntu](https://gpt4all.io/installers/gpt4all-installer-linux.run)
2023-04-13 16:56:08 +00:00
2023-04-25 13:01:31 +00:00
If you have older hardware that only supports avx and not avx2 you can use these.
2023-04-25 13:02:11 +00:00
[Mac/OSX - avx-only](https://gpt4all.io/installers/gpt4all-installer-darwin-avx-only.dmg)
2023-04-25 13:01:31 +00:00
2023-04-25 13:02:11 +00:00
[Windows - avx-only](https://gpt4all.io/installers/gpt4all-installer-win64-avx-only.exe)
2023-04-25 13:01:31 +00:00
2023-04-25 13:02:11 +00:00
[Ubuntu - avx-only](https://gpt4all.io/installers/gpt4all-installer-linux-avx-only.run)
2023-04-25 13:01:31 +00:00
2023-04-13 16:56:08 +00:00
2023-04-13 20:05:43 +00:00
Find the most up-to-date information on the [GPT4All Website](https://gpt4all.io/)
2023-04-13 16:56:08 +00:00
2023-05-11 16:31:08 +00:00
### Python Bindings
```bash
pip install gpt4all
```
```python
import gpt4all
gptj = gpt4all.GPT4All("ggml-gpt4all-j-v1.3-groovy")
messages = [{"role": "user", "content": "Name 3 colors"}]
gptj.chat_completion(messages)
```
2023-04-13 16:56:08 +00:00
## Training GPT4All-J
2023-04-13 16:57:12 +00:00
2023-04-13 21:56:24 +00:00
Please see [GPT4All-J Technical Report](https://static.nomic.ai/gpt4all/2023_GPT4All-J_Technical_Report_2.pdf) for details.
2023-04-13 16:56:08 +00:00
### GPT4All-J Training Data
2023-04-13 17:41:07 +00:00
- We are releasing the curated training data for anyone to replicate GPT4All-J here: [GPT4All-J Training Data](https://huggingface.co/datasets/nomic-ai/gpt4all-j-prompt-generations)
2023-04-13 17:52:04 +00:00
- [Atlas Map of Prompts](https://atlas.nomic.ai/map/gpt4all-j-prompts-curated)
- [Atlas Map of Responses](https://atlas.nomic.ai/map/gpt4all-j-response-curated)
2023-04-19 18:35:08 +00:00
We have released updated versions of our `GPT4All-J` model and training data.
- `v1.0`: The original model trained on the v1.0 dataset
2023-04-29 22:07:14 +00:00
- `v1.1-breezy`: Trained on a filtered dataset where we removed all instances of AI language model
2023-04-19 18:35:08 +00:00
- `v1.2-jazzy`: Trained on a filtered dataset where we also removed instances like I'm sorry, I can't answer... and AI language model
The [models](https://huggingface.co/nomic-ai/gpt4all-j) and [data](https://huggingface.co/datasets/nomic-ai/gpt4all-j-prompt-generations) versions can be specified by passing a `revision` argument.
For example, to load the `v1.2-jazzy` model and dataset, run:
```python
from datasets import load_dataset
from transformers import AutoModelForCausalLM
dataset = load_dataset("nomic-ai/gpt4all-j-prompt-generations", revision="v1.2-jazzy")
model = AutoModelForCausalLM.from_pretrained("nomic-ai/gpt4all-j-prompt-generations", revision="v1.2-jazzy")
```
2023-04-13 16:56:08 +00:00
### GPT4All-J Training Instructions
2023-04-13 17:59:19 +00:00
```bash
accelerate launch --dynamo_backend=inductor --num_processes=8 --num_machines=1 --machine_rank=0 --deepspeed_multinode_launcher standard --mixed_precision=bf16 --use_deepspeed --deepspeed_config_file=configs/deepspeed/ds_config_gptj.json train.py --config configs/train/finetune_gptj.yaml
```
2023-03-28 21:31:35 +00:00
2023-04-13 15:16:31 +00:00
## Citation
2023-03-28 21:31:35 +00:00
2023-04-13 15:16:31 +00:00
If you utilize this repository, models or data in a downstream project, please consider citing it with:
2023-03-28 16:00:25 +00:00
```
@misc{gpt4all,
2023-03-28 18:50:27 +00:00
author = {Yuvanesh Anand and Zach Nussbaum and Brandon Duderstadt and Benjamin Schmidt and Andriy Mulyar},
2023-03-28 16:00:25 +00:00
title = {GPT4All: Training an Assistant-style Chatbot with Large Scale Data Distillation from GPT-3.5-Turbo},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/nomic-ai/gpt4all}},
}
```