Compare commits

..

No commits in common. "3444a47cad6d6d8dd6ec9d74cf5afebd78afe430" and "7e5e84fbb7f431f403e98ff6bcbfe10fe0c06ba3" have entirely different histories.

20 changed files with 16 additions and 62 deletions

View File

@ -1,9 +1,11 @@
<h1 align="center">GPT4All</h1>
<p align="center">Open-source large language models that run locally on your CPU and nearly any GPU</p>
<p align="center">Open-source assistant-style large language models that run locally on your CPU</p>
<p align="center"><strong>New</strong>: Now with Nomic Vulkan Universal GPU support. <a href="https://blog.nomic.ai/posts/gpt4all-gpu-inference-with-vulkan">Learn more</a>.</p>
<p align="center">
<a href="https://gpt4all.io">GPT4All Website and Models</a>
<a href="https://gpt4all.io">GPT4All Website</a>
</p>
<p align="center">
@ -30,24 +32,13 @@ Run on an M1 macOS Device (not sped up!)
</p>
## GPT4All: An ecosystem of open-source on-edge large language models.
> [!IMPORTANT]
> GPT4All v2.5.0 and newer only supports models in GGUF format (.gguf). Models used with a previous version of GPT4All (.bin extension) will no longer work.
GPT4All is an ecosystem to run **powerful** and **customized** large language models that work locally on consumer grade CPUs and any GPU. Note that your CPU needs to support [AVX or AVX2 instructions](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions).
GPT4All is an ecosystem to train and deploy **powerful** and **customized** large language models that run locally on consumer grade CPUs. Note that your CPU needs to support [AVX or AVX2 instructions](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions).
Learn more in the [documentation](https://docs.gpt4all.io).
A GPT4All model is a 3GB - 8GB file that you can download and plug into the GPT4All open-source ecosystem 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 train and deploy their own on-edge large language models.
The goal is simple - be the best instruction tuned assistant-style language model that any person or enterprise can freely use, distribute and build on.
### What's New ([Issue Tracker](https://github.com/orgs/nomic-ai/projects/2))
- **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, Q6 quantizations in GGUF.
- Offline build support for running old versions of the GPT4All Local LLM Chat Client.
- **September 18th, 2023**: [Nomic Vulkan](https://blog.nomic.ai/posts/gpt4all-gpu-inference-with-vulkan) launches supporting local LLM inference on AMD, Intel, Samsung, Qualcomm and NVIDIA GPUs.
- **August 15th, 2023**: GPT4All API launches allowing inference of local LLMs from docker containers.
- **July 2023**: Stable support for LocalDocs, a GPT4All Plugin that allows you to privately and locally chat with your data.
A GPT4All model is a 3GB - 8GB file that you can download and plug into the GPT4All open-source ecosystem 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 train and deploy their own on-edge large language models.
### Chat Client

@ -1 +1 @@
Subproject commit 2dee60214b0001cf03e1cec0a53a61a17b55c1eb
Subproject commit a8ed8c858985ef94d97a3cf2c97085b680c6d5d0

View File

@ -10,7 +10,6 @@
#include <cassert>
#include <cstdlib>
#include <sstream>
#include <regex>
#ifdef _MSC_VER
#include <intrin.h>
#endif
@ -82,13 +81,6 @@ const std::vector<LLModel::Implementation> &LLModel::Implementation::implementat
static auto* libs = new std::vector<Implementation>([] () {
std::vector<Implementation> fres;
std::string impl_name_re = "(bert|llama|gptj|llamamodel-mainline)";
if (requires_avxonly()) {
impl_name_re += "-avxonly";
} else {
impl_name_re += "-(default|metal)";
}
std::regex re(impl_name_re);
auto search_in_directory = [&](const std::string& paths) {
std::stringstream ss(paths);
std::string path;
@ -98,10 +90,7 @@ const std::vector<LLModel::Implementation> &LLModel::Implementation::implementat
// Iterate over all libraries
for (const auto& f : std::filesystem::directory_iterator(fs_path)) {
const std::filesystem::path& p = f.path();
if (p.extension() != LIB_FILE_EXT) continue;
if (!std::regex_search(p.stem().string(), re)) continue;
// Add to list if model implementation
try {
Dlhandle dl(p.string());

3
gpt4all-bindings/cli/app.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""GPT4All CLI
The GPT4All CLI is a self-contained script based on the `gpt4all` and `typer` packages. It offers a
@ -54,7 +53,7 @@ def repl(
model: Annotated[
str,
typer.Option("--model", "-m", help="Model to use for chatbot"),
] = "mistral-7b-instruct-v0.1.Q4_0.gguf",
] = "ggml-gpt4all-j-v1.3-groovy",
n_threads: Annotated[
int,
typer.Option("--n-threads", "-t", help="Number of threads to use for chatbot"),

View File

@ -1,4 +1,3 @@
#!/bin/sh
mkdir -p runtimes
rm -rf runtimes/linux-x64
mkdir -p runtimes/linux-x64/native

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import sys
import time
from io import StringIO

0
gpt4all-bindings/typescript/scripts/build_unix.sh Executable file → Normal file
View File

View File

@ -18,7 +18,7 @@ endif()
set(APP_VERSION_MAJOR 2)
set(APP_VERSION_MINOR 5)
set(APP_VERSION_PATCH 2)
set(APP_VERSION_PATCH 1)
set(APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}")
# Include the binary directory for the generated header file

1
gpt4all-chat/cmake/sign_dmg.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os
import subprocess
import tempfile

View File

@ -94,17 +94,17 @@
},
{
"order": "h",
"md5sum": "cf5e8f73747f9d7c6fe72a629808c1de",
"md5sum": "f5bc6a52f72efd9128efb2eeed802c86",
"name": "MPT Chat",
"filename": "mpt-7b-chat-merges-q4_0.gguf",
"filesize": "3796133728",
"filename": "mpt-7b-chat-q4_0.gguf",
"filesize": "3911522272",
"requires": "2.5.0",
"ramrequired": "8",
"parameters": "7 billion",
"quant": "q4_0",
"type": "MPT",
"description": "<strong>Good model with novel architecture</strong><br><ul><li>Fast responses<li>Chat based<li>Trained by Mosaic ML<li>Cannot be used commercially</ul>",
"url": "https://gpt4all.io/models/gguf/mpt-7b-chat-merges-q4_0.gguf",
"url": "https://gpt4all.io/models/gguf/mpt-7b-chat-q4_0.gguf",
"promptTemplate": "<|im_start|>user\n%1<|im_end|><|im_start|>assistant\n",
"systemPrompt": "<|im_start|>system\n- You are a helpful assistant chatbot trained by MosaicML.\n- You answer questions.\n- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\n- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.<|im_end|>"
},

View File

@ -550,21 +550,6 @@
* Jared Van Bortel (Nomic AI)
* Adam Treat (Nomic AI)
* Community (beta testers, bug reporters, bindings authors)
"
},
{
"version": "2.5.1",
"notes":
"
* Accessibility fixes
* Bugfix for crasher on Windows
",
"contributors":
"
* Aaron Miller (Nomic AI)
* Jared Van Bortel (Nomic AI)
* Victor Tsaran <vtsaran@yahoo.com>
* Community (beta testers, bug reporters, bindings authors)
"
}
]

3
gpt4all-training/build_map.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import numpy as np
from nomic import atlas
import glob
@ -52,4 +51,4 @@ atlas.map_embeddings(embeddings,
colorable_fields=["source", "loss", "trained_on"],
build_topic_model=True,
topic_label_field="inputs",
reset_project_if_exists=True,)
reset_project_if_exists=True,)

3
gpt4all-training/clean.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import numpy as np
import glob
import os
@ -72,4 +71,4 @@ for file in glob.glob(os.path.join(prompt_generation_dir, "*.jsonl")):
clean_name = file.split(".jsonl")[0] + "_clean.jsonl"
print(f"writing to {curr_len} rows to {clean_name}")
df.to_json(clean_name, orient="records", lines=True)
df.to_json(clean_name, orient="records", lines=True)

0
gpt4all-training/create_hostname.sh Executable file → Normal file
View File

1
gpt4all-training/eval_figures.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import glob
import pickle
import numpy as np

1
gpt4all-training/eval_self_instruct.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import json
import torch
import pickle

1
gpt4all-training/generate.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModelForCausalLM
from read import read_config

1
gpt4all-training/inference.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
import torch.nn as nn

0
gpt4all-training/launcher.sh Executable file → Normal file
View File

1
gpt4all-training/train.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os
from transformers import AutoModelForCausalLM, AutoTokenizer, get_scheduler
import torch