Spaces:
Sleeping
Sleeping
Smiley0707
commited on
Commit
•
155b4d7
1
Parent(s):
2f61516
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
6 |
import gradio as gr
|
7 |
from threading import Thread
|
8 |
|
9 |
-
MODEL_LIST = ["meta-llama/Meta-Llama-3.1-
|
10 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
11 |
-
MODEL = os.environ.get("MODEL_ID")
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
TITLE = "<h1><center>Meta-Llama3.1-405B</center></h1>"
|
16 |
|
17 |
PLACEHOLDER = """
|
18 |
<center>
|
@@ -41,9 +38,9 @@ quantization_config = BitsAndBytesConfig(
|
|
41 |
bnb_4bit_use_double_quant=True,
|
42 |
bnb_4bit_quant_type= "nf4")
|
43 |
|
44 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
45 |
model = AutoModelForCausalLM.from_pretrained(
|
46 |
-
|
47 |
torch_dtype=torch.bfloat16,
|
48 |
device_map="auto",
|
49 |
quantization_config=quantization_config)
|
|
|
6 |
import gradio as gr
|
7 |
from threading import Thread
|
8 |
|
9 |
+
MODEL_LIST = ["meta-llama/Meta-Llama-3.1-8B-Instruct"]
|
10 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
|
11 |
|
12 |
+
TITLE = "<h1><center>Meta-Llama3.1-8B</center></h1>"
|
|
|
|
|
13 |
|
14 |
PLACEHOLDER = """
|
15 |
<center>
|
|
|
38 |
bnb_4bit_use_double_quant=True,
|
39 |
bnb_4bit_quant_type= "nf4")
|
40 |
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
|
42 |
model = AutoModelForCausalLM.from_pretrained(
|
43 |
+
"meta-llama/Meta-Llama-3.1-8B-Instruct",
|
44 |
torch_dtype=torch.bfloat16,
|
45 |
device_map="auto",
|
46 |
quantization_config=quantization_config)
|