File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ now you will need to use our forks.
12
12
13
13
``` bash
14
14
deepspeed> =0.14.2
15
- git+git://github.com/Snowflake-Labs/transformers.git@arctic
16
15
git+git://github.com/Snowflake-Labs/vllm.git@arctic
17
16
huggingface_hub[hf_transfer]
18
17
```
@@ -39,14 +38,19 @@ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
39
38
import torch
40
39
from transformers import AutoModelForCausalLM, AutoTokenizer
41
40
from transformers.models.arctic.configuration_arctic import ArcticQuantizationConfig
41
+ from deepspeed.linear.config import QuantizationConfig
42
42
43
- tokenizer = AutoTokenizer.from_pretrained(" Snowflake/snowflake-arctic-instruct" )
43
+ tokenizer = AutoTokenizer.from_pretrained(
44
+ " Snowflake/snowflake-arctic-instruct" ,
45
+ trust_remote_code = True
46
+ )
44
47
45
- quant_config = ArcticQuantizationConfig (q_bits = 8 )
48
+ quant_config = QuantizationConfig (q_bits = 8 )
46
49
47
50
model = AutoModelForCausalLM.from_pretrained(
48
51
" Snowflake/snowflake-arctic-instruct" ,
49
52
low_cpu_mem_usage = True ,
53
+ trust_remote_code = True ,
50
54
device_map = " auto" ,
51
55
ds_quantization_config = quant_config,
52
56
max_memory = {i: " 150GiB" for i in range (8 )},
You can’t perform that action at this time.
0 commit comments