Skip to content
discord bot, but its gpt-2
Python Shell
Branch: master
Clone or download
Pull request Compare This branch is 15 commits ahead, 2 commits behind itsmehemant123:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

GPT-2 Discord Bot


  • Install dependencies with:
pip install -r requirements.txt
  • Run the script by:
sh 117M

This should download the gpt-2 model. 117M is the smallest model, 345M is a larger variant.

  • Create config folder

  • Create servers folder in config folder

  • Create auth.json, and place it inside the config folder. Its content should be:

   "token": "<your_token>",
   "client_id": "<client_id>"

How to run

  • Run the script with:
  • use it!
!talk Complete this sentence
!talk (No text here to generate unconditional sample)


Each server gets its own Tensorflow session with its own model. This gives every server the opportunity to use it's own GPT-2 model.
The !setconfig command sets the neccessary parameters!
Only user with message managing permissions on the respective servers can user the following commands:

!setconfig <nsamples> <length> <temperature> <topk> <model: 117M or 345M>

!default resets the settings for the server to the default settings nsamples=1, length=200, temperature=1, top_k=0, model=117M


  • Enable finetuning.
You can’t perform that action at this time.