Spaces:
Build error
Build error
bankholdup
commited on
Commit
•
d1e2bd2
1
Parent(s):
4d0a9ee
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def load_model():
|
|
11 |
model_ckpt = "bankholdup/mgpt_song_writer"
|
12 |
tokenizer = GPT2Tokenizer.from_pretrained(model_ckpt)
|
13 |
# model = GPT2LMHeadModel.from_pretrained(model_ckpt)
|
14 |
-
model = GPT2LMHeadModel.from_pretrained(model_ckpt,
|
15 |
return tokenizer, model
|
16 |
|
17 |
def set_seed(rng=100000):
|
|
|
11 |
model_ckpt = "bankholdup/mgpt_song_writer"
|
12 |
tokenizer = GPT2Tokenizer.from_pretrained(model_ckpt)
|
13 |
# model = GPT2LMHeadModel.from_pretrained(model_ckpt)
|
14 |
+
model = GPT2LMHeadModel.from_pretrained(model_ckpt, torch_dtype=torch.float16, low_cpu_mem_usage=True)
|
15 |
return tokenizer, model
|
16 |
|
17 |
def set_seed(rng=100000):
|