Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
·
c03e8f2
1
Parent(s):
55c1b23
app.py
CHANGED
@@ -17,7 +17,7 @@ explicit_cot_model = AutoModelForCausalLM.from_pretrained(explicit_cot_model_nam
|
|
17 |
models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
|
18 |
|
19 |
# Constants
|
20 |
-
MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit':
|
21 |
|
22 |
def preprocess(num):
|
23 |
num = str(num).strip().replace(' ', '')
|
@@ -141,8 +141,6 @@ demo = gr.Interface(
|
|
141 |
gr.HighlightedText(label='No CoT Prediction', combine_adjacent=False, show_legend=False, color_map=color_map, show_inline_category=False),
|
142 |
gr.HighlightedText(label='Explicit CoT Steps & Prediction', combine_adjacent=False, show_legend=False, color_map=color_map, show_inline_category=False),
|
143 |
],
|
144 |
-
title='Predicting Multiplication with GPT-2: Implicit vs. Explicit CoT',
|
145 |
-
description='This demo showcases GPT-2\'s ability to directly predict the product of two large numbers without intermediate steps, using our stepwise internalization method. Compare the performance of implicit CoT (our method), no CoT, and explicit CoT. Implicit CoT offers accuracy and speed, while explicit CoT provides detailed reasoning but is slower.',
|
146 |
clear_btn=None,
|
147 |
submit_btn="Multiply!",
|
148 |
live=False,
|
|
|
17 |
models = {'implicit': implicit_cot_model, 'no': no_cot_model, 'explicit': explicit_cot_model}
|
18 |
|
19 |
# Constants
|
20 |
+
MAX_PRODUCT_DIGITS_PER_MODEL = {'implicit': 100, 'no': 100, 'explicit': 960}
|
21 |
|
22 |
def preprocess(num):
|
23 |
num = str(num).strip().replace(' ', '')
|
|
|
141 |
gr.HighlightedText(label='No CoT Prediction', combine_adjacent=False, show_legend=False, color_map=color_map, show_inline_category=False),
|
142 |
gr.HighlightedText(label='Explicit CoT Steps & Prediction', combine_adjacent=False, show_legend=False, color_map=color_map, show_inline_category=False),
|
143 |
],
|
|
|
|
|
144 |
clear_btn=None,
|
145 |
submit_btn="Multiply!",
|
146 |
live=False,
|