31
Browse files- app/requirements.txt +1 -2
- app/sample.py +2 -2
app/requirements.txt
CHANGED
|
@@ -3,5 +3,4 @@ numpy
|
|
| 3 |
transformers
|
| 4 |
wandb
|
| 5 |
tqdm
|
| 6 |
-
streamlit
|
| 7 |
-
tiktoken
|
|
|
|
| 3 |
transformers
|
| 4 |
wandb
|
| 5 |
tqdm
|
| 6 |
+
streamlit
|
|
|
app/sample.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
"""
|
| 2 |
Sample from a trained model
|
| 3 |
"""
|
|
|
|
|
|
|
| 4 |
import os
|
| 5 |
import pickle
|
| 6 |
from contextlib import nullcontext
|
|
@@ -8,8 +10,6 @@ import torch
|
|
| 8 |
import tiktoken
|
| 9 |
from model import GPTConfig, GPT
|
| 10 |
|
| 11 |
-
pip install tiktoken
|
| 12 |
-
|
| 13 |
# -----------------------------------------------------------------------------
|
| 14 |
init_from = 'resume' # either 'resume' (from an out_dir) or a gpt2 variant (e.g. 'gpt2-xl')
|
| 15 |
out_dir = 'out' # ignored if init_from is not 'resume'
|
|
|
|
| 1 |
"""
|
| 2 |
Sample from a trained model
|
| 3 |
"""
|
| 4 |
+
pip3 install tiktoken
|
| 5 |
+
|
| 6 |
import os
|
| 7 |
import pickle
|
| 8 |
from contextlib import nullcontext
|
|
|
|
| 10 |
import tiktoken
|
| 11 |
from model import GPTConfig, GPT
|
| 12 |
|
|
|
|
|
|
|
| 13 |
# -----------------------------------------------------------------------------
|
| 14 |
init_from = 'resume' # either 'resume' (from an out_dir) or a gpt2 variant (e.g. 'gpt2-xl')
|
| 15 |
out_dir = 'out' # ignored if init_from is not 'resume'
|