| 123456789101112131415161718192021 |
- """Pure-PyTorch stand-in for the parts of `mamba-ssm` that Mage-VL needs.
- `microsoft/Mage-VL`'s remote code (`streammind_gate.py`) does
- from mamba_ssm.models.mixer_seq_simple import create_block
- at module level, and `transformers.dynamic_module_utils.check_imports` imports
- every top-level dependency of every remote file before it will load the model —
- so `mamba_ssm` must be importable even though only the StreamMind cognition gate
- uses it.
- The real `mamba-ssm` ships CUDA extensions (`selective_scan_cuda`,
- `causal_conv1d_cuda`) with no wheel for the ZeroGPU Blackwell (sm_120) /
- torch-2.11 / cp312 runtime, and compiling them from source is not viable inside
- a Space build. This package therefore provides a faithful pure-PyTorch port of
- Mamba-1 (`mamba_ssm.modules.mamba_simple.Mamba` + `mamba_ssm.modules.block.Block`
- with the defaults `create_block` uses: rms_norm=False, fused_add_norm=False,
- residual_in_fp32=False, d_intermediate=0) built on the upstream
- `selective_scan_ref` reference recurrence, with identical parameter names and
- shapes so `streammind_gate.safetensors` loads with `strict=True`.
- The gate runs over a handful of EPFE tokens (one per codec canvas), so the slow
- sequential scan costs milliseconds — the CUDA kernel buys nothing here.
- """
- __version__ = "2.2.6.mage-vl-pure-torch"
|