Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
|
7 |
import time
|
8 |
|
9 |
-
model_id = "facebook/opt-
|
10 |
assistant_id = "facebook/opt-125m"
|
11 |
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
@@ -56,7 +56,7 @@ def reset_textbox():
|
|
56 |
with gr.Blocks() as demo:
|
57 |
gr.Markdown(
|
58 |
"# 🤗 Assisted Generation Demo\n"
|
59 |
-
f"- Model: {model_id} (BF16, ~
|
60 |
f"- Assistant Model: {assistant_id} (BF16, ~0.3GB)\n"
|
61 |
"- Running on a T4 GPU\n"
|
62 |
"- Best results are obtained when the model size difference in parameters is >10x"
|
|
|
6 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
|
7 |
import time
|
8 |
|
9 |
+
model_id = "facebook/opt-6.7b"
|
10 |
assistant_id = "facebook/opt-125m"
|
11 |
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
|
|
56 |
with gr.Blocks() as demo:
|
57 |
gr.Markdown(
|
58 |
"# 🤗 Assisted Generation Demo\n"
|
59 |
+
f"- Model: {model_id} (BF16, ~14GB)\n"
|
60 |
f"- Assistant Model: {assistant_id} (BF16, ~0.3GB)\n"
|
61 |
"- Running on a T4 GPU\n"
|
62 |
"- Best results are obtained when the model size difference in parameters is >10x"
|