Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ import numpy as np
|
|
14 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
15 |
#from torch.nn.functional import softmax
|
16 |
|
|
|
17 |
# just for the sake of this demo, we use cloze prob to initialize the hypothesis
|
18 |
|
19 |
#url = "https://github.com/simonepri/lm-scorer/tree/master/lm_scorer/models"
|
@@ -53,8 +54,14 @@ def get_sim(x):
|
|
53 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
54 |
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
|
60 |
#tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
|
|
14 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
15 |
#from torch.nn.functional import softmax
|
16 |
|
17 |
+
|
18 |
# just for the sake of this demo, we use cloze prob to initialize the hypothesis
|
19 |
|
20 |
#url = "https://github.com/simonepri/lm-scorer/tree/master/lm_scorer/models"
|
|
|
54 |
#tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
55 |
|
56 |
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Llama-3.2-1B-GGUF")
|
61 |
+
model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Llama-3.2-1B-GGUF")
|
62 |
+
|
63 |
+
# tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")
|
64 |
+
# model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B")
|
65 |
|
66 |
|
67 |
#tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|