Update logits.py
Browse files
logits.py
CHANGED
@@ -11,7 +11,7 @@ class LogitsPredictor:
|
|
11 |
def setup(self, model_path="./"):
|
12 |
"""Load the model into memory to make running multiple predictions efficient"""
|
13 |
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
|
14 |
-
self.model = AutoModelForCausalLM.from_pretrained(model_path
|
15 |
self.separator = list(filter(lambda x: x != self.tokenizer.bos_token_id, self.tokenizer.encode("\n")))[0]
|
16 |
|
17 |
def quantiles(self, sorted_probs, ranks):
|
|
|
11 |
def setup(self, model_path="./"):
|
12 |
"""Load the model into memory to make running multiple predictions efficient"""
|
13 |
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
|
14 |
+
self.model = AutoModelForCausalLM.from_pretrained(model_path)
|
15 |
self.separator = list(filter(lambda x: x != self.tokenizer.bos_token_id, self.tokenizer.encode("\n")))[0]
|
16 |
|
17 |
def quantiles(self, sorted_probs, ranks):
|