pub enum Command {
Convert {
model: String,
task: TaskArg,
output: Option<PathBuf>,
dtype: DtypeArg,
model_dir: PathBuf,
token: Option<String>,
redownload: bool,
},
InspectTensors {
path: PathBuf,
},
Upload {
repo: String,
token: String,
root: PathBuf,
},
Infer {
gguf: PathBuf,
config: PathBuf,
},
EnsemblePredict {
gguf: PathBuf,
config: PathBuf,
threads: Option<usize>,
batch_size: Option<usize>,
},
Delete {
model: String,
task: TaskArg,
model_dir: PathBuf,
output: Option<PathBuf>,
},
}Variants§
Convert
Download one TabFM variant from HuggingFace and convert to GGUF.
The first conversion downloads the model and writes a canonical F32 GGUF alongside it, deleting the (large) downloaded weight file afterward. Later conversions (any –dtype) recast from that cached F32 GGUF instead of re-downloading — pass –redownload to force a fresh download anyway (e.g. the repo was updated).
Fields
InspectTensors
Print all tensor names in a local checkpoint file (safetensors, PyTorch pickle, GGUF, or npy/npz — format auto-detected).
Upload
Upload source + GGUF files to HuggingFace Hub.
Fields
Infer
Run TabFM classification/regression from a GGUF file.
Reads a JSON request from stdin:
{“x”: [[…]], “y”: […], “train_size”: N, “cat_mask”: […], “d”: N}
x is [T][H] (rows x padded feature columns), y is [T] labels (any finite
placeholder at test-row positions is fine), train_size is how many leading rows are
training rows, cat_mask (optional, default all-false) marks categorical columns, d
(optional, default H) is the actual unpadded feature count.
Outputs JSON: {“task”: …, “logits”|“predictions”: [[…]], “probabilities”: [[…]]?}
EnsemblePredict
Full sklearn-wrapper-equivalent pipeline: feature scaling, categorical encoding, and
n_estimators-member ensembling (bit-compatible with the real TabFMClassifier/
TabFMRegressor’s default RNG) on top of the raw model.
Reads a JSON request from stdin:
{“x_train”: [[…]], “y_train”: […], “x_test”: [[…]], “cat_mask”: […],
“n_estimators”: 32, “norm_methods”: [“none”,“power”], “class_shift”: true,
“outlier_threshold”: 4.0, “softmax_temperature”: 0.9, “average_logits”: true,
“random_state”: 42, “binary_calibration_method”: null|“platt”,
“multiclass_calibration_method”: null|“vector”, “num_folds_for_cv”: 5,
“enable_nnls”: false, “nnls_beta”: 0.75, “calibration_lambda”: 0.01}
x_train/x_test cells may be numbers or strings (categorical columns, per cat_mask,
are ordinal-encoded internally). Calibration/NNLS are off by default (matching the sklearn
wrapper) and, when enabled, are fit natively via an out-of-fold procedure on x_train
— no separate “fit” step needed. Outputs JSON: classification ->
{“task”:“classification”,“probabilities”:[[…]],“predicted_labels”:[…],“classes”:[…]};
regression -> {“task”:“regression”,“predictions”:[…]}.
Fields
threads: Option<usize>Worker threads for the ensemble-member/OOF-fold parallel loops (default: rayon’s own
default, i.e. all logical cores, or the RAYON_NUM_THREADS env var if set). On some
machines more threads than ~physical-core-count can hurt wall time (contention with
Accelerate/BLAS’s own internal matmul threading) — benchmark your deployment if
tuning for latency.
batch_size: Option<usize>Members per batched forward pass (default: all n_estimators in one batch — BLAS is
generally more efficient on one large matmul than many small ones). Smaller values
trade that off against more rayon-parallel chunks; benchmark for a given table
size/machine if tuning. Can also be set via the JSON body’s "batch_size" field.
Delete
Delete cached model files for this model.
Removes the canonical F32 GGUF and config cache at
<model_dir>/[<variant>-]<owner>__<name>/ created by convert.
By default only the cache is removed; pass --output <path> to also
delete a converted GGUF file (e.g. gguf/...).
Fields
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more