transformers.js
[v4] Improve download progress tracking (model cache registry and define which files will be loaded for pipelines)
#1511
Merged

[v4] Improve download progress tracking (model cache registry and define which files will be loaded for pipelines) #1511

xenova merged 62 commits into main from v4-cache-handler
nico-martin
nico-martin added progress_total progress callback status info
dfebb4a4
nico-martin added get_file_metadata helper
92163263
nico-martin some clean up
17f98553
nico-martin improved get_file_metadata and get_files
4fbe9a1d
nico-martin added functions to main export
ba4a4bab
nico-martin nico-martin requested a review from xenova xenova 151 days ago
HuggingFaceDocBuilderDev
xenova
xenova commented on 2026-02-03
nico-martin removed dynamic import
6249f311
nico-martin restructuring
be8d7bbf
nico-martin refactored the pipeline tasks so I can have a get_pipeline_files func…
9f3e2249
nico-martin updated doc
7b327a6a
nico-martin Update packages/transformers/src/utils/core.js
32dad76a
nico-martin added is_pipeline_cached and improved return object
46433d68
nico-martin fixes after review
4eeed397
nico-martin added ModelRegistry to doc
f19ccfd7
nico-martin nico-martin assigned xenova xenova 142 days ago
xenova xenova changed the base branch from v4 to main 141 days ago
nico-martin added clear_cache and clear_pipeline_cache
3430421f
xenova xenova requested a review from xenova xenova 136 days ago
xenova
xenova requested changes on 2026-02-19
xenova xenova changed the title V4 cache handler [v4] Improve download progress tracking (model cache registry and define which files will be loaded for pipelines) 136 days ago
nico-martin Update packages/transformers/src/utils/cache/clear_cache.js
be5a6b2b
nico-martin small doc fix
563e872e
nico-martin Merge branch 'v4-cache-handler' of github.com:huggingface/transformer…
01d5b23c
nico-martin changed delete logic for cache
856d3024
nico-martin fixed examples in cache utilitiy files
4cb293d7
nico-martin fixed examples
83170d17
nico-martin renamed type
b9d8c33b
nico-martin refactoring get_file_metadata
056843f7
nico-martin moved src/utils/pipeline-tasks.js to src/pipelines/index.js
4f38c6d7
nico-martin fixed doc builder
138a6d9b
nico-martin fixed doc builder
e45bbbb4
nico-martin created shared getFetchHeaders function
ef6c1969
nico-martin added case for DecoderOnlyWithoutHead and DecoderOnly
dfdfa41a
nico-martin Merge branch 'main' into v4-cache-handler
ffc38705
nico-martin improved console.warn
3a19ca9f
nico-martin changed to modelType = MODEL_TYPES.EncoderOnly if not foundInMapping
ded0a380
nico-martin removed full download from get_file_metadata
908e5bb6
nico-martin solved merge conflicts
6bf83cf9
xenova Merge branch 'main' into v4-cache-handler
e095ee8a
xenova Merge branch 'main' into v4-cache-handler
6a890676
xenova Merge branch 'main' into v4-cache-handler
eb8ae841
xenova Remove duplicate module tag (already set in ModelRegistry.js)
3dbfa36b
xenova Remove test file
c3761493
xenova pnpm format
5b647582
xenova Cleanup
333d8a77
xenova use config from_pretrained logic for ensuring config is of correct type
842334c8
xenova Reorder file acquisition
34d1299e
xenova Add example JSDoc to file header
7ef10ad9
xenova Add ModelRegistry tests
0248d904
xenova FIXME: skip cache clearing tests
131d1df8
xenova Formatting
3ba1c30d
xenova Unify model-loader.js, get_model_files.js, and session.js
f8679af8
nico-martin
nico-martin commented on 2026-02-27
nico-martin console.warn to logger.warn
1c34775e
xenova Only resolve dtype once in session.js
8bbe2290
xenova Use map + Promise.all
d794990d
xenova map -> forEach
499ae00a
xenova Use env.fetch instead of global fetch
e7cb64d1
xenova Add comment to clear_cache for clarity
bbc0fec7
xenova Add model_file_name support in cache operations
47ea1586
xenova Update cache tests
14400e80
xenova Fix TOCTOU race condition
e6416726
xenova Remove dead code
59b2e645
xenova cleanup
a49c0bfa
xenova Cleanup pipeline import/exports
36bde74c
nico-martin renamed folder cache to model_registry
9e10bf7a
nico-martin changed doc title
bafc15cf
nico-martin fix for unit tests on node 20
c004db39
xenova standardize module name
3fa74fd3
xenova
xenova approved these changes on 2026-03-01
xenova xenova merged 4811a611 into main 126 days ago
xenova xenova deleted the v4-cache-handler branch 126 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
Labels
Milestone