pub struct ConvertArgs {Show 14 fields
pub inputs: Vec<PathBuf>,
pub repo: Option<String>,
pub format: Option<String>,
pub file: Option<String>,
pub revision: String,
pub token: Option<String>,
pub model_dir: Option<PathBuf>,
pub output: PathBuf,
pub dtype: DtypeArg,
pub arch: Option<String>,
pub name: Option<String>,
pub metadata: Vec<String>,
pub pickle_key: Option<String>,
pub strip_prefix: Option<String>,
}Fields§
§inputs: Vec<PathBuf>Input checkpoint file(s): .safetensors (one or more shards), model.safetensors.index.json, .pt/.pth/.bin/.ckpt, .npy/.npz, .onnx, .h5/.hdf5, .keras, or .gguf (GGUF input re-quantizes and carries metadata through). TF SavedModel/checkpoints: see tools/export-weights.py. Omit if using –repo.
repo: Option<String>Download and convert directly from a HuggingFace repo (owner/name) instead of local files — whatever checkpoint format it’s published in.
format: Option<String>With –repo: which checkpoint format to fetch (safetensors, bin, pt, pth, ckpt, onnx, h5, hdf5, keras, npz, npy, gguf). Default: the highest-priority format actually present in the repo.
file: Option<String>With –repo: case-insensitive substring to pick among multiple files of the chosen format — e.g. a specific GGUF quant variant, or a safetensors file when the repo has no sharding index and ships several unrelated ones.
revision: StringWith –repo: branch, tag, or commit to fetch from.
token: Option<String>With –repo: HuggingFace API token, for gated/private repos.
model_dir: Option<PathBuf>With –repo: directory to download into. Default: models/<owner>__<name>.
output: PathBufOutput GGUF path.
dtype: DtypeArgOutput dtype. Tensors too small for Q8_0 blocks fall back to F32.
arch: Option<String>Value for the general.architecture metadata key.
name: Option<String>Value for the general.name metadata key (default: first input’s file stem).
metadata: Vec<String>Extra metadata entries, key=value (repeatable). Values are parsed as
bool / u32 / i32 / f32 when they look like one, else stored as strings.
pickle_key: Option<String>For pickle inputs: descend into this top-level dict (e.g. state_dict).
strip_prefix: Option<String>Strip this prefix from tensor names that carry it (e.g. model.).
Trait Implementations§
Source§impl Args for ConvertArgs
impl Args for ConvertArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for ConvertArgs
impl FromArgMatches for ConvertArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ConvertArgs
impl RefUnwindSafe for ConvertArgs
impl Send for ConvertArgs
impl Sync for ConvertArgs
impl Unpin for ConvertArgs
impl UnsafeUnpin for ConvertArgs
impl UnwindSafe for ConvertArgs
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