百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nd-Mamba2-torch

> 编程语言
开源

仅通过 torch 实现: "bi-mamba2", "vision-mamba2-torch"。支持 1d/2d/3d/nd, 并支持通过 jit.script/onnx 导出;

394 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

仅通过 torch 实现: "bi-mamba2", "vision-mamba2-torch"。支持 1d/2d/3d/nd, 并支持通过 jit.script/onnx 导出;

Nd-Mamba2 for any dimension by pytorch

BiMamba2, implemented solely using PyTorch, provides N-dimensional support, including support for 1d, 2d, and 3d data. With BiMamba2, you can easily stitch it into any model to improve accuracy.

The following paper provides a detailed introduction to the NdBimamba2 module of the project:

Nd-BiMamba2: A Unified Bidirectional Architecture for Multi-Dimensional Data Processing
Hao Liu*
Paper: https://arxiv.org/abs/2312.00752 中文README

nd_mamba2.py Features (Updated on August 2, 2024)

  • ✅ Support customized 1D data (batch, channel, length)
  • ✅ Support customized 2D data (batch, channel,height,width)
  • ✅ Support customized 3D data (batch, channel,deep,height,width)
  • ✅ Support universal Nd data (batch, channel, * size)
  • ✅ There is good environmental support (pure PyTorch implementation, plug and play)

ex-bi-umamba2.py New feature (updated on August 16, 2024)

  • ✅ Support export in torch.jit.scipt format (with the removal of the einops library and configuration classes)
  • ✅ Support onnx format export (using onnx_14 version, supporting operations on lower triangular arrays)
  • ✅ More readable (with a significant amount of redundant code removed)
  • ✅ Compatible with all features of nd_mamba2.py

ex_bi_mamba2_ac.py New feature (updated on August 20, 2024)

  • ✅ Better 2D image semantic expression (using asymmetric convolution strategy to optimize 2D)
  • ✅ Compatible with all features in ex-bi-umamba2.py
  • ❌ Not supporting data formats such as 1d, 3d, and other dimensions

vssd_torch.py New Features (Updated on August 21, 2024)

  • ✅ Best 2D image semantic expression (optimized based on VSSD)
  • ✅ Friendly environment support (pure torch implementation, plug and play)
  • ❌ Cannot export to torch.jit.scipt or onnx formats
  • ❌ Not supporting data formats such as 1d, 3d, and other dimensions

ex-vssd.py New feature (updated on August 22, 2024)

  • ✅ More readable (with code optimization for vssd_torch)
  • ✅ Support exporting to scientific and onnx formats
  • ✅ Compatible with all features in ex-vssd.py
  • ❌ Not supporting data formats such as 1d, 3d, and other dimensions

ex_vssd_cls_seg.py New feature (updated on August 28, 2024)

  • ✅ Support for segmentation tasks (added vssd backbone based shuffle segmentation decoder)
  • ✅ Support classification tasks (added vssd backbone based shuffle classification decoder)
  • ✅ Support exporting to scientific and onnx formats
  • ❌ Not supporting data formats such as 1d, 3d, and other dimensions

Reminder

If you want faster speed, you can replace Mamba2 in this project with Mamba2's official Cuda acceleration implementation and install various dependency packages according to official requirements. This will not affect the project's support for multi-dimensional data, but it will have an impact on the export of the model

Thanks

  • [Albert Gu], [Tri Dao] state-spaces/mamba - authors of the Mamba-2 architecture
  • [Yuheng Shi], [Minjing Dong] YuHengsss/VSSD - authors of the vssd architecture
  • [Thomas] - author of tommyip/mamba2-minimal, who inspired this repo

Citation

If nd-mamba2-torch is helpful for your research, please cite the following paper:

@misc{liu2024ndbimamba2unifiedbidirectionalarchitecture,
      title={Nd-BiMamba2: A Unified Bidirectional Architecture for Multi-Dimensional Data Processing}, 
      author={Hao Liu},
      year={2024},
      eprint={2411.15380},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2411.15380}, 
}

Issues· 38 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonbi-mamba2onnxtorchtorch-script

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言