Stable AI LimiX Non-Commercial License
Applies to the LimiX-2 model weights. Commercial use requires a separate agreement.
Read weight licenseDevelopers
Install once. Choose a task. Predict.
Pass labeled context and query rows to LimiXPredictor for classification, regression, or missing-value imputation.
Installation and Quick Start
Clone the repository, install the package, then run a complete classification example from the repository root.
git clone https://github.com/limix-ldm-ai/LimiX.git$cd LimiX$python -m pip install -e .Save as quickstart.py and run it from the cloned repository root.
import os
os.environ.update(
RANK="0",
WORLD_SIZE="1",
MASTER_ADDR="127.0.0.1",
MASTER_PORT="29500",
)
import numpy as np
import torch
from huggingface_hub import hf_hub_download
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from inference.predictor import LimiXPredictor
x, y = load_breast_cancer(return_X_y=True)
x_train, x_test, y_train, _ = train_test_split(
x, y, test_size=0.5, random_state=42
)
checkpoint = hf_hub_download(
repo_id="stable-ai/LimiX-2",
filename="LimiX-2.ckpt",
local_dir="./cache",
)
predictor = LimiXPredictor(
device=torch.device("cuda"),
model_path=checkpoint,
inference_config="config/cls_default_noretrieval_v2.json",
)
probabilities = predictor.predict(
x_train, y_train, x_test, task_type="Classification"
)
print(probabilities[:3])
print(np.argmax(probabilities, axis=1)[:3])Replace both absolute paths, then run the command after the editable install.
LimiX-infer \
--task_type cls \
--data_dir /absolute/path/to/classification-benchmark \
--model_path /absolute/path/to/LimiX-2.ckpt \
--gpuid 0 \
--save_name limix_cls--data_dir*_train.csv and *_test.csv files.--model_pathLimiX-2.ckpt.Task aliases: cls, reg, and imputation.
INTERFACEProvide a checkpoint and prepared context/query arrays.
LICENSELimiX-2 weights are non-commercial. Commercial use requires a separate agreement; the full license governs use and redistribution.
Interface checked against the official documentation and repository on 20 Sep 2026. Python 3.12 or later is required. Match PyTorch and optional flash-attn to your CUDA environment using the repository guide.
Choose a task
The checkpoint and prediction interface are shared across tasks. Create the predictor with the configuration that matches your task.
Classification
cls_default_noretrieval_v2.jsonClassificationx_train, y_train, x_testpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/cls_default_noretrieval_v2.json",) probabilities = predictor.predict( x_train, y_train, x_test, task_type="Classification",)# np.ndarray: (n_query, n_classes); rows sum to 1Regression
reg_default_noretrieval_v2.jsonRegressionx_train, y_train, x_testpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/reg_default_noretrieval_v2.json",) predictions = predictor.predict( x_train, y_train, x_test, task_type="Regression",)# np.ndarray: (n_query,); original target scaleImputation
reg_default_noretrieval_MVI_v2.jsonFeature_imputationx_train, y_train, x_test_with_nanpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/reg_default_noretrieval_MVI_v2.json",) imputed_features = predictor.predict( x_train, y_train, x_test_with_nan, task_type="Feature_imputation",)# np.ndarray: imputed feature matrixClassification
cls_default_noretrieval_v2.jsonClassificationx_train, y_train, x_testpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/cls_default_noretrieval_v2.json",) probabilities = predictor.predict( x_train, y_train, x_test, task_type="Classification",)# np.ndarray: (n_query, n_classes); rows sum to 1Regression
reg_default_noretrieval_v2.jsonRegressionx_train, y_train, x_testpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/reg_default_noretrieval_v2.json",) predictions = predictor.predict( x_train, y_train, x_test, task_type="Regression",)# np.ndarray: (n_query,); original target scaleImputation
reg_default_noretrieval_MVI_v2.jsonFeature_imputationx_train, y_train, x_test_with_nanpredictor = LimiXPredictor( device=torch.device("cuda"), model_path=checkpoint, inference_config="config/reg_default_noretrieval_MVI_v2.json",) imputed_features = predictor.predict( x_train, y_train, x_test_with_nan, task_type="Feature_imputation",)# np.ndarray: imputed feature matrixInputs and environment
The Python interface accepts NumPy arrays. Query columns must align with the context features.
| Parameter | Type | Shape | Purpose |
|---|---|---|---|
x_train | np.ndarray | (n_train, n_features) | Context features |
y_train | np.ndarray | (n_train,) | Targets aligned with context rows |
x_test | np.ndarray | (n_query, n_features) | Query features with aligned columns |
RETURN · np.ndarray
(n_query, n_classes); each probability row sums to 1.(n_query,); LimiX-2 returns the original target scale.The official repository does not state a minimum GPU, VRAM, RAM, or operating-system requirement for LimiX-2.
Terms
Code and model weights are licensed separately. Review the applicable license terms for research, redistribution, and commercial use.
Applies to the LimiX-2 model weights. Commercial use requires a separate agreement.
Read weight licenseBased on Apache 2.0 with additional attribution and model-naming provisions.
Read code license