Skip to main content

Plugin for LLM adding support for GPT4ALL models

Project description

llm-gpt4all

PyPI Changelog Tests License

Plugin for LLM adding support for the GPT4All collection of models.

Installation

Install this plugin in the same environment as LLM.

llm install llm-gpt4all

After installing the plugin you can see a new list of available models like this:

llm models list

The output will include something like this:

gpt4all: orca-mini-3b-gguf2-q4_0 - Mini Orca (Small), 1.84GB download, needs 4GB RAM (installed)
gpt4all: nous-hermes-llama2-13b - Hermes, 6.86GB download, needs 16GB RAM (installed)
gpt4all: all-MiniLM-L6-v2-f16 - SBert, 43.76MB download, needs 1GB RAM
gpt4all: replit-code-v1_5-3b-q4_0 - Replit, 1.74GB download, needs 4GB RAM
gpt4all: mpt-7b-chat-merges-q4_0 - MPT Chat, 3.54GB download, needs 8GB RAM
gpt4all: rift-coder-v0-7b-q4_0 - Rift coder, 3.56GB download, needs 8GB RAM
gpt4all: em_german_mistral_v01 - EM German Mistral, 3.83GB download, needs 8GB RAM
gpt4all: mistral-7b-instruct-v0 - Mistral Instruct, 3.83GB download, needs 8GB RAM
gpt4all: mistral-7b-openorca - Mistral OpenOrca, 3.83GB download, needs 8GB RAM
gpt4all: gpt4all-falcon-q4_0 - GPT4All Falcon, 3.92GB download, needs 8GB RAM
gpt4all: gpt4all-13b-snoozy-q4_0 - Snoozy, 6.86GB download, needs 16GB RAM
gpt4all: wizardlm-13b-v1 - Wizard v1.2, 6.86GB download, needs 16GB RAM
gpt4all: starcoder-q4_0 - Starcoder, 8.37GB download, needs 4GB RAM

Further details on these models can be found in this Observable notebook.

Usage

You can execute a model using the name displayed in the llm models list output. The model file will be downloaded the first time you attempt to run it.

llm -m orca-mini-3b-gguf2-q4_0 '3 names for a pet cow'

The first time you run this you will see a progress bar:

 31%|█████████▋                        | 1.16G/3.79G [00:26<01:02, 42.0MiB/s]

On subsequent uses the model output will be displayed immediately.

To chat with a model, avoiding the need to load it into memory for every message, use llm chat:

llm chat -m orca-mini-3b-gguf2-q4_0
Chatting with orca-mini-3b-gguf2-q4_0
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> hi
 Hello! How can I assist you today?
> three jokes about a pelican and a chicken who are friends
 Sure, here are three jokes about a pelican and a chicken who are friends:

1. Why did the pelican cross the road? To get to the other side where the chicken was waiting for him!
2. What do you call a group of chickens playing basketball? A flock of feathers!
3. Why did the chicken invite the pelican over for dinner? Because it had nothing else to eat and needed some extra protein in its diet!

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-gpt4all
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm-gpt4all-0.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

llm_gpt4all-0.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file llm-gpt4all-0.2.tar.gz.

File metadata

  • Download URL: llm-gpt4all-0.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for llm-gpt4all-0.2.tar.gz
Algorithm Hash digest
SHA256 6de55441b867cd3bd5e4666a2253b50dc05c4e93032bc3f41940ed2603b2134a
MD5 1800452d23794c271561576502988a8d
BLAKE2b-256 20e3fdd5a9db71062f7a0862d9d4ebc6d35ce05ac37ed50ab33fabf227f26264

See more details on using hashes here.

File details

Details for the file llm_gpt4all-0.2-py3-none-any.whl.

File metadata

  • Download URL: llm_gpt4all-0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for llm_gpt4all-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e0ba878c9cb8fec45032dd488aa6d3be9e22bd317dd525780c5c78252da19f3a
MD5 fb3a39dab9daa501da92e46760b1f3aa
BLAKE2b-256 dd89ffa066a4f95803a01d7d84a7e40693ee24994dfba612ed39da4ed39cb527

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page