pub struct QuantizeArgs {
pub input: PathBuf,
pub output: PathBuf,
pub scheme: SchemeArg,
pub asymmetric: bool,
pub granularity: GranularityArg,
pub axis: usize,
pub group_size: Option<usize>,
pub fp8_variant: Fp8VariantArg,
}Expand description
teeny-quant quantize arguments.
Fields§
§input: PathBufInput .safetensors checkpoint.
output: PathBufOutput .safetensors path.
scheme: SchemeArgQuantization scheme.
asymmetric: boolUse asymmetric (rather than symmetric) affine quantization. Ignored for --scheme fp8,
which is always amax-scaled/symmetric.
granularity: GranularityArgQuantization granularity.
axis: usizeAxis for --granularity channel/group (default 0, the output-channel axis for
Linear/Conv weights shaped [out, in, ...]). Group-wise quantization typically wants
the reduction axis instead, e.g. --axis 1.
group_size: Option<usize>Elements per group; required for --granularity group.
fp8_variant: Fp8VariantArgFP8 encoding; only used for --scheme fp8.
Trait Implementations§
Source§impl Args for QuantizeArgs
impl Args for QuantizeArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
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
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for QuantizeArgs
impl Debug for QuantizeArgs
Source§impl FromArgMatches for QuantizeArgs
impl FromArgMatches for QuantizeArgs
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>
Assign values from
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>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for QuantizeArgs
impl RefUnwindSafe for QuantizeArgs
impl Send for QuantizeArgs
impl Sync for QuantizeArgs
impl Unpin for QuantizeArgs
impl UnsafeUnpin for QuantizeArgs
impl UnwindSafe for QuantizeArgs
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
Mutably borrows from an owned value. Read more