You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@localhost:/opt/AI# CUDA_VISIBLE_DEVICES=3 python Baichuan2/awq_chat.py
Xformers is not installed correctly. If you want to use memory_efficient_attention to accelerate training use the following command to install Xformers
pip install xformers.
Replacing layers...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:02<00:00, 10.70it/s]
Fusing layers...: 0%| | 0/32 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/opt/AI/Baichuan2/awq_chat.py", line 7, in
model = AutoAWQForCausalLM.from_quantized(quant_path, fuse_layers=True)
File "/usr/local/lib/python3.9/site-packages/awq/models/auto.py", line 94, in from_quantized
return AWQ_CAUSAL_LM_MODEL_MAP[model_type].from_quantized(
File "/usr/local/lib/python3.9/site-packages/awq/models/base.py", line 434, in from_quantized
self.fuse_layers(model)
File "/usr/local/lib/python3.9/site-packages/awq/models/baichuan.py", line 19, in fuse_layers
fuser.fuse_transformer()
File "/usr/local/lib/python3.9/site-packages/awq/models/baichuan.py", line 113, in fuse_transformer
module.input_layernorm.weight, module.input_layernorm.epsilon
File "/usr/local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1709, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'RMSNorm' object has no attribute 'epsilon'
inference code:
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer, TextStreamer
prompt = "You're standing on the surface of the Earth. "
"You walk one mile south, one mile west and one mile north. "
"You end up exactly where you started. Where are you?"
The text was updated successfully, but these errors were encountered:
root@localhost:/opt/AI# CUDA_VISIBLE_DEVICES=3 python Baichuan2/awq_chat.py
Xformers is not installed correctly. If you want to use memory_efficient_attention to accelerate training use the following command to install Xformers
pip install xformers.
Replacing layers...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:02<00:00, 10.70it/s]
Fusing layers...: 0%| | 0/32 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/opt/AI/Baichuan2/awq_chat.py", line 7, in
model = AutoAWQForCausalLM.from_quantized(quant_path, fuse_layers=True)
File "/usr/local/lib/python3.9/site-packages/awq/models/auto.py", line 94, in from_quantized
return AWQ_CAUSAL_LM_MODEL_MAP[model_type].from_quantized(
File "/usr/local/lib/python3.9/site-packages/awq/models/base.py", line 434, in from_quantized
self.fuse_layers(model)
File "/usr/local/lib/python3.9/site-packages/awq/models/baichuan.py", line 19, in fuse_layers
fuser.fuse_transformer()
File "/usr/local/lib/python3.9/site-packages/awq/models/baichuan.py", line 113, in fuse_transformer
module.input_layernorm.weight, module.input_layernorm.epsilon
File "/usr/local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1709, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'RMSNorm' object has no attribute 'epsilon'
inference code:
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer, TextStreamer
quant_path = "/opt/AI/models/Baichuan2-7B-Chat-awq"
Load model
model = AutoAWQForCausalLM.from_quantized(quant_path, fuse_layers=True)
tokenizer = AutoTokenizer.from_pretrained(quant_path, trust_remote_code=True)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
print(model)
prompt_template = "<reserved_106>{prompt}<reserved_107>"
prompt = "You're standing on the surface of the Earth. "
"You walk one mile south, one mile west and one mile north. "
"You end up exactly where you started. Where are you?"
The text was updated successfully, but these errors were encountered: