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-07-05 19:08:02 +02:00
anyproc@9f9bbf71cc Updated anyproc 2023-07-05 19:08:02 +02:00
cosched@671bdb57be Updated cosched 2023-05-22 23:58:24 +02:00
DPP Don't submodule DPP 2023-04-29 10:49:24 +02:00
example_models nous-hermes.txt -> nous-hermes-13b.txt 2023-06-07 00:43:59 +00:00
fmt Added fmt 2023-04-24 22:19:45 +02:00
libjustlm@8d9e7e985f Updated submodules 2023-07-05 19:05:21 +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 Disabled sanitizers 2023-05-19 22:24:07 +02:00
config.cpp Removed debug line from Configuration::parse_config() 2023-06-09 18:08:10 +00:00
config.hpp Added random response chance and guard translator with a mutex 2023-05-22 22:55:59 +02:00
Dockerfile Updated Dockerfile to use Debian Bookworm 2023-05-07 12:59:08 +02:00
example_config.txt Added random response chance and guard translator with a mutex 2023-05-22 22:55:59 +02:00
example_instruct_prompt.txt Suggest use of Markdown in example_instruct_prompt.txt 2023-05-26 17:24:43 +00: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 Added random response chance and guard translator with a mutex 2023-05-22 22:55:59 +02:00
LICENSE Add LICENSE 2023-04-20 06:21:05 +00:00
main.cpp Limit message length properly 2023-05-25 11:45:31 +02: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.