DeepSpeed-MII icon indicating copy to clipboard operation
DeepSpeed-MII copied to clipboard

Performance of RESTful API

Open kihanc opened this issue 7 months ago • 9 comments

I have measured the performance of Mistral 7B w/ and w/o Restful API, and got 7.1 reqs/s and 0.48 reqs/s individually. (avg. input/output tokens: 232/208, A100 80GB)

kihanc avatar Nov 23 '23 10:11 kihanc

Hi @kihanc we are aware of performance issues related to the restful API and will be providing an update on this feature soon. Thanks

mrwyattii avatar Nov 27 '23 17:11 mrwyattii

@kihanc please try with the latest main branch. I have made improvements that allow us to match performance the RESTful API to our Python API (see #328).

mrwyattii avatar Nov 28 '23 00:11 mrwyattii

@kihanc please try with the latest main branch. I have made improvements that allow us to match performance the RESTful API to our Python API (see #328).

Hey, how can I make Restful start and listen on 0.0.0.0 instead of localhost? I often encounter situations where I deploy my application on a remote machine but cannot test it using external API tools like Postman because it only listens on localhost.

BaiMoHan avatar Nov 28 '23 07:11 BaiMoHan

@kihanc please try with the latest main branch. I have made improvements that allow us to match performance the RESTful API to our Python API (see #328).

Hey, how can I make Restful start and listen on 0.0.0.0 instead of localhost? I often encounter situations where I deploy my application on a remote machine but cannot test it using external API tools like Postman because it only listens on localhost.

I think it's using localhost by default and there is no option to set it, you can modify this file locally until they add an option to set the hostname

PawanOsman avatar Nov 28 '23 07:11 PawanOsman

@kihanc please try with the latest main branch. I have made improvements that allow us to match performance the RESTful API to our Python API (see #328).

Hey, how can I make Restful start and listen on 0.0.0.0 instead of localhost? I often encounter situations where I deploy my application on a remote machine but cannot test it using external API tools like Postman because it only listens on localhost.

I think it's using localhost by default and there is no option to set it, you can modify this file locally until they add an option to set the hostname

Thank you!

BaiMoHan avatar Nov 28 '23 08:11 BaiMoHan

@mrwyattii Thanks for the quick update! Your test code works perfectly on our end. But, if we hit more than 100 requests at once, things get wonky and connections are reset. It would be awesome if you could add support for concurrent connections on your API server.

kihanc avatar Dec 19 '23 02:12 kihanc

@kihanc if you increase the number of restful_processes (which defaults to 32) does that help? Perhaps try 64?

mii.serve(model_name, restful_processes=64, enable_restful_api=True)

mrwyattii avatar Dec 19 '23 17:12 mrwyattii

@mrwyattii I already tried that before but that was not helpful.

kihanc avatar Dec 20 '23 00:12 kihanc

Do we have any updates on this issue? I am also observing "Connection reset" failures when request rate is high

IKACE avatar Apr 17 '24 08:04 IKACE