Giter Site home page Giter Site logo

Comments (11)

tqchen avatar tqchen commented on June 18, 2024 3

Sorry for chiming in late. For the caching layer, ideally we would like something that comes with minimal dependency. Spefically, we should:

  • Make ArtifactCache https://github.com/apache/tvm/blob/main/web/src/runtime.ts#L991 an interface ArtifactCache in a new file artifact_cache.ts
  • Provide implementatons ArtifactCacheIndexDB, and ArtifactCacheBasic(via caches)
  • Provide parallel download methods in the same file
  • Optionally, allow injection of additional class of ArtifactCache that can be implemented via other means.

This way the default implementation won't come with extra dependency via IndexDB API.

from web-llm.

DiegoCao avatar DiegoCao commented on June 18, 2024 1

Hi David, thanks for offering the help! I'm looking into the TVMjs as well and we need to make changes in module TVMjs.

from web-llm.

DavidGOrtega avatar DavidGOrtega commented on June 18, 2024 1

@CharlieFRuan I think all of them are in TVMjs. Parallelise downloads and change the cache layer for something much more agnostic. As I say I would use level because we can then me it work with different caches. Its a facade

from web-llm.

DiegoCao avatar DiegoCao commented on June 18, 2024 1

@DavidGOrtega I can work on C2 first and work on C4 after you built the indexDB and levels.

from web-llm.

DavidGOrtega avatar DavidGOrtega commented on June 18, 2024 1

Perfect so I do a PR for C1 and another for C3

from web-llm.

DavidGOrtega avatar DavidGOrtega commented on June 18, 2024

Great! I was thinking to group all of them too. I would implement a facade and then we can implement specific storages.
I suggest to use level if we are able to just use a package.

I can definitely take this one! Im actually taking it for a project of mine.
My question would be, Are we attacking TVMjs or web-llm? Right now the cache mechanism is the one implemented in TVMjs. And I know for sure that mlc-ai is actually related to TVM but Im afraid of how long does it take to deploy something in TVM. Currently they have 220 PRs some of them from 2021 (including yours) @CharlieFRuan

from web-llm.

CharlieFRuan avatar CharlieFRuan commented on June 18, 2024

I can definitely take this one! Im actually taking it for a project of mine.

@DavidGOrtega Thanks for offering help! You are referring to item C3 right?

My question would be, Are we attacking TVMjs or web-llm?

I think we should make the changes in TVMjs. I wouldn't be too worried about getting things merged there:)

Also cc @DiegoCao who is looking into IndexedDB as well.

from web-llm.

DavidGOrtega avatar DavidGOrtega commented on June 18, 2024

let me know what works for you @DiegoCao. What do you want to pick?

from web-llm.

CharlieFRuan avatar CharlieFRuan commented on June 18, 2024

I think we can go with your suggestion and use level here. Looking forward to the change!

from web-llm.

DiegoCao avatar DiegoCao commented on June 18, 2024

Sorry for chiming in late. For the caching layer, ideally we would like something that comes with minimal dependency. Spefically, we should:

  • Make ArtifactCache https://github.com/apache/tvm/blob/main/web/src/runtime.ts#L991 an interface ArtifactCache in a new file artifact_cache.ts
  • Provide implementatons ArtifactCacheIndexDB, and ArtifactCacheBasic(via caches)
  • Provide parallel download methods in the same file
  • Optionally, allow injection of additional class of ArtifactCache that can be implemented via other means.

This way the default implementation won't come with extra dependency via IndexDB API.

Received, will do a PR for C0 for migrating old ArtifactCache to interface and implementation of the existing Basic Approach.

from web-llm.

bakkot avatar bakkot commented on June 18, 2024

Another nice feature, especially if you're doing C4, would be to allow inspecting items in the cache "downloading" them, i.e. copying them out of the cache to disk (so that users don't have to find them wherever their browser is storing files).

from web-llm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.