Download 14B/code/utils/active_mmd_branches.py from Elastic-forcing/Elastic-forcing-code: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/Elastic-forcing/Elastic-forcing-code/resolve/main/14B/code/utils/active_mmd_branches.py
- Command line
-
hf download hf://Elastic-forcing/Elastic-forcing-code/14B/code/utils/active_mmd_branches.py
-
curl -L -o active_mmd_branches.py https://huggingface.co/Elastic-forcing/Elastic-forcing-code/resolve/main/14B/code/utils/active_mmd_branches.py
584 Bytes
| """Opt-in DINOv3 ablation without changing the existing MMD contract.""" | |
| ALL_BRANCHES = ("dinov3", "vjepa2", "videomae_v2") | |
| NO_DINO_BRANCHES = ("vjepa2", "videomae_v2") | |
| def active_mmd_branches(value=None): | |
| """Keep legacy order and reject accidental branch/weight experiments.""" | |
| branches = ALL_BRANCHES if value is None else tuple(value) | |
| if branches not in (ALL_BRANCHES, NO_DINO_BRANCHES): | |
| raise ValueError( | |
| "triple_active_branches must be ordered as " | |
| f"{ALL_BRANCHES!r} or {NO_DINO_BRANCHES!r}; got {branches!r}") | |
| return branches | |