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]: Allowing customization of model/wasm #16

Open
Neet-Nestor opened this issue May 20, 2024 · 5 comments
Open

[Feature Request]: Allowing customization of model/wasm #16

Neet-Nestor opened this issue May 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Neet-Nestor
Copy link
Collaborator

Neet-Nestor commented May 20, 2024

Solution Description

We need to be mindful of allowing customization of model/wasm, e.g, allow advanced users to provide their own set of app config that adds on to our builtin, this way users can upload run their own models

Alternatives Considered

No response

Additional Context

No response

@Neet-Nestor Neet-Nestor added the enhancement New feature or request label May 20, 2024
@PabloYG
Copy link

PabloYG commented Nov 18, 2024

Hi, is this possible now? I have tried to add a custom model to the model_list of the appConfig, but it will always return an error if the given custom model is not already present in the prebuilt app config.

I also read about the support of custom models through the MLC-LLM REST API. And maybe I am misunderstanding this feature, but wouldn't this mean the model is not being run locally within the browser but hosted on a server instead? Or will the webllm-chat client grab the model from the api endpoint and run it locally?

@Neet-Nestor
Copy link
Collaborator Author

@PabloYG Thanks for following up. I hasn't put this as my priority after supporting support of mlc-llm serve but I see why it might not be sufficient now. I can prioritize this work next and make a release soon.

You are right that hosting custom models using mlc-llm serve starts a local server and the app is communicating with the API endpoints directly instead of hosting the model in-browser locally.

I'm thinking of the following two implementations:

  1. Allow users uploading models to HuggingFaces then add model to WebLLM-Chat via HF url
  2. Allow users to upload models directly from local computer

I will start with the 1st one as it's an easier one, and delay the 2nd one. Please let me know if this meets your need or you have any other suggestion.

@scorpfromhell
Copy link

scorpfromhell commented Nov 19, 2024 via email

@PabloYG
Copy link

PabloYG commented Nov 19, 2024

Hey @Neet-Nestor thanks for the quick reply. The first option sounds like lower hanging fruit yes, although I agree with @scorpfromhell the second implementation could be incredibly useful. In fact, I suppose the ideal implementation would be an agnostic model loader, I could imagine some companies or researchers wanting to download models from their own hosting as well as uploading them from a local machine. That might fall outside of the scope of this app though, but figured I'd suggest it.

About implementation 1, I suggest adding a link to the documentation directly in the UI and making it clear to the user that the model repo in HF must comply with the standards set in that doc. If the HF url does not point to a compatible model repo, the MLCEngine will throw a somewhat cryptic Cache error when attempting to fetch. It took me a while to realize my HF repo was not properly set up.

Hope that's useful and thanks!

@Neet-Nestor
Copy link
Collaborator Author

About implementation 1, I suggest adding a link to the documentation directly in the UI and making it clear to the user that the model repo in HF must comply with the standards set in that doc. If the HF url does not point to a compatible model repo, the MLCEngine will throw a somewhat cryptic Cache error when attempting to fetch. It took me a while to realize my HF repo was not properly set up.

It's definitly helpful, thanks for the comments from both of you!

Loading local model files may require changes to the web-llm package itself, thus I will still first introduce the custom models via HF urls. But I will definitely keep local model files a must-do in the roadmap.

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

No branches or pull requests

3 participants