-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'NoneType' object has no attribute '_parameters' during model dispatch in Docker environment #9
Comments
That's an issue with |
@thebazshah is work but 2024-09-10 17:39:10 nveagle-eagle-x5-13b-chat-1 | /usr/local/lib/python3.10/site-packages/transformers/generation/utils.py:1375: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use and modify the model generation configuration (see https://huggingface.co/docs/transformers/generation_strategies#default-text-generation-configuration ) Unexpected Keyword Argument Error: When attempting to generate text, the system throws a TypeError, indicating an unexpected keyword argument 'cache_position' in the forward call. I have seen the same error in other language models. I tried changing the version but still can't solve it. |
I am encountering an
AttributeError
when trying to deploy thenveagle-eagle-x5-13b-chat
model using Docker. The error occurs deep within theaccelerate
library's hook management, specifically when trying to attach or detach hooks for device alignment. Here is the error trace:Traceback (most recent call last): File "/home/user/app/app.py", line 47, in tokenizer, model, image_processor, context_len = load_pretrained_model(... ... File "/usr/local/lib/python3.10/site-packages/accelerate/hooks.py", line 313, in detach_hook set_module_tensor_to_device(module, name, device, value=self.weights_map.get(name, None)) File "/usr/local/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 261 if tensor_name not in module._parameters and tensor_name not in module._buffers: AttributeError: 'NoneType' object has no attribute '_parameters'
The error suggests that a module expected to have parameters and buffers is
None
at the time of the hook operation. This issue arises specifically when deploying via Docker with the command:docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all registry.hf.space/nveagle-eagle-x5-13b-chat
python app.py
Any insights or suggestions on how to address this issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: