Views
No views yet

LimiXPredictor for a classification task.inference.predictor module.1import torch
2import numpy as np
3from sklearn.datasets import load_breast_cancer
4from sklearn.metrics import accuracy_score, roc_auc_score
5from sklearn.model_selection import train_test_split
6from huggingface_hub import hf_hub_download
7import os, sys
8
9# Setup environment for distributed backend (required by LimiXPredictor)
10os.environ["RANK"] = "0"
11os.environ["WORLD_SIZE"] = "1"
12os.environ["MASTER_ADDR"] = "127.0.0.1"
13os.environ["MASTER_PORT"] = "29500"
14
15# Import LimiXPredictor (requires the source code from GitHub)
16from inference.predictor import LimiXPredictor
17
18# Load data
19X, y = load_breast_cancer(return_X_y=True)
20X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
21
22# Download the model checkpoint
23model_file = hf_hub_download(repo_id="stableai-org/LimiX-2M", filename="LimiX-2M.ckpt")
24
25# Initialize and run inference
26clf = LimiXPredictor(
27 device=torch.device('cuda' if torch.cuda.is_available() else 'cpu'),
28 model_path=model_file,
29 inference_config='config/cls_default_retrieval.json'
30)
31prediction = clf.predict(X_train, y_train, X_test)
32
33print("roc_auc_score:", roc_auc_score(y_test, prediction[:, 1]))
34print("accuracy_score:", accuracy_score(y_test, np.argmax(prediction, axis=1)))
pip install scikit-learn einops huggingface-hub matplotlib networkx numpy pandas scipy tqdm typing_extensions xgboost kditransform hyperopt1git clone https://github.com/limix-ldm/LimiX.git
2cd LimiX1@article{LimiX-2M,
2 title={LimiX-2M: Mitigating Low-Rank Collapse and Attention Bottlenecks in Tabular Foundation Models},
3 author={Zhang, Xingxuan and others},
4 journal={arXiv preprint arXiv:2606.04485},
5 year={2026}
6}
7
8@article{LimiX,
9 title={LimiX: Unleashing Structured-Data Modeling Capability for Generalist Intelligence},
10 author={Zhang, Xingxuan and Ren, Gang and Yu, Han and Yuan, Hao and Wang, Hui and Li, Jiansheng and Wu, Jiayun and Mo, Lang and Mao, Li and Hao, Mingchao and others},
11 journal={arXiv preprint arXiv:2509.03505},
12 year={2025}
13}