Skip to content

Commit

Permalink
V3 docs max (nomic-ai#2488)
Browse files Browse the repository at this point in the history
* new skeleton

Signed-off-by: Max Cembalest <[email protected]>

* v3 docs

Signed-off-by: Max Cembalest <[email protected]>

---------

Signed-off-by: Max Cembalest <[email protected]>
  • Loading branch information
mcembalest authored Jul 1, 2024
1 parent bd307ab commit 5306595
Show file tree
Hide file tree
Showing 57 changed files with 858 additions and 163 deletions.
124 changes: 40 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,66 @@
<h1 align="center">GPT4All</h1>
<p align="center">Privacy-oriented software for chatting with large language models that run on your own computer.</p>

<p align="center">GPT4All runs large language models (LLMs) privately on everyday desktops & laptops. <br> <br> No API calls or GPUs required - you can just download the application and <a href="https://docs.gpt4all.io/gpt4all_desktop/quickstart.html#quickstart">get started</a>


<p align="center">
<a href="https://gpt4all.io">Official Website</a> &bull; <a href="https://docs.gpt4all.io">Documentation</a> &bull; <a href="https://discord.gg/mGZE39AS3e">Discord</a>
<a href="https://gpt4all.io/installers/gpt4all-installer-win64.exe">
<img src="gpt4all-bindings/python/docs/assets/windows.png" width="80" height="80"><br>
Download for Windows
</a>
</p>

<p align="center">
Official Download Links: <a href="https://gpt4all.io/installers/gpt4all-installer-win64.exe">Windows</a> &mdash; <a href="https://gpt4all.io/installers/gpt4all-installer-darwin.dmg">macOS</a> &mdash; <a href="https://gpt4all.io/installers/gpt4all-installer-linux.run">Ubuntu</a>
<a href="https://gpt4all.io/installers/gpt4all-installer-darwin.dmg">
<img src="gpt4all-bindings/python/docs/assets/mac.png" width="80" height="90"><br>
Download for MacOS
</a>
</p>

<p align="center">
<b>NEW:</b> <a href="https://forms.nomic.ai/gpt4all-release-notes-signup">Subscribe to our mailing list</a> for updates and news!
<a href="https://gpt4all.io/installers/gpt4all-installer-linux.run">
<img src="gpt4all-bindings/python/docs/assets/linux.png" width="80" height="80"><br>
Download for Linux
</a>
</p>

<p align="center">
GPT4All is made possible by our compute partner <a href="https://www.paperspace.com/">Paperspace</a>.
<a href="https://gpt4all.io">Website</a> &bull; <a href="https://docs.gpt4all.io">Documentation</a> &bull; <a href="https://discord.gg/mGZE39AS3e">Discord</a>
</p>
<p align="center">
<a href="https://www.phorm.ai/query?projectId=755eecd3-24ad-49cc-abf4-0ab84caacf63"><img src="https://img.shields.io/badge/Phorm-Ask_AI-%23F2777A.svg" alt="phorm.ai"></a>
<a href="https://forms.nomic.ai/gpt4all-release-notes-signup">Subscribe to the newsletter</a>
</p>

<p align="center">
<img width="auto" height="400" src="https://github.com/nomic-ai/gpt4all/assets/14168726/495fce3e-769b-4e5a-a394-99f072ac4d29">
GPT4All is made possible by our compute partner <a href="https://www.paperspace.com/">Paperspace</a>.
</p>
<p align="center">
Run on an M2 MacBook Pro (not sped up!)
<a href="https://www.phorm.ai/query?projectId=755eecd3-24ad-49cc-abf4-0ab84caacf63"><img src="https://img.shields.io/badge/Phorm-Ask_AI-%23F2777A.svg" alt="phorm.ai"></a>
</p>


## About GPT4All

GPT4All is an ecosystem to run **powerful** and **customized** large language models that work locally on consumer grade CPUs and NVIDIA and AMD GPUs. Note that your CPU needs to support [AVX instructions](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions).

Learn more in the [documentation](https://docs.gpt4all.io).
## Install GPT4All Python

A GPT4All model is a 3GB - 8GB file that you can download and plug into the GPT4All software. **Nomic AI** supports and maintains this software ecosystem to enforce quality and security alongside spearheading the effort to allow any person or enterprise to easily deploy their own on-edge large language models.
`gpt4all` gives you access to LLMs with our Python client around [`llama.cpp`](https://github.com/ggerganov/llama.cpp) implementations.

Nomic contributes to open source software like [`llama.cpp`](https://github.com/ggerganov/llama.cpp) to make LLMs accessible and efficient **for all**.

### Installation

The recommended way to install GPT4All is to use one of the online installers linked above in this README, which are also available at the [GPT4All website](https://gpt4all.io/). These require an internet connection at install time, are slightly easier to use on macOS due to code signing, and provide a version of GPT4All that can check for updates.
```bash
pip install gpt4all
```

An alternative way to install GPT4All is to use one of the offline installers available on the [Releases page](https://github.com/nomic-ai/gpt4all/releases). These do not require an internet connection at install time, and can be used to install an older version of GPT4All if so desired. But using these requires acknowledging a security warning on macOS, and they provide a version of GPT4All that is unable to notify you of updates, so you should enable notifications for Releases on this repository (Watch > Custom > Releases) or sign up for announcements in our [Discord server](https://discord.gg/mGZE39AS3e).
```python
from gpt4all import GPT4All
model = GPT4All("Meta-Llama-3-8B-Instruct.Q4_0.gguf") # downloads / loads a 4.66GB LLM
with model.chat_session():
print(model.generate("How can I run LLMs efficiently on my laptop?", max_tokens=1024))
```


### What's New
### Release History
- **July 2nd, 2024**: V3.0.0 Release
- New UI/UX: fresh redesign of the chat application GUI and user experience
- LocalDocs: bring information from files on-device into chats
- **October 19th, 2023**: GGUF Support Launches with Support for:
- Mistral 7b base model, an updated model gallery on [gpt4all.io](https://gpt4all.io), several new local code models including Rift Coder v1.5
- [Nomic Vulkan](https://blog.nomic.ai/posts/gpt4all-gpu-inference-with-vulkan) support for Q4\_0 and Q4\_1 quantizations in GGUF.
Expand All @@ -51,21 +71,9 @@ An alternative way to install GPT4All is to use one of the offline installers av

[Docker-based API server]: https://github.com/nomic-ai/gpt4all/tree/cef74c2be20f5b697055d5b8b506861c7b997fab/gpt4all-api


### Building From Source

* Follow the instructions [here](gpt4all-chat/build_and_run.md) to build the GPT4All Chat UI from source.


### Bindings

* :snake: <a href="https://github.com/nomic-ai/gpt4all/tree/main/gpt4all-bindings/python">Official Python Bindings</a> [![Downloads](https://static.pepy.tech/badge/gpt4all/week)](https://pepy.tech/project/gpt4all)
* :computer: <a href="https://github.com/nomic-ai/gpt4all/tree/main/gpt4all-bindings/typescript">Typescript Bindings</a>


### Integrations

* :parrot::link: [Langchain](https://python.langchain.com/en/latest/modules/models/llms/integrations/gpt4all.html)
* :parrot::link: [Langchain](https://python.langchain.com/v0.2/docs/integrations/providers/gpt4all/)
* :card_file_box: [Weaviate Vector Database](https://github.com/weaviate/weaviate) - [module docs](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/text2vec-gpt4all)
* :telescope: [OpenLIT (OTel-native Monitoring)](https://github.com/openlit/openlit) - [Docs](https://docs.openlit.io/latest/integrations/gpt4all)

Expand All @@ -79,58 +87,6 @@ Please make sure to tag all of the above with relevant project identifiers or yo
Example tags: `backend`, `bindings`, `python-bindings`, `documentation`, etc.


## GPT4All 2024 Roadmap
To contribute to the development of any of the below roadmap items, make or find the corresponding issue and cross-reference the [in-progress task](https://github.com/orgs/nomic-ai/projects/2/views/1).

Each item should have an issue link below.

- Chat UI Language Localization (localize UI into the native languages of users)
- [ ] Chinese
- [ ] German
- [ ] French
- [ ] Portuguese
- [ ] Your native language here.
- UI Redesign: an internal effort at Nomic to improve the UI/UX of gpt4all for all users.
- [ ] Design new user interface and gather community feedback
- [ ] Implement the new user interface and experience.
- Installer and Update Improvements
- [ ] Seamless native installation and update process on OSX
- [ ] Seamless native installation and update process on Windows
- [ ] Seamless native installation and update process on Linux
- Model discoverability improvements:
- [x] Support huggingface model discoverability
- [ ] Support Nomic hosted model discoverability
- LocalDocs (towards a local perplexity)
- Multilingual LocalDocs Support
- [ ] Create a multilingual experience
- [ ] Incorporate a multilingual embedding model
- [ ] Specify a preferred multilingual LLM for localdocs
- Improved RAG techniques
- [ ] Query augmentation and re-writing
- [ ] Improved chunking and text extraction from arbitrary modalities
- [ ] Custom PDF extractor past the QT default (charts, tables, text)
- [ ] Faster indexing and local exact search with v1.5 hamming embeddings and reranking (skip ANN index construction!)
- Support queries like 'summarize X document'
- Multimodal LocalDocs support with Nomic Embed
- Nomic Dataset Integration with real-time LocalDocs
- [ ] Include an option to allow the export of private LocalDocs collections to Nomic Atlas for debugging data/chat quality
- [ ] Allow optional sharing of LocalDocs collections between users.
- [ ] Allow the import of a LocalDocs collection from an Atlas Datasets
- Chat with live version of Wikipedia, Chat with Pubmed, chat with the latest snapshot of world news.
- First class Multilingual LLM Support
- [ ] Recommend and set a default LLM for German
- [ ] Recommend and set a default LLM for English
- [ ] Recommend and set a default LLM for Chinese
- [ ] Recommend and set a default LLM for Spanish

- Server Mode improvements
- Improved UI and new requested features:
- [ ] Fix outstanding bugs and feature requests around networking configurations.
- [ ] Support Nomic Embed inferencing
- [ ] First class documentation
- [ ] Improving developer use and quality of server mode (e.g. support larger batches)


## Technical Reports

<p align="center">
Expand Down
Binary file added gpt4all-bindings/python/docs/assets/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/baelor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/explore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/got_done.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/no_docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpt4all-bindings/python/docs/assets/windows.png
10 changes: 5 additions & 5 deletions gpt4all-bindings/python/docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Remove the `In` and `Out` block in rendered Jupyter notebooks */
.md-container .jp-Cell-outputWrapper .jp-OutputPrompt.jp-OutputArea-prompt,
.md-container .jp-Cell-inputWrapper .jp-InputPrompt.jp-InputArea-prompt {
display: none !important;
}
.md-content h1,
.md-content h2 {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
124 changes: 124 additions & 0 deletions gpt4all-bindings/python/docs/gpt4all_desktop/chats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Chats

Chats are conversations with [language models](models.md) that run locally on your device.

!!! note "Example Chats"

=== "Llama 3"
Download `Llama 3` and prompt:
```
explain why the sky is blue in a way that is correct and makes sense to a child
```

With the default sampling settings, you should see text resembling the following:

```
What a great question!
So, you know how we can see different colors like red, yellow, green, and orange? Well, when sunlight enters Earth's atmosphere, it starts to interact with tiny particles called molecules of gases like nitrogen (N2) and oxygen (02). These molecules are really small, but they're all around us!
Now, here's the cool part: these molecules scatter, or bounce off, shorter wavelengths of light more than longer wavelengths. Think of it like a game of pool where the cue ball hits other balls with different sizes and speeds.
The shortest wavelength of visible light is violet (about 400 nanometers), followed by blue (around 450-495 nanometers). These shorter wavelengths are scattered in all directions, kind of like how a basketball player might bounce the ball around on the court. This scattering effect makes the sky appear blue to our eyes!
Here's why it doesn't look as bright or intense as a blue crayon: there are many more molecules in the atmosphere that scatter longer wavelengths (like red and orange) than shorter ones, so those colors get spread out and become less noticeable.
To sum it up:
1. Sunlight enters Earth's atmosphere.
2. Tiny gas molecule particles interact with light, scattering shorter wavelengths like blue and violet.
3. This scattered blue light reaches our eyes from all directions, making the sky appear blue!
Now, go outside and enjoy that beautiful blue sky!
```

=== "Nous Hermes 2 Mistral DPO"
Download `Nous Hermes 2 Mistral DPO` and prompt:
```
write me a react app i can run from the command line to play a quick game
```

With the default sampling settings, you should see text and code blocks resembling the following:
```
I'll provide you with a simple React app that allows you to play a guessing game. This app will generate a random number between 1 and 10, and ask you to guess it. You can run this app locally using Create React App. Follow the steps below:
Open your terminal or command line interface.
Navigate to the directory where you want to create the project (e.g., cd Documents/Projects).
Run the following commands:
```

```bash
npx create-react-app guessing-game
cd guessing-game
```

```
Open the project in your preferred code editor by running code . (for VS Code) or any other command to open the folder with your text editor.
Replace the content of the src/App.js file with the following code:
```

```javascript
import React, { useState } from 'react';

function App() {
const [guess, setGuess] = useState('');
const [message, setMessage] = useState('');
const [numberToGuess, setNumberToGuess] = useState(Math.floor(Math.random() * 10) + 1);

function handleChange(e) {
setGuess(e.target.value);
}

function handleSubmit(e) {
e.preventDefault();
if (parseInt(guess) === numberToGuess) {
setMessage('You guessed it right!');
} else {
setMessage(`Wrong guess, the correct number was ${numberToGuess}. Try again next time.`);
}
}

return (
<div>
<h1>Guess a Number</h1>
<p>{message}</p>
<form onSubmit={handleSubmit}>
<input type="number" value={guess} onChange={handleChange} />
<button type="submit">Submit</button>
</form>
</div>
);
}

export default App;
```

```
Save the file and go back to your terminal or command line interface. Run npm start. This will start a local development server, and you can access the app in your browser at http://localhost:3000.
Play the guessing game by entering a number between 1 and 10 into the input field and clicking "Submit". The app will tell you if your guess is correct or not.
Remember that this is just a simple example, and you can expand upon it to make the game more interesting with additional features like high scores, multiple difficulty levels, etc.
```

## New Chat

Choose a model with the dropdown at the top of the Chats page

If you don't have any models, [download one](models.md#download-models). Once you have models, you can start chats by loading your default model, which you can configure in [settings](settings.md#application-settings)

![Choose a model](../assets/three_model_options.png)

## LocalDocs

Open the [LocalDocs](localdocs.md) panel with the button in the top-right corner to bring your files into the chat. With LocalDocs, your chats are enhanced with semantically related snippets from your files included in the model's context.

![Open LocalDocs](../assets/open_local_docs.png)

## Chat History

View your chat history with the button in the top-left corner of the Chats page.

<table>
<tr>
<td>
<img src="../assets/closed_chat_panel.png" alt="Close chats" style="width:100%">
</td>
<td>
<img src="../assets/open_chat_panel.png" alt="Open chats" style="width:100%">
</td>
</tr>
</table>

You can change a chat name or delete it from your chat history at any time.
48 changes: 48 additions & 0 deletions gpt4all-bindings/python/docs/gpt4all_desktop/localdocs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# LocalDocs

LocalDocs brings the information you have from files on-device into your LLM chats - **privately**.

## Create LocalDocs

!!! note "Create LocalDocs"

1. Click `+ Add Collection`.

2. Name your collection and link it to a folder.

<table>
<tr>
<td>
<img src="../assets/new_docs_annotated.png" alt="new GOT Docs" style="width:100%">
</td>
<td>
<img src="../assets/new_docs_annotated_filled.png" alt="new GOT Docs filled out" style="width:100%">
</td>
</tr>
</table>

3. Click `Create Collection`. Progress for the collection is displayed on the LocalDocs page.

![Embedding in progress](../assets/baelor.png)

You will see a green `Ready` indicator when the entire collection is ready.

Note: you can still chat with the files that are ready before the entire collection is ready.

![Embedding complete](../assets/got_done.png)

Later on if you modify your LocalDocs settings you can rebuild your collections with your new settings.

4. In your chats, open `LocalDocs` with button in top-right corner to give your LLM context from those files.

![LocalDocs result](../assets/syrio_snippets.png)

5. See which files were referenced by clicking `Sources` below the LLM responses.

![Sources](../assets/open_sources.png)

## How It Works

A LocalDocs collection uses Nomic AI's free and fast on-device embedding models to index your folder into text snippets that each get an **embedding vector**. These vectors allow us to find snippets from your files that are semantically similar to the questions and prompts you enter in your chats. We then include those semantically similar snippets in the prompt to the LLM.

To try the embedding models yourself, we recommend using the [Nomic Python SDK](https://docs.nomic.ai/atlas/guides/embeddings)
Loading

0 comments on commit 5306595

Please sign in to comment.