Views
No views yet
| File | Params | Tokenizer | Description |
|---|---|---|---|
luffy_gpt.pth | 10.81M | char-level (96) | Base pretrained model (25k steps) |
luffy_gpt_finetuned.pth | 10.81M | char-level (96) | Fine-tuned with style tokens + SFT |
luffy_gpt_gpt2tok.pth | 49.39M | GPT-2 BPE (50,257) | Base pretrained with GPT-2 tokenizer (25k steps) |
luffy_gpt_gpt2tok_finetuned.pth | 49.39M | GPT-2 BPE (50,257) | Best model -- fine-tuned with SFT + EOS |
1# chat with best model (GPT-2 tokenizer)
2python gpt.py --input dataset/processed/corpus_clean.txt \
3 --eval luffy_gpt_gpt2tok_finetuned.pth --interactive --style 1 \
4 --temperature 0.8 --top-k 50 --top-p 0.9 --repetition-penalty 1.2 \
5 --gpt2-tokenizer
6
7# pretrain from scratch
8python gpt.py --input dataset/processed/corpus_clean.txt \
9 --train luffy_gpt_gpt2tok.pth --epoch 25000 --gpt2-tokenizer \
10 --warmup-steps 500 --weight-decay 0.1
11
12# fine-tune
13python gpt.py --input dataset/processed/corpus_clean.txt \
14 --finetune luffy_gpt_gpt2tok_finetuned.pth \
15 --sft-input dataset/luffy_sft.txt --pretrained luffy_gpt_gpt2tok.pth \
16 --epoch 10000 --lr 5e-5 --warmup-steps 200 --weight-decay 0.1 \
17 --gpt2-tokenizerYou: who are you?
Luffy: I'm Monkey D. Luffy!
You: are you scared?
Luffy: Nope.
You: are you okay?
Luffy: Not really.| Tokenizer | Vocab | 256 token context | Result |
|---|---|---|---|
| Character-level | 96 | ~40 words | val loss 1.23, garbled SFT |
| Custom BPE (SentencePiece) | 2,000 | ~125 words | overfitted, abandoned |
| GPT-2 BPE | 50,257 | ~100 words | best chatbot responses |