Skip to content
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

Feature Request: JavaScript and WebAssembly Compatibility for Concrete-ML Client #925

Open
hbulgarini opened this issue Oct 23, 2024 · 2 comments

Comments

@hbulgarini
Copy link

hbulgarini commented Oct 23, 2024

We are building a PoC for a blockchain solution that allows negotiation and access to inferences from AI models encrypted with FHE, leveraging Zama’s Concrete-ML. A challenge we’re facing is that the client is only available in Python, making it incompatible with browsers. JavaScript or a WebAssembly equivalent solution are the only valid options for running the client in the browser, as due to the python libraries used in ConcreteML, the client.py cannot be compiled to WASM.

Enabling the client to run directly in the browser is crucial for ensuring user privacy from the outset. Since browsers are the main entry point for most cloud-based applications, securing data at this stage would allow users to maintain full control of their private interactions. Currently, with the Python-only client, the alternative solutions imply limitations:

  • Deploying client.py on a server requires users to send and receive data that could potentially be accessed by others, even if encrypted.

  • Requiring users to install a local service that embeds client.py, which is impractical for most users who prefer browser-based interactions.

The Python-only approach works well for scripts, command-line interfaces, Jupyter notebooks, or data science pipelines suitable for PoCs, demos, or internal workflows but not for end-user applications where privacy and ease of use are essential.

While JavaScript compatibility is our preferred solution for browser-based integration, using a Rust-based library like TFHE-rs compiled to WASM is a valid temporary solution. This would enable browser support while full JavaScript compatibility is being explored.

We believe that adding this feature to Concrete-ML is crucial, as it would greatly enhance the privacy, security, and usability of AI services for real-world applications, making it a key enabler for broader adoption and practical use.

Thank you for considering this request.

@jfrery
Copy link
Collaborator

jfrery commented Oct 23, 2024

Hi @hbulgarini,

Thanks for the feature request. This is something that is on our roadmap. We will let you know as soon as it is shipped.

@hbulgarini
Copy link
Author

Hi @hbulgarini,

Thanks for the feature request. This is something that is on our roadmap. We will let you know as soon as it is shipped.

Thank you very much. We have the flow already working for the existing client/server python setup, if you need a testing use case please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants