Skip to content

Spec1: dim-agnostic heads — fix MGFN hardcoded 2048 + text-align compatibility guard #18

Description

@jinmang2

Part of #16 (Spec 1 — Foundation).

Scope

  • Fix MGFN hardcoded 2048 (src/models/mgfn/modeling_mgfn.py:83, x[:, :2048] / x[:, 2048:]) → derive magnitude split from config.feature_size. Other heads already read feature_size.
  • requires_text_aligned: bool per head; pipeline factory rejects incompatible {backbone, head} (e.g. VadCLIP+VideoMAE) with a clear error. CLIP/InternVideo2 are text-aligned.

Done when

  • MGFN runs on non-2048 features.
  • Numerical-equivalence regression on the 2048 path passes (eager/fp32/TF32-off).
  • Incompatible pair raises a clear error (unit test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions