Control TabICL2 inference execution
Usage
tab_icl2_control(
device = NULL,
use_amp = TRUE,
use_fa3 = TRUE,
verbose = FALSE,
min_batch_size = 1L,
safety_factor = 0.8,
offload = "auto",
ignore_pretraining_limits = FALSE,
col_config = list(),
row_config = list(),
icl_config = list(),
...
)
inference_config(
device = NULL,
use_amp = TRUE,
use_fa3 = TRUE,
verbose = FALSE,
min_batch_size = 1L,
safety_factor = 0.8,
offload = "auto",
ignore_pretraining_limits = FALSE,
col_config = list(),
row_config = list(),
icl_config = list(),
...
)Arguments
- device
A character string or
NULLfor the torch device (e.g.,"cpu","cuda","mps"). Applied to all three transformer stages.- use_amp
A logical. Enable automatic mixed precision. Applied to all stages.
- use_fa3
A logical. Enable Flash Attention 3 kernels. Applied to all stages.
- verbose
A logical. Enable verbose logging. Applied to all stages.
- min_batch_size
A positive integer. Minimum batch size passed to the memory manager. Applied to all stages.
- safety_factor
A number in [0, 1]. Memory safety margin for batch size estimation. Applied to all stages.
- offload
A logical or one of
"auto","gpu","cpu","disk". Offload strategy for the column-embedding (COL) stage. Row-interaction (ROW) and in-context-learning (ICL) stages default toFALSEunless overridden viarow_config/icl_config.- ignore_pretraining_limits
A logical. Bypass the default data size limits on training set rows (50,000) and predictors (2,000).
- col_config
A named list of additional settings for the COL stage, overriding any of the defaults or parameters above.
- row_config
A named list of additional settings for the ROW stage.
- icl_config
A named list of additional settings for the ICL stage.
- ...
Additional named arguments stored in the returned control object. Use this for settings not covered above (e.g.
auto_offload_threshold,disk_offload_dir,use_async, etc.) that apply uniformly. Per-stage values must go incol_config,row_config, oricl_config.
Value
A list with class "tab_icl2_control" containing resolved
per-stage settings in $col, $row, and $icl, plus
$ignore_pretraining_limits.
Examples
tab_icl2_control()
#> inference control for `tab_icl2()`
tab_icl2_control(use_amp = FALSE, offload = "cpu")
#> inference control for `tab_icl2()`
#>
#> COL stage non-default arguments:
#> • `use_amp`: FALSE
#> • `offload`: "cpu"
#> ROW stage non-default arguments:
#> • `use_amp`: FALSE
#> ICL stage non-default arguments:
#> • `use_amp`: FALSE
tab_icl2_control(col_config = list(disk_offload_dir = tempdir()))
#> inference control for `tab_icl2()`
#>
#> COL stage non-default arguments:
#> • `disk_offload_dir`:
#> "/var/folders/df/djsxfhc17x95674wsm_g8s980000gn/T//RtmpaVcmdQ"
tab_icl2_control(ignore_pretraining_limits = TRUE)
#> inference control for `tab_icl2()`
#>
#> non-default top-level arguments:
#> • `col`: TRUE, TRUE, FALSE, 1, 0.8, auto, 0.5, 0.85, 32768, NULL, 1024, 8192,
#> TRUE, , NULL, 0.95, TRUE, and 4
#> • `row`: TRUE, TRUE, FALSE, 1, 0.8, FALSE, 0.5, 0.85, 32768, NULL, 1024, 8192,
#> TRUE, , NULL, 0.95, TRUE, and 4
#> • `icl`: TRUE, TRUE, FALSE, 1, 0.8, FALSE, 0.5, 0.85, 32768, NULL, 1024, 8192,
#> TRUE, , NULL, 0.95, TRUE, and 4
#> • `ignore_pretraining_limits`: TRUE