Add the hub tier: per-model frame libraries download on demand - #27
Merged
Conversation
load_library now resolves three tiers: user cache (wins per-frame) > bundled (default backbone only) > hub — fingerprint-addressed .npz on the HF dataset repo jdonaldson/turnstyle-frames (env-overridable via TURNSTYLE_FRAMES_REPO). Network touched only on a full local miss; downloads land in the standard HF cache (offline-safe). huggingface_hub is already a transitive dep via transformers. build_frame_library.py bundles only the default SmolLM2-1.7B; other models save to the user cache and print the hub upload command. Fit + uploaded: Qwen2.5-1.5B (e7304c85), Phi-4-mini (8f13adee), SmolLM2-360M (6e715344) + registry.json. THE WHOLE 14-FRAME FAMILY RECOVERS ON ALL FOUR BACKBONES (56 fits, min 0.75=weight, rest >=0.86); the oblique-social pair replicates as every model's max off-diagonal (competence-potency .38-.42); the relational-late cluster travels (animacy last-or-near-last everywhere). Cold-download verified: cache purged -> load_library pulls 14 frames from the hub. Tests: 11 pass (new hub-tier test, network mocked).
jdonaldson
added a commit
that referenced
this pull request
Jul 5, 2026
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
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.
load_library now resolves three tiers: user cache (wins per-frame) >
bundled (default backbone only) > hub — fingerprint-addressed .npz on
the HF dataset repo jdonaldson/turnstyle-frames (env-overridable via
TURNSTYLE_FRAMES_REPO). Network touched only on a full local miss;
downloads land in the standard HF cache (offline-safe). huggingface_hub
is already a transitive dep via transformers.
build_frame_library.py bundles only the default SmolLM2-1.7B; other
models save to the user cache and print the hub upload command.
Fit + uploaded: Qwen2.5-1.5B (e7304c85), Phi-4-mini (8f13adee),
SmolLM2-360M (6e715344) + registry.json. THE WHOLE 14-FRAME FAMILY
RECOVERS ON ALL FOUR BACKBONES (56 fits, min 0.75=weight, rest >=0.86);
the oblique-social pair replicates as every model's max off-diagonal
(competence-potency .38-.42); the relational-late cluster travels
(animacy last-or-near-last everywhere). Cold-download verified: cache
purged -> load_library pulls 14 frames from the hub. Tests: 11 pass
(new hub-tier test, network mocked).