karpathy / minGPT

A minimal PyTorch re-implementation of the OpenAI GPT (Generative Pretrained Transformer) training
MIT License
19.94k stars 2.47k forks source link

Stop words? #104

Open BoyuanJackChen opened 1 year ago

BoyuanJackChen commented 1 year ago

I realize that there isn't an implementation of stop words in the code yet, so the generation will go all the way till it reaches max length. Any idea how to add stop words in the generation process without fine-tuning the pretrained models?