Ravi theja K commited on
Commit
d9632d9
·
verified ·
1 Parent(s): a959cee

Update app.py

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