You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--include-adapters and --base-model filters are applied after download — all adapter sizes and names are fetched unnecessarily #3
When --adapters points to a HuggingFace adapter library, the entire repository is downloaded before any filtering is applied. Both the model-size filter (derived from --base-model) and the --include-adapters name filter are post-download — meaning adapters for every model size and every adapter name land on disk even when the user requested only a small subset.
Expected: Only files under query_rewrite/granite-4.1-3b/ and context-attribution/granite-4.1-3b/ are downloaded from each repo.
Actual: All adapters for all model sizes (3b, 8b, 30b, …) are downloaded in full.
Root cause:resolve_repo_path() calls huggingface_hub.snapshot_download() with no allow_patterns, so the entire repo is fetched. The target-model filter (discover_adapters, adapter_discovery.py:59–71) and the name filter (filter_adapters, adapter_discovery.py:184) both run against the already-complete local copy.
Fix: Construct allow_patterns for snapshot_download from the known filters before the download starts — e.g. ["query_rewrite/granite-4.1-3b/**", "context-attribution/granite-4.1-3b/**"]. This requires detecting the adapter library type (or inferring it from the repo structure) before downloading, or a lightweight metadata-first pass.
Activity