Spaces:
Build error
Build error
Ravi theja K
commited on
Commit
•
91c1bb8
1
Parent(s):
acc995d
Update app.py
Browse files
app.py
CHANGED
@@ -3,20 +3,22 @@ import os
|
|
3 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
4 |
|
5 |
import torch
|
6 |
-
|
7 |
-
from transformers import
|
|
|
8 |
from deepspeed.linear.config import QuantizationConfig
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
|
12 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
13 |
-
#tokenizer = LlamaTokenizer.from_pretrained(
|
14 |
-
"Snowflake/snowflake-arctic-instruct",
|
15 |
-
trust_remote_code=True
|
16 |
-
)
|
17 |
quant_config = QuantizationConfig(q_bits=8)
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
19 |
-
#model = LlamaForCausalLM.from_pretrained(
|
20 |
"Snowflake/snowflake-arctic-instruct",
|
21 |
trust_remote_code=True,
|
22 |
low_cpu_mem_usage=True,
|
|
|
3 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
4 |
|
5 |
import torch
|
6 |
+
from transformers import AutoModelForCausalLM
|
7 |
+
from transformers import pipeline
|
8 |
+
#from transformers import AutoModelForCausalLM, AutoTokenizer
|
9 |
from deepspeed.linear.config import QuantizationConfig
|
10 |
|
11 |
+
# Load model directly
|
12 |
+
#model = AutoModelForCausalLM.from_pretrained("Snowflake/snowflake-arctic-instruct", trust_remote_code=True)
|
13 |
+
|
14 |
+
|
15 |
+
pipe = pipeline("text-generation", model="Snowflake/snowflake-arctic-instruct", trust_remote_code=True)
|
16 |
+
|
17 |
+
#tokenizer = AutoTokenizer.from_pretrained("Snowflake/snowflake-arctic-instruct",trust_remote_code=True)
|
18 |
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
quant_config = QuantizationConfig(q_bits=8)
|
21 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
22 |
"Snowflake/snowflake-arctic-instruct",
|
23 |
trust_remote_code=True,
|
24 |
low_cpu_mem_usage=True,
|