Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
·
59a98a5
1
Parent(s):
453baa6
explicit cot 20 digits
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ tokenizer = AutoTokenizer.from_pretrained(implicit_cot_model_name)
|
|
11 |
no_cot_model_name = 'yuntian-deng/gpt2-no-cot-multiplication'
|
12 |
no_cot_model = AutoModelForCausalLM.from_pretrained(no_cot_model_name)
|
13 |
|
14 |
-
explicit_cot_model_name = 'yuntian-deng/gpt2-explicit-cot-multiplication'
|
15 |
explicit_cot_model = AutoModelForCausalLM.from_pretrained(explicit_cot_model_name)
|
16 |
|
17 |
models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
|
@@ -20,7 +20,8 @@ models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explic
|
|
20 |
[model.eval() for model in models.values()]
|
21 |
|
22 |
# Constants
|
23 |
-
MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 960}
|
|
|
24 |
|
25 |
def preprocess(num):
|
26 |
num = str(num).strip().replace(' ', '')
|
|
|
11 |
no_cot_model_name = 'yuntian-deng/gpt2-no-cot-multiplication'
|
12 |
no_cot_model = AutoModelForCausalLM.from_pretrained(no_cot_model_name)
|
13 |
|
14 |
+
explicit_cot_model_name = 'yuntian-deng/gpt2-explicit-cot-multiplication-20-digits'
|
15 |
explicit_cot_model = AutoModelForCausalLM.from_pretrained(explicit_cot_model_name)
|
16 |
|
17 |
models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
|
|
|
20 |
[model.eval() for model in models.values()]
|
21 |
|
22 |
# Constants
|
23 |
+
#MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 960}
|
24 |
+
MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 1070}
|
25 |
|
26 |
def preprocess(num):
|
27 |
num = str(num).strip().replace(' ', '')
|