1
0
Fork 0
mirror of https://gitlab.com/niansa/discord_llama.git synced 2025-03-06 20:48:25 +01:00
No description
Find a file
2023-05-16 21:16:03 +02:00
anyproc@e1a72334e0 Updated for latest justlm 2023-05-16 21:14:39 +02:00
cosched@9d1047be54 Updated for latest justlm 2023-05-16 21:14:39 +02:00
DPP Don't submodule DPP 2023-04-29 10:49:24 +02:00
example_models Added emits_eos to gpt4all-unfiltered example 2023-05-06 07:36:02 +00:00
fmt Added fmt 2023-04-24 22:19:45 +02:00
libjustlm@4c4ef9e441 Switch to justlm master branch 2023-05-16 21:16:03 +02:00
sqlite_modern_cpp Added tons of features including thread creation 2023-04-25 15:55:46 +02:00
.gitignore Initial commit 2023-03-19 21:09:15 +01:00
.gitmodules Switch to justlm master branch 2023-05-16 21:16:03 +02:00
CMakeLists.txt Updated for latest justlm 2023-05-16 21:14:39 +02:00
config.cpp Fixed typo "weight" -> "weights" 2023-05-01 17:42:44 +02:00
config.hpp Make sure to now throw in coroutines 2023-05-10 21:52:14 +02:00
Dockerfile Updated Dockerfile to use Debian Bookworm 2023-05-07 12:59:08 +02:00
example_config.txt Made status texts configurable 2023-04-30 00:52:12 +02:00
example_instruct_prompt.txt Added example instruct prompt 2023-04-25 18:22:23 +02:00
example_prompt.txt Added example prompt file 2023-04-24 22:36:42 +02:00
example_texts.txt Made status texts configurable 2023-04-30 00:52:12 +02:00
explained_config.txt Updated explained_config.txt 2023-05-06 10:38:30 +02:00
LICENSE Add LICENSE 2023-04-20 06:21:05 +00:00
main.cpp Updated for latest justlm 2023-05-16 21:14:39 +02:00
Random.hpp Initial commit 2023-03-19 21:09:15 +01:00
README.md Added proper README.md 2023-04-28 16:43:02 +00:00
utils.cpp Fixed utils::max_words cutting off the string too early 2023-04-29 21:52:55 +02:00
utils.hpp Reorganization and added experimental thread embeds 2023-04-29 21:26:13 +02:00

Discord LLaMa

A funny and multi-lingual Discord bot using LLaMa!

Overview

This Discord bot lets you use GPT-J and LLaMa models to both participate in your conversations and answer your questions in thread channels, in a ChatGPT-like fashion!

Setup

On a fresh Debian 11 install, you'll need the following packages: git g++ make cmake zlib1g-dev libssl-dev libsqlite3-dev. For better performance with large batch sizes, libopenblas-dev is recommended.

Then, you can clone this repository including all its submodules:

git clone https://gitlab.com/niansa/discord_llama.git --recursive

Once the command has completed, create a build directory, configure the project and compile it:

cd discord_llama
mkdir build
cd build
cmake ..
make -j$(nproc)

We should now download a model. Let's start with gpt4all-j-v1.3-groovy! I've already written an example model config for it, so let's just grab that and download the model:

mkdir models
cd models
cp ../../example_models/gpt4all-j-v1.3-groovy.txt .
wget https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin
cd ..

Next, we need a configuration file. Let's just grab the example config:

cp ../example_config.txt ./config.txt

and edit it. For reference, you can read explained_config.txt.

Please note that gpt4all-j-v1.3-groovy is only capable of instruct mode, so you'll have to set threads_only to true, if you've downloaded just that model.

Finally, start the Discord Bot by passing the config file to the executable:

./discord_llama config.txt

And that's it! Feel free to play around, try different models, tweak the config file, etc... It's really easy! If you still have any questions, please write an issue or contact me on Discord: Tuxifan#0981.

Credits

A huge thank you to Nomic AI for helping me get this project to where it is now! Also, this project wouldn't have been possible without the effort of Georgi Gerganov (ggerganov), who has writte the core of it all, the inference code itself.