Fix TransformersModelManager: Prevents crash by dispatching model on all GPUs#10
Fix TransformersModelManager: Prevents crash by dispatching model on all GPUs#10vectrozz wants to merge 2 commits into
Conversation
…with_model function. Free memory properly in clear_model function
|
Thanks for the PR. I see that the previous behaviour is not maintained, if you change this we can proceed! By the way, the approach is correct and perfect, if you can make this change it'd be perfect. To debug and test you can make multiple requests to different models and verify the time it takes to clear and load the model: it should not take more than 2-3 seconds (that is actually a lot) |
|
Thank you for your reply. Whatever the model I call (casperhansen/mistral-small-24b-instruct-2501-awq , Qwen/QwQ-32B-AWQ , Example : curl -X POST http://192.168.x.xxx:8888/run ==> Deepseek response |
add "import gc"
Thank you |
Enable multi GPU usage in swicth_model function. Free memory properly in clear_model function