Developers

Bring your own table

Install once. Choose a task. Predict.

Pass labeled context and query rows to LimiXPredictor for classification, regression, or missing-value imputation.

INFERENCE PATHNO PARAMETER UPDATE
CONTEXTx_train + y_trainLabeled rows
QUERYx_testRows to resolve
MODELLimiX-2Pretrained checkpoint
OUTPUT
  • class probabilities
  • continuous targets
  • imputed features
Context and query arrays enter the same checkpoint. The selected task configuration determines the output.

Installation and Quick Start

Run your first prediction

Clone the repository, install the package, then run a complete classification example from the repository root.

INSTALL FROM SOURCE
$git clone https://github.com/limix-ldm-ai/LimiX.git$cd LimiX$python -m pip install -e .
PYTHON API

Minimal inference flow

Save as quickstart.py and run it from the cloned repository root.

QUICKSTART.PYPYTHON ≥ 3.12
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])

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

One predictor for many inference tasks

The checkpoint and prediction interface are shared across tasks. Create the predictor with the configuration that matches your task.

01

Classification

Predict class probabilities for each query row

Config
cls_default_noretrieval_v2.json
task_type
Classification
Inputs
x_train, y_train, x_test
Return
np.ndarray · (n_query, n_classes) · rows sum to 1
PYTHON · CHANGED LINES HIGHLIGHTED
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",)# np.ndarray: (n_query, n_classes); rows sum to 1
01Classification
01

Classification

Predict class probabilities for each query row

Config
cls_default_noretrieval_v2.json
task_type
Classification
Inputs
x_train, y_train, x_test
Return
np.ndarray · (n_query, n_classes) · rows sum to 1
PYTHON · CHANGED LINES HIGHLIGHTED
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",)# np.ndarray: (n_query, n_classes); rows sum to 1
02

Regression

Predict continuous targets on their original scale

Config
reg_default_noretrieval_v2.json
task_type
Regression
Inputs
x_train, y_train, x_test
Return
np.ndarray · (n_query,) · original target scale
PYTHON · CHANGED LINES HIGHLIGHTED
predictor = 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 scale
03

Imputation

Impute missing values from their tabular context

Config
reg_default_noretrieval_MVI_v2.json
task_type
Feature_imputation
Inputs
x_train, y_train, x_test_with_nan
Return
np.ndarray · imputed feature matrix
PYTHON · CHANGED LINES HIGHLIGHTED
predictor = 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 matrix

Inputs and environment

A consistent interface across tasks

The Python interface accepts NumPy arrays. Query columns must align with the context features.

Predict input parameters
ParameterTypeShapePurpose
x_trainnp.ndarray(n_train, n_features)Context features
y_trainnp.ndarray(n_train,)Targets aligned with context rows
x_testnp.ndarray(n_query, n_features)Query features with aligned columns

RETURN · np.ndarray

Classification
(n_query, n_classes); each probability row sums to 1.
Regression
(n_query,); LimiX-2 returns the original target scale.
Imputation
Imputed feature matrix.
PYTHON3.12 or later
INFERENCECUDA recommended · CPU supported

The official repository does not state a minimum GPU, VRAM, RAM, or operating-system requirement for LimiX-2.

Terms

Licensing

Code and model weights are licensed separately. Review the applicable license terms for research, redistribution, and commercial use.

MODEL WEIGHTS

Stable AI LimiX Non-Commercial License

Applies to the LimiX-2 model weights. Commercial use requires a separate agreement.

Read weight license
REPOSITORY CODE

Stable AI Technology Co., Ltd. License, Version 1.0

Based on Apache 2.0 with additional attribution and model-naming provisions.

Read code license