Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,13 @@
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import concurrent.futures
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
-
|
7 |
-
model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
10 |
|
@@ -133,7 +136,7 @@ interface = gr.Interface(
|
|
133 |
gr.Textbox(label="Min-p Sampling"),
|
134 |
],
|
135 |
title="Decoding Methods Comparison",
|
136 |
-
description="Each decoding method's final answer is printed as soon as it is done
|
137 |
)
|
138 |
|
139 |
if __name__ == "__main__":
|
|
|
1 |
+
"""
|
2 |
+
Fun little experiment, written with o3.
|
3 |
+
"""
|
4 |
+
|
5 |
import gradio as gr
|
6 |
import torch
|
7 |
import concurrent.futures
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
9 |
|
10 |
+
model_name = "gpt2"
|
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
13 |
|
|
|
136 |
gr.Textbox(label="Min-p Sampling"),
|
137 |
],
|
138 |
title="Decoding Methods Comparison",
|
139 |
+
description="Each decoding method's final answer is printed as soon as it is done. This uses GPT2."
|
140 |
)
|
141 |
|
142 |
if __name__ == "__main__":
|