运行代码 airllm到 model = AirLLMLlama2("/home/user/models/Anima-7B-100K")这一句的时候,出现下面错误:
model = AirLLMLlama2("/home/user/models/Anima-7B-100K")
found index file...
found_layers:{'model.embed_tokens.': True, 'model.layers.0.': True, 'model.layers.1.': True, 'model.layers.2.': True, 'model.layers.3.': True, 'model.layers.4.': True, 'model.layers.5.': True, 'model.layers.6.': True, 'model.layers.7.': True, 'model.layers.8.': True, 'model.layers.9.': True, 'model.layers.10.': True, 'model.layers.11.': True, 'model.layers.12.': True, 'model.layers.13.': True, 'model.layers.14.': True, 'model.layers.15.': True, 'model.layers.16.': True, 'model.layers.17.': True, 'model.layers.18.': True, 'model.layers.19.': True, 'model.layers.20.': True, 'model.layers.21.': True, 'model.layers.22.': True, 'model.layers.23.': True, 'model.layers.24.': True, 'model.layers.25.': True, 'model.layers.26.': True, 'model.layers.27.': True, 'model.layers.28.': True, 'model.layers.29.': True, 'model.layers.30.': True, 'model.layers.31.': True, 'model.norm.': True, 'lm_head.': True}
saved layers already found in /home/user/models/Anima-7B-100K/splitted_model
>>>> Flash Attention installed
>>>> xentropy installed
>>>> Flash RoPE installed
new version of transfomer, no need to use BetterTransformer, try setting attn impl to sdpa...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/airllm/airllm.py", line 9, in __init__
super(AirLLMLlama2, self).__init__(*args, **kwargs)
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/airllm/airllm_base.py", line 127, in __init__
self.init_model()
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/airllm/airllm_base.py", line 202, in init_model
self.model = AutoModelForCausalLM.from_config(self.config, attn_implementation="sdpa", trust_remote_code=True)
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 438, in from_config
return model_class._from_config(config, **kwargs)
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1261, in _from_config
config = cls._autoset_attn_implementation(
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1336, in _autoset_attn_implementation
config = cls._check_and_enable_sdpa(
File "/home/user/anaconda3/envs/airllm/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1490, in _check_and_enable_sdpa
raise ValueError(
ValueError: LlamaForCausalLM does not support an attention implementation through torch.nn.functional.scaled_dot_product_attention yet. Please open an issue on GitHub to request support for this architecture: https://github.com/huggingface/transformers/issues/new
运行代码 airllm到 model = AirLLMLlama2("/home/user/models/Anima-7B-100K")这一句的时候,出现下面错误:
我的环境配置:
CUDA = 11.8