Lord of Large Language Models Web User Interface
Go to file
2023-05-20 13:53:04 +03:00
.github Bump docker/build-push-action from 2 to 4 2023-04-07 17:37:52 +00:00
.vscode Upgraded install batch files 2023-04-06 22:07:20 +02:00
ai_ethics upgraded for the new personality ai ersion 2023-05-19 03:32:38 +02:00
backends removed duplicate 2023-05-20 12:27:10 +03:00
configs added gpu tool 2023-05-19 22:50:57 +02:00
databases New code struture with separated backend 2023-04-15 13:30:08 +02:00
docs updated todos 2023-05-16 13:01:16 +03:00
extensions added extensions dir 2023-04-20 19:55:53 +02:00
gpt4all_api enhanced speed 2023-05-20 01:19:17 +02:00
installations added gpu tool 2023-05-19 22:50:57 +02:00
models working model and backend selection 2023-05-18 20:11:21 +02:00
scripts update 2023-05-16 10:07:41 -04:00
static bugfix 2023-05-14 21:18:18 +02:00
templates Added documentaAdded more docs and added settings configuration endpointstion 2023-05-05 01:50:43 +02:00
test Update python code (isort, black, pylint) and some manual tuning 2023-04-07 18:58:42 +02:00
web fixed word wrap 2023-05-20 13:53:04 +03:00
.gitignore enhanced backends 2023-05-18 21:31:18 +02:00
.hadolint.yaml Hadolint config added 2023-04-07 18:14:03 +02:00
app.py upgraded 2023-05-18 21:20:16 +02:00
CODE_OF_CONDUCT.md Initial commit 2023-04-06 21:12:49 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md 2023-04-27 20:00:22 +02:00
convert.py moved to PyAIPersonality file format 2023-04-30 22:40:19 +02:00
docker-compose.yml upgraded docker files 2023-04-13 22:54:04 +02:00
Dockerfile upgraded documentation 2023-05-14 10:23:28 +02:00
LICENSE Initial commit 2023-04-06 12:38:00 -04:00
package-lock.json update 2023-05-15 15:00:58 -04:00
README.md updated doc 2023-05-14 10:32:55 +02:00
requirements_dev.txt upgraded models 2023-05-14 02:29:09 +02:00
requirements.txt removed unnecessary installs 2023-05-19 18:22:56 +02:00
setup.py New model format 2023-04-20 19:30:03 +02:00
tailwind.config.js Light and Dark mode + Tailwind Files 2023-04-18 21:49:44 -07:00
uninstall.bat Upgraded install batch files 2023-04-06 22:07:20 +02:00
uninstall.sh Initial commit 2023-04-06 21:12:49 +02:00
webui.bat upgraded 2023-05-19 22:24:29 +02:00
webui.sh update 2023-05-17 10:35:04 -04:00

Gpt4All Web UI

GitHub license GitHub issues GitHub stars GitHub forks Discord Follow me on Twitter Follow Me on YouTube

This is a Flask web application that provides a chat UI for interacting with llamacpp, gpt-j, gpt-q as well as Hugging face based language models uch as GPT4all, vicuna etc...

Follow us on our Discord Server.

Watch Install Video (Outdated, please use "New UI video") Old Install Video

Watch Usage Videos Usage Video

Watch Settings Video Settings Video

Watch New UI Video New UI + Install

image

GPT4All is an exceptional language model, designed and developed by Nomic-AI, a proficient company dedicated to natural language processing. The app uses Nomic-AI's advanced library to communicate with the cutting-edge GPT4All model, which operates locally on the user's PC, ensuring seamless and efficient communication.

If you are interested in learning more about this groundbreaking project, visit their Github Repository, where you can find comprehensive information regarding the app's functionalities and technical details. Moreover, you can delve deeper into the training process and database by going through their detailed Technical report, available for download at Technical report.

One of the app's impressive features is that it allows users to send messages to the chatbot and receive instantaneous responses in real time, ensuring a seamless user experience. Additionally, the app facilitates the exportation of the entire chat history in either text or JSON format, providing greater flexibility to the users.

It's worth noting that the model has recently been launched, and it's expected to evolve across time, enabling it to become even better in the future. This web UI is designed to provide the community with easy and fully localized access to a chatbot that will continue to improve and adapt across time.

Features

  • Chat with locally hosted AI inside a web browser
  • Create, edit, and share your AI's personality
  • Audio in and audio out with many options for language and voices (only Chrome web browser is supported at this time)
  • History of discussion with resume functionality
  • Add new discussion, rename discussion, remove discussion
  • Export database to json format
  • Export discussion to text format

Installation and running

Make sure that your CPU supports AVX2 instruction set. Without it, this application won't run out of the box (for the pyllamacpp backend). To check your CPU features, please visit the website of your CPU manufacturer for more information and look for Instruction set extension: AVX2.

Note

Default model gpt4all-lora-quantized-ggml.bin is roughly 4GB in size.

Windows 10 and 11

Automatic install

Note

It is mandatory to have python 3.10 (The official one, not the one from Microsoft Store) and git installed.

  1. Go to the latest release section
  2. Download the webui.bat if you are on windows or webui.sh if you are on linux/mac. Put this file in a folder for example /gpt4all-ui/, because when you run it, all the necessary files will be downloaded into that folder.
  3. Run the script and wait. It should install everything and start the chatbot. Chatbot will be avaliable from web browser http://localhost:9600.

Note

During installtion, it may ask you to download a model. Feel free to accept or to download your own models depending on the backends you are using.

Once installed, you can run the app by using webui.bat or webui.sh. The script will check for any new updates

If you want to use a more advanced install procedure, please click here

Docker Compose

Make sure to put models the inside the models directory. After that, you can simply use docker-compose or podman-compose to build and start the application:

Build

docker compose -f docker-compose.yml build

Start

docker compose -f docker-compose.yml up

Stop Ctrl + C

Start detached (runs in background)

docker compose -f docker-compose.yml up -d

Stop detached (one that runs in background)

docker compose stop

After that, you can open the application in your browser on http://localhost:9600

Now you're ready to work!

Supported backends

Two backends are now supported:

1- The llama_cpp backend by Abdeladim 2- The GPT-j backend by Abdeladim 3- The GPT-j backend by marella 4- Hugging face's Transformers (under construction)

Supported models

You can also refuse to download the model during the install procedure and download it manually.

For now, we support ggml models that work "out-of-the-box" (tested on Windows 11 and Ubuntu 22.04.2), such as:

LLama_cpp models

We also support GPT-j models out of the box

GPT-j models

These models don't work "out-of-the-box" and need to be converted to the right ggml type:

LLAMACPP models

Just download the model into the models/<backend name> folder and start using the tool.

Personalities

You can find hundreds of personalities in my personal Personalities repository. This new personalities format can be used for any third party applications, it builds a simple structure and format to define personalities. This format is evolutive and new fields and assets will be added in the future like personality voice or 3d animated character with prebaked motions that should allow AI to be more alive. The format is baked to support old versions while adding new capabilities for new versions making it ideal as a personality defintition format.

How to Install Personalities from the Zoo

  1. Navigate to the root directory of your repository.
  2. Run either installations/add_personality.bat or installations/add_personality.sh, depending on your operating system.
  3. Select the desired language, category, and personality from the provided options.
  4. The selected personality will be added to the list of available options.
  5. Choose the current personality:
    • Option 1: Use the UI by going to "Settings" and selecting "Personalities".
    • Option 2: Update the configuration file configs/default_local.yaml with the appropriate language, category, and personality name.

Note: Ensure that you have the necessary permissions and dependencies installed before performing the above steps.


Please don't forget to take time and give a Star if you like the project. This helps the visibility of the project.
# Build custom personalities and share them

To build a new personality, create a new file with the name of the personality inside the `personalities` folder. You can look at `gpt4all` personality as an example. Then you can fill the fields with the description, conditionning, etc. of your personality. Add a logo to your personality (avatar). Then save the file. I personally use stable diffusion to generate the avatars.



You can launch the application using the personality in two ways:
- Change it permanently by putting the name of the personality inside your configuration file
- Use the `--personality` or `-p` option to give the personality name to be used

If you deem your personality worthy of sharing, you can share the it by adding it to the [GPT4all personalities](https://github.com/ParisNeo/GPT4All_Personalities) repository. Just fork the repo, add your file, and do a pull request.

# Advanced Usage

If you want more control on your launch, you can activate your environment:

On Windows:
```cmd
env/Scripts/activate.bat

On Linux/MacOs:

source venv/bin/activate

Now you are ready to customize your Bot.

To run the Flask server, execute the following command:

python app.py [--config CONFIG] [--personality PERSONALITY] [--port PORT] [--host HOST] [--temp TEMP] [--n_threads N_THREADS] [--n_predict N_PREDICT] [--top_k TOP_K] [--top_p TOP_P] [--repeat_penalty REPEAT_PENALTY] [--repeat_last_n REPEAT_LAST_N] [--ctx_size CTX_SIZE]

On Linux/MacOS more details can be found here

Options

  • --config: the configuration file to be used. It contains default configurations. The script parameters will override the configurations inside the configuration file. It must be placed in configs folder (default: default.yaml)
  • --personality: the personality file name. It contains the definition of the pezrsonality of the chatbot and should be placed in personalities folder. The default personality is gpt4all_chatbot.yaml
  • --model: the name of the model to be used. The model should be placed in models folder (default: gpt4all-lora-quantized.bin)
  • --seed: the random seed for reproductibility. If fixed, it is possible to reproduce the outputs exactly (default: random)
  • --port: the port on which to run the server (default: 9600)
  • --host: the host address at which to run the server (default: localhost). To expose application to local network, set this to 0.0.0.0.
  • --temp: the sampling temperature for the model (default: 0.1)
  • --n_threads: the number of threads to be used (default:8)
  • --n-predict: the number of tokens to predict at a time (default: 128)
  • --top-k: the number of top-k candidates to consider for sampling (default: 40)
  • --top-p: the cumulative probability threshold for top-p sampling (default: 0.90)
  • --repeat-penalty: the penalty to apply for repeated n-grams (default: 1.3)
  • --repeat-last-n: the number of tokens to use for detecting repeated n-grams (default: 64)
  • --ctx-size: the maximum context size to use for generating responses (default: 2048)

Note: All options are optional and have default values.

Once the server is running, open your web browser and navigate to http://localhost:9600 (or http://your-host-name:your-port-number if you have selected different values for those) to access the chatbot UI. To use the app, open a web browser and navigate to this URL.

Make sure to adjust the default values and descriptions of the options to match your specific application.

Contribute

This is an open-source project by the community and for the community. Our chatbot is a UI wrapper for Nomic AI's model, which enables natural language processing and machine learning capabilities.

We welcome contributions from anyone who is interested in improving our chatbot. Whether you want to report a bug, suggest a feature, or submit a pull request, we encourage you to get involved and help us make our chatbot even better.

Before contributing, please take a moment to review our code of conduct. We expect all contributors to abide by this code of conduct, which outlines our expectations for respectful communication, collaborative development, and innovative contributions.

Reporting Bugs

If you find a bug or other issue with our chatbot, please report it by opening an issue. Be sure to provide as much detail as possible, including steps to reproduce the issue and any relevant error messages.

Suggesting Features

If you have an idea for a new feature or improvement to our chatbot, we encourage you to open an issue to discuss it. We welcome feedback and ideas from the community and will consider all suggestions that align with our project goals.

Contributing Code

If you want to contribute code to our chatbot, please follow these steps:

  1. Fork the repository and create a new branch for your changes.
  2. Make your changes and ensure that they follow our coding conventions.
  3. Test your changes to ensure that they work as expected.
  4. Submit a pull request with a clear description of your changes and the problem they solve.

We will review your pull request as soon as possible and provide feedback on any necessary changes. We appreciate your contributions and look forward to working with you!

Please note that all contributions are subject to review and approval by our project maintainers. We reserve the right to reject any contribution that does not align with our project goals or standards.

Future Plans

Here are some of the future plans for this project:

Enhanced control of chatbot parameters: We plan to improve the UI of the chatbot to allow users to control the parameters of the chatbot such as temperature and other variables. This will give users more control over the chatbot's responses, and allow for a more customized experience.

Extension system for plugins: We are also working on an extension system that will allow developers to create plugins for the chatbot. These plugins will be able to add new features and capabilities to the chatbot, and allow for greater customization of the chatbot's behavior.

Enhanced UI with themes and skins: Additionally, we plan to enhance the UI of the chatbot to allow for themes and skins. This will allow users to personalize the appearance of the chatbot and make it more visually appealing.

We are excited about these future plans for the project and look forward to implementing them in the near future. Stay tuned for updates!

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.