Locutusque
commited on
Commit
•
5871150
1
Parent(s):
fc19730
Update README.md
Browse files
README.md
CHANGED
@@ -51,7 +51,7 @@ special_tokens = {
|
|
51 |
}
|
52 |
tokenizer.add_special_tokens(special_tokens)
|
53 |
model.resize_token_embeddings(len(tokenizer))
|
54 |
-
model.load_state_dict(torch.load("
|
55 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
56 |
model.to(device)
|
57 |
def generate_text(model, tokenizer, prompt, max_length=1024):
|
|
|
51 |
}
|
52 |
tokenizer.add_special_tokens(special_tokens)
|
53 |
model.resize_token_embeddings(len(tokenizer))
|
54 |
+
model.load_state_dict(torch.load("path/to/model))
|
55 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
56 |
model.to(device)
|
57 |
def generate_text(model, tokenizer, prompt, max_length=1024):
|