Skip to content

A simple Discord&Slack bot that runs LLM (Llama-3, Phi-3, Gemma-2, Mistral) and Stable Diffusion

License

Notifications You must be signed in to change notification settings

maruel/sillybot

Repository files navigation

Silly Bot

A simple Discord and Slack bot written in Go that natively serves LLM and Stable Diffusion to chat, generate images, and memes!

⚠️Warning⚠️ : This is a work in progress. There is no privacy control. Please file an issue for feature requests or bugs found.

I made a talk about it: youtu.be/uGkrjsMl-ok! sillybot

Usage

Type in chat:

/meme_auto sillybot meme generator awesome

Receive:

Meme Lord in Training

Talk with it and use its commands as described at:

Features

Hardware requirement

  • LLM: any <4 years old computer, really. A GPU is not required. If you are unsure, start with Qwen2 0.5B by using model: "qwen2-0_5b-instruct-q5_k_m" in the llm: section of config.yml. This requires 1GiB of RAM. Go up with larger models from there.
    • I recommend to chat with the bot, use the /metrics command and iterate to use increasingly larger models as long as you can keep >=200tok/s for prompt parsing and >=20tok/s for generation.
    • When using models with large context window (>8K) like Llama 3.1 and Mistral Nemo, you may want to explicitly limit the context window to a smaller size like 16384, 32768 or 65536 so it reduces memory requirements. Counter-intuitively, reducing the context window too much will slow down generation.
  • Image Generation: a nVidia GPU with 6GiB of video memory (VRAM) (12GiB is better) or a MacBook Pro. While it works on CPU, expect a minute or two to generate each image.

Pro-tip: You can use 2 computers: one running the LLM and one the image generation! Start the llm/imagegen server manually then use the remote: option in config.yml.

Installation

Both function essentially the same but the Application configuration on the server (Discord or Slack) is different:

Dev

Go Reference codecov

Acknowledgements

This project greatly benefit from llama.cpp by Georgi Gerganov, previous versions leveraged llamafile by Justine Tunney, all open source contributors and all the companies providing open-weights models.

Author

sillybot was created with ❤️️ and passion by Marc-Antoine Ruel.

About

A simple Discord&Slack bot that runs LLM (Llama-3, Phi-3, Gemma-2, Mistral) and Stable Diffusion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages