Spaces:
Running
on
Zero
Running
on
Zero
aixsatoshi
commited on
Commit
•
137748f
1
Parent(s):
436e224
Update app.py
Browse files
app.py
CHANGED
@@ -6,19 +6,19 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
6 |
import gradio as gr
|
7 |
from threading import Thread
|
8 |
|
9 |
-
model_id = "
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
11 |
model = AutoModelForCausalLM.from_pretrained(
|
12 |
model_id,
|
13 |
-
torch_dtype=torch.
|
14 |
device_map="auto",
|
15 |
use_flash_attention_2=True,
|
16 |
)
|
17 |
|
18 |
-
TITLE = "<h1><center>
|
19 |
|
20 |
DESCRIPTION = """
|
21 |
-
<h3>MODEL: <a href="https://huggingface.co/
|
22 |
<center>
|
23 |
<p>This model is designed for conversational interactions.</p>
|
24 |
</center>
|
|
|
6 |
import gradio as gr
|
7 |
from threading import Thread
|
8 |
|
9 |
+
model_id = "ibm-granite/granite-3.0-8b-instruct"
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
11 |
model = AutoModelForCausalLM.from_pretrained(
|
12 |
model_id,
|
13 |
+
torch_dtype=torch.bfloat16,
|
14 |
device_map="auto",
|
15 |
use_flash_attention_2=True,
|
16 |
)
|
17 |
|
18 |
+
TITLE = "<h1><center>ibm-granite/granite-3.0-8b-instruct Chat webui</center></h1>"
|
19 |
|
20 |
DESCRIPTION = """
|
21 |
+
<h3>MODEL: <a href="https://huggingface.co/ibm-granite/granite-3.0-8b-instruct">ibm-granite/granite-3.0-8b-instruct</a></h3>
|
22 |
<center>
|
23 |
<p>This model is designed for conversational interactions.</p>
|
24 |
</center>
|