mlc-llm
                                
                                
                                
                                    mlc-llm copied to clipboard
                            
                            
                            
                        [Question] How do you convert .bin files to wasm. Also where are TVM_HOME and MLC_HOME located?
❓ General Questions
Hi there, from this documentation: https://llm.mlc.ai/docs/install/emcc.html#step-2-set-tvm-home-and-mlc-llm-home
Where do you find the paths for these two items, are they part of the python package or must they be installed as seperate packages?
export TVM_HOME=/path/to/3rdparty/tvm
export MLC_LLM_HOME=/path/to/mlc-llm
Also would you guys happen to know how do I build a .wasm build from the .bin files as well! Thanks :)
clone the repo TVM is in https://github.com/mlc-ai/mlc-llm/tree/main/3rdparty MLC_LLM is there, too
here's some of the output of mlc_llm compile --help
 --output OUTPUT, -o OUTPUT The path to the output file. The suffix determines if the output file is a shared library or objects. Available suffixes: 1) Linux: .so (shared), .tar (objects); 2) macOS: .dylib (shared), .tar (objects); 3) Windows: .dll (shared), .tar (objects); 4) Android, iOS: .tar (objects); 5) Web: .wasm (web assembly). (required)
after you have EMSDK installed per your directions up there, you should be able to build a WASM binary
MLC_HOME
clone the repo TVM is in https://github.com/mlc-ai/mlc-llm/tree/main/3rdparty MLC_LLM is there, too
here's some of the output of mlc_llm compile --help
--output OUTPUT, -o OUTPUT The path to the output file. The suffix determines if the output file is a shared library or objects. Available suffixes: 1) Linux: .so (shared), .tar (objects); 2) macOS: .dylib (shared), .tar (objects); 3) Windows: .dll (shared), .tar (objects); 4) Android, iOS: .tar (objects); 5) Web: .wasm (web assembly). (required)after you have EMSDK installed per your directions up there, you should be able to build a WASM binary
So this wouldn't work with the direct pip installs for MLC right, I would have to build it from scratch instead to get a working MLC build for WASM
you can use the pip insall, but still need to obtain a copy of the source code