-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Cache] Support IndexedDB, add useIndexedDBCache in AppConfig #352
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
Member
|
Thank you! I will review soon today/tomorrow. |
Member
|
Depends on apache/tvm#16733 to be merged |
CharlieFRuan
added a commit
that referenced
this pull request
Apr 10, 2024
### Changes - Enable `webllm.AppConfig.useIndexedDBCache` so that user can choose between the Cache API and IndexedDB Cache - #352 - Refactor `ChatModule` to `Engine`, finalize OpenAI API to `engine.chat.completions.create()` to match that of OpenAI - #361 - Add deprecation warning of `engine.generate()`, suggesting user to use `engine.chat.completions.create()` - Subsequently, support implicit KVCache reuse for multi-round chat usage - Though `chat.completions.create()` is functional, hence requiring users to maintain all chat history, we will reuse KVs if we detect multi-round chat, hence not sacrificing any performance - See #359 and `examples/multi-round-chat` ### WASM Version WASMs are still `v0_2_30` as no compile-time changes are required. ### tvmjs Updated tvmjs to: - mlc-ai/relax@c7bdcab - i.e. apache/tvm@d1e24ca
This was referenced Apr 10, 2024
Closed
atebites-hub
pushed a commit
to atebites-hub/web-llm
that referenced
this pull request
Oct 4, 2025
…#352) Add `AppConfig.useIndexedDBCache` to optionally use IndexedDBCache rather than the default Cache API. Also add `examples/cache-usage` to demonstrate the usage of the two caches and cache utils such as deleting a model from cache. --------- Co-authored-by: Charlie Ruan <[email protected]>
atebites-hub
pushed a commit
to atebites-hub/web-llm
that referenced
this pull request
Oct 4, 2025
### Changes - Enable `webllm.AppConfig.useIndexedDBCache` so that user can choose between the Cache API and IndexedDB Cache - mlc-ai#352 - Refactor `ChatModule` to `Engine`, finalize OpenAI API to `engine.chat.completions.create()` to match that of OpenAI - mlc-ai#361 - Add deprecation warning of `engine.generate()`, suggesting user to use `engine.chat.completions.create()` - Subsequently, support implicit KVCache reuse for multi-round chat usage - Though `chat.completions.create()` is functional, hence requiring users to maintain all chat history, we will reuse KVs if we detect multi-round chat, hence not sacrificing any performance - See mlc-ai#359 and `examples/multi-round-chat` ### WASM Version WASMs are still `v0_2_30` as no compile-time changes are required. ### tvmjs Updated tvmjs to: - mlc-ai/relax@c7bdcab - i.e. apache/tvm@d1e24ca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
AppConfig.useIndexedDBCacheto optionally use IndexedDBCache rather than the default Cache API.Also add
examples/cache-usageto demonstrate the usage of the two caches and cache utils such as deleting a model from cache.