Crystalcareai
commited on
Update generate.py
Browse files- generate.py +4 -0
generate.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import torch
|
|
|
2 |
from transformers.utils import logging
|
3 |
from transformers.generation.utils import (
|
4 |
GenerationMixin,
|
@@ -8,6 +9,9 @@ from transformers.generation.utils import (
|
|
8 |
|
9 |
logger = logging.get_logger(__name__)
|
10 |
|
|
|
|
|
|
|
11 |
def custom_generate(
|
12 |
self,
|
13 |
input_ids,
|
|
|
1 |
import torch
|
2 |
+
from transformers import AutoTokenizer
|
3 |
from transformers.utils import logging
|
4 |
from transformers.generation.utils import (
|
5 |
GenerationMixin,
|
|
|
9 |
|
10 |
logger = logging.get_logger(__name__)
|
11 |
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("Crystalcareai/Quiet-Star-Custom")
|
13 |
+
model.tokenizer = tokenizer
|
14 |
+
|
15 |
def custom_generate(
|
16 |
self,
|
17 |
input_ids,
|