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