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

Add web page for the MNIST example #190

Merged
merged 1 commit into from
May 24, 2023
Merged

Conversation

rgerganov
Copy link
Collaborator

The web page is using WASM for model inference.
Users can draw digits on an HTML canvas and load random digits from the MNIST dataset.

The web page is using WASM for model inference.
Users can draw digits on an HTML canvas and load random digits from the
MNIST dataset.
@rgerganov
Copy link
Collaborator Author

Right now I build this with:

cd examples/mnist
emcc -I../../include -I../../include/ggml -I../../examples ../../src/ggml.c main.cpp -o web/mnist.js -s EXPORTED_FUNCTIONS='["_wasm_eval","_wasm_random_digit","_malloc","_free"]' -s EXPORTED_RUNTIME_METHODS='["ccall"]' -s ALLOW_MEMORY_GROWTH=1 --preload-file models/mnist

I need to figure out how to integrate it in the CMake build

@ggerganov ggerganov merged commit 42bfaaf into ggerganov:master May 24, 2023
@matthoffner
Copy link

@rgerganov thanks for your example I was able to get it to build with the starcoder example: https://huggingface.co/spaces/matthoffner/ggml-maker/blob/main/examples/wasm-starcoder.Dockerfile

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

Successfully merging this pull request may close these issues.

None yet

3 participants