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

Improvement: Add a Local Model Manager to application #9

Open
rmusser01 opened this issue May 6, 2024 · 5 comments
Open

Improvement: Add a Local Model Manager to application #9

rmusser01 opened this issue May 6, 2024 · 5 comments
Labels
feature help wanted Extra attention is needed p2

Comments

@rmusser01
Copy link

As a user, I'd like to be able to use the application, and have it load a model I have already downloaded previously.

@bakkot
Copy link

bakkot commented May 6, 2024

Upstream issue: mlc-ai/web-llm#282

@abi
Copy link
Owner

abi commented May 6, 2024

Might already be possible with web-llm. Documention isn't clear but this example seems to allow model uploads: https://github.com/mlc-ai/web-llm/tree/main/examples/simple-chat-upload

@bakkot
Copy link

bakkot commented May 6, 2024

That example "uploads" the model to IndexDB, which means it creates a copy of the whole thing on disk instead of merely reading it into memory. For large models that's pretty expensive.

@abi
Copy link
Owner

abi commented May 6, 2024

Ah I see. While it would be ideal to not duplicate the storage, I think not having to download from the internet is still a win. Happy to support both options here.

@abi
Copy link
Owner

abi commented May 9, 2024

From @youhogeon in #18,

Our company uses a closed network. All files from external sources must be imported via USB(or an equivalent method).

So, first, I download the wasm file and parameters of model, import them into a closed network, and then temporarily modify the App.tsx file as follows.

However, I hope it will help you set up your model in a better way.

Thank you again for releasing your great code as open source.

const appConfig = webllm.prebuiltAppConfig;
appConfig.model_list = [
{
"model_url": "/models/Llama-3-8B-Instruct-q4f16_1-MLC/",
"model_id": "Llama-3-8B-Instruct-q4f16_1",
"model_lib_url": '/models/Llama-3-8B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm',
"vram_required_MB": 4598.34,
"low_resource_required": true,
},
]
appConfig.useIndexedDBCache = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Extra attention is needed p2
Projects
None yet
Development

No branches or pull requests

3 participants