LimiX-2M 是 2M 参数的表格基础模型(Tabular Foundation Model),采用 "tokenize-and-route" 框架(RaBEL tokenization + 对齐路由架构)。相比 LimiX-16M,更小的参数量带来更低显存占用与更快推理速度,检索机制也进一步增强。
| 项目 | 值 |
|---|---|
| 模型 | stable-ai/LimiX-2M |
| 架构 | FeaturesTransformer(tokenize-and-route) |
| 参数量 | 2M |
| 输入 | 表格特征 (1, N_train+N_test, feat) + 训练标签 |
| 输出 | 每类 logits / softmax 概率 |
| 许可证 | Apache-2.0 |
source /usr/local/Ascend/ascend-toolkit/set_env.sh)export PIP_INDEX_URL=https://repo.huaweicloud.com/repository/pypi/simple/
pip install torch torch_npu scikit-learn pandas einops kditransform
git clone https://github.com/limix-ldm-ai/LimiX.git权重(LimiX-2M.ckpt 9.5MB)从 Hugging Face 获取:
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download stable-ai/LimiX-2M --local-dir model_srcpython3 inference.py --model_path . --device npu:0输出示例(breast_cancer 数据集):
[info] input x (1, 569, 30) y_train (1, 284) eval_pos=284
[info] Inference complete (403.5 ms)
[result] logits shape (1, 285, 10) finite=True
[result] test samples=285 n_classes=10
[result] class distribution=[101, 184, 0, 0, 0, 0, 0, 0, 0, 0]
[info] device proof: model on npu:0.to("cuda")、torch.cuda.set_device 等)。FeaturesTransformer 前向(load_model + model(x, y, eval_pos)),
注意力在 NPU 上自动走 scaled_dot_product_attention(flash_attn 仅 CUDA)。kditransform 模块(PyPI 可安装),非"缺代码"。├── inference.py # NPU 推理脚本
├── LimiX-2M.ckpt # 权重(不推送)
├── README.md # 本模型卡片
└── assets/ # 截图素材@article{limix2025,
title={LimiX: Unleashing Structured-Data Modeling Capability for Generalist Intelligence},
author={LimiX team},
year={2025}
}