petals icon indicating copy to clipboard operation
petals copied to clipboard

compile to webassembly

Open Donovoi opened this issue 3 months ago • 3 comments

Hi Team,

I love your work,

I am thinking at a very early time in the morning that we could reach a wider audience if we compiled to webassembly as well as your normal current release.

this could possibly allow users who are restricted by orwellion group policies to simply browse to a site privately or in the main swarm and take advantage of the hardware support that webassembly offers.

I am not familiar with all of the petals project and all of the complexities of successfully compiling this project to webassembly, but ill give it a go and hopefully offer a pull request if it works.

Thanks again and let me know if this has already been considered as a nono

Donovoi avatar Mar 21 '24 15:03 Donovoi

It seems so far out of scope of the possibilities for webassembly. To run it needs gigabytes of python packages and 4GB or ram. If you make a docker image out of the health app it's 7GB, the chat app 9GB, let's start there.

JeremyMahieu avatar Mar 24 '24 11:03 JeremyMahieu

Hey @Donovoi I'm working on trying to use webgpu to host the model blocks (MLC-inspired) Wanna chat more on discord?

Priyanshupareek avatar Mar 28 '24 15:03 Priyanshupareek

Sounds good! I'm looking at possibly compiling with nuitka/py2wasm looks like they might have unpublished it so it may be unfinished - https://github.com/pypi-data/pypi-mirror-262/tree/code/packages/py2wasm/py2wasm-2.2rc1.tar.gz/py2wasm-2.2rc1

Donovoi avatar Apr 02 '24 18:04 Donovoi