Skip to contents

Tabular foundation model developed by Stable AI. Uses reticulate to interface with the LimiX Python package. Calls LimiXPredictor() from the Python module limix. The model makes predictions via in-context learning and is not trained on the data in the usual sense. $train() therefore only stores the training data and loads the pre-trained weights, and the whole computation happens in $predict(). Features are passed to LimiX as a data frame, so that categorical features are ordinal encoded and missing values are handled by the package's own preprocessing pipeline.

Installation

This learner relies on reticulate to handle Python dependencies. It is not necessary to install any Python package manually in advance or specify a Python environment via reticulate::use_python(), reticulate::use_virtualenv(), reticulate::use_condaenv(), or reticulate::use_miniconda(). By calling $train() or $predict(), the required Python packages will be installed automatically, if not already. LimiX is not released on PyPI and is installed from its GitHub repository, which requires git and Python 3.12 or newer. Reticulate will then configure and initialize an ephemeral environment satisfying those requirements, unless an existing environment (e.g., "r-reticulate") in reticulate's Order of Discovery contains all the necessary packages.

You may also manually install LimiX into a Python environment following the official installation guide and specify the environment via reticulate::use_*() before calling $train() or $predict(). Besides LimiX, the environment needs the Python packages huggingface_hub and triton. LimiX imports triton, which is only available on Linux, so the learner is only tested on Linux.

On the first call to $train(), the pre-trained model weights are downloaded from Hugging Face and cached for subsequent calls (about 1.6 GB for "LimiX-2" and 10 MB for "LimiX-2M"). The weights have their own licenses, and the weights of "LimiX-2" are released under a non-commercial license. The "LimiX-2" model is slow without a GPU.

Saving a Learner

In order to save a LearnerRegrLimiX for later usage, it is necessary to call the $marshal() method on the Learner before writing it to disk, as the object will otherwise not be saved correctly. After loading a marshaled LearnerRegrLimiX into R again, you then need to call $unmarshal() to transform it into a useable state. The pre-trained weights are not serialized; they are dropped on $marshal() and reloaded from the Hugging Face cache or model_path on $unmarshal().

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.limix")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”

  • Required Packages: mlr3, mlr3extralearners, reticulate

Parameters

IdTypeDefaultLevelsRange
modelcharacter-LimiX-2, LimiX-2M, LimiX-16M-
model_pathuntyped--
deviceuntyped--
inference_configuntyped--
mix_precisionlogicalTRUETRUE, FALSE-
outlier_remove_stdnumeric12\([0, \infty)\)
softmax_temperaturenumeric0.9\([0, \infty)\)
use_data_cachelogicalFALSETRUE, FALSE-
cache_diruntyped"/tmp"-
seedinteger0\((-\infty, \infty)\)
deterministiclogicalFALSETRUE, FALSE-
test_batch_modecharacterfull_firstfull_first, fixed-
test_batch_sizeinteger16384\([1, \infty)\)
enable_preprocess_parallellogicalTRUETRUE, FALSE-
preprocess_num_jobsinteger16\([1, \infty)\)
gpu_idsuntyped--
unique_dataset_nameuntyped--
average_before_softmaxlogicalTRUETRUE, FALSE-
regression_decoder_typecharactermsemse, bucket, bucket_4_tabpfn, hierarchical-

Initial parameter values

  • model is initialized to "LimiX-2".

  • device is initialized to "auto".

Custom mlr3 parameters

  • model selects the pre-trained weights that are downloaded from Hugging Face, one of "LimiX-2" (400 million parameters), "LimiX-2M" (2 million parameters), and "LimiX-16M" (16 million parameters). It is ignored if model_path is set.

  • model_path is the path to a local checkpoint file. If it is not set, the checkpoint selected by model is downloaded.

  • device is a string that is passed to torch.device(), e.g., "cpu" or "cuda". The value "auto" selects "cuda" if it is available and "cpu" otherwise.

  • inference_config is the path to a JSON file with the inference configuration. If it is not set, the default configuration without retrieval that ships with LimiX is used, depending on the task type and the architecture version of the checkpoint.

  • cache_dir, test_batch_mode, test_batch_size, enable_preprocess_parallel, preprocess_num_jobs, and gpu_ids are only used by "LimiX-2". LimiX prints a warning and ignores them for the other models.

  • test_batch_size accepts either an integer or the special value "None" which corresponds to None in Python.

  • gpu_ids accepts an integer vector of CUDA device indices, using the zero-based indexing of Python.

  • categorical_features_indices and inference_with_DDP are not available, because the first is not used by LimiX for classification and regression, and the second requires a distributed setup.

References

Zhang, Xingxuan, Ren, Gang, Yuan, Hao, Zou, Hao, Tan, Hongze, Wang, Hui, Song, Jianhao, Li, Jiansheng, Zhang, Jiayao, Zhang, Jinghan, others (2026). “LimiX-2: A Contextual Mechanism Network Towards General Structured-Data Intelligence.” 2609.17488, https://arxiv.org/abs/2609.17488.

Zhang, Xingxuan, Ren, Gang, Yu, Han, Yuan, Hao, Wang, Hui, Li, Jiansheng, Wu, Jiayun, Mo, Lang, Mao, Li, Hao, Mingchao, others (2025). “LimiX: Unleashing Structured-Data Modeling Capability for Generalist Intelligence.” 2509.03505, https://arxiv.org/abs/2509.03505.

See also

Author

be-marc

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLimiX

Active bindings

marshaled

(logical(1))
Whether the learner has been marshaled.

Methods

Inherited methods


LearnerRegrLimiX$new()

Creates a new instance of this R6 class.

Usage


LearnerRegrLimiX$marshal()

Marshal the learner's model.

Usage

LearnerRegrLimiX$marshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::marshal_model().


LearnerRegrLimiX$unmarshal()

Unmarshal the learner's model.

Usage

LearnerRegrLimiX$unmarshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::unmarshal_model().


LearnerRegrLimiX$clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrLimiX$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.