Skip to main content

Command

Enum Command 

Source
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

§model: String
§task: TaskArg

Which HF subfolder / weight variant to convert.

§output: Option<PathBuf>
§dtype: DtypeArg
§model_dir: PathBuf
§redownload: bool

Force a fresh download even if a cached F32 GGUF already exists.

§

InspectTensors

Print all tensor names in a local checkpoint file (safetensors, PyTorch pickle, GGUF, or npy/npz — format auto-detected).

Fields

§path: PathBuf
§

Upload

Upload source + GGUF files to HuggingFace Hub.

Fields

§repo: String
§token: String
§root: PathBuf

Directory tree to upload. Defaults to the current directory.

§

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”: [[…]]?}

Fields

§gguf: PathBuf
§config: PathBuf
§

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

§gguf: PathBuf
§config: PathBuf
§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

§model: String

HuggingFace repo id (must match the convert –model you used).

§task: TaskArg

Which variant to delete (must match convert –task).

§model_dir: PathBuf

Directory where the cache was written (must match convert –model-dir).

§output: Option<PathBuf>

Also delete this output GGUF file if it exists.

Trait Implementations§

Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more