The size of tensor a must match the size of tensor at non-singleton dimension #951
-
Good afternoon. There was a problem when I send 16 curl requests at the same time the application crashes Error: The size of tensor a (99) must match the size of tensor b (3) at non-singleton dimension 3 As the error appears, no more requests are processed Flask + Python 3.10 help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, it appears that you're calling the model from different threads. The model is not equipped for that, mainly because of the kv cache logic using the hooks. I'd suggest keep using the lock, if that's not too much of a slowdown. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the advice. But I have a server running, and I have to process audio and video files from two or more at the same time. Maybe there are some private solutions? |
Beta Was this translation helpful? Give feedback.
Hi, it appears that you're calling the model from different threads. The model is not equipped for that, mainly because of the kv cache logic using the hooks. I'd suggest keep using the lock, if that's not too much of a slowdown.