apartresearch / deepdecipher

🦠 DeepDecipher: An open source API to MLP neurons
https://apartresearch.com
MIT License
9 stars 0 forks source link

Create a binary API #89

Closed albertsgarde closed 1 year ago

albertsgarde commented 1 year ago

JSON is a terribly inefficient way of sending this kind of data compared to raw binary. Serving raw binary in raw requests makes for horrendous usability, but this is useful in two situations, each of which has their own GitHub issue. Firstly, with a bit of WASM, the frontend can use this API: #90 . Secondly, a Python package could be created which would make using the binary API even easier than using the JSON API directly: #91

albertsgarde commented 1 year ago

A quick test on my own computer running the server on localhost showed a 4x increase in RPS when using a binary interface. While lowered response size is the main benefit of the binary API, this shows that it would also lower pressure on the server CPU.