Target

Enum Target 

Source
pub enum Target {
    Exact(String),
    Regex(String, Regex),
    Glob(String),
    HfModule(String, Option<Regex>),
    Class(String),
}
Expand description

2026-09-28: One target or ignore entry.

Variants§

§

Exact(String)

2026-09-28: An exact module path.

§

Regex(String, Regex)

2026-09-28: A compressed-tensors re: pattern, anchored at both ends as Python’s re.match plus the checkpoint’s $ do.

§

Glob(String)

2026-09-28: A ModelOpt glob (*, ?).

§

HfModule(String, Option<Regex>)

2026-09-30: An HF fp8 modules_to_not_convert / ignored_layers entry: a module path matched on whole dotted segments. It names the module itself, a parent of it (model.visual excludes model.visual.blocks.0.attn.proj), or its trailing segments (lm_head); mlp.gate names the MoE router ...mlp.gate, never the dense ...mlp.gate_proj. These are the three rules of transformers should_convert_module (quantizers/quantizers_utils.py: re.match(f"{key}\\."), re.match(key), name.endswith(key)) restricted to segment boundaries, and include vLLM’s exact prefix in ignored_layers (is_layer_skipped, quantization/utils/quant_utils.py). An entry with regex syntax beyond . is that regex, anchored at the start (re.match) and ending on a segment boundary.

§

Class(String)

2026-09-28: A module class (Linear). Every module the plan is asked about is a linear layer, so Linear matches all of them and any other class none.

Implementations§

Source§

impl Target

Source

pub fn ignore_entry(dialect: IgnoreDialect, s: &str) -> Result<Self>

2026-09-30: An ignore entry of dialect, the one matcher the precision plan and the weight loaders share. A malformed entry is refused.

Source

pub fn compressed_tensors(s: &str) -> Result<Self>

2026-09-28: A compressed-tensors target or ignore entry: re:<pattern>, a class name (Linear), or an exact path. 2026-09-30: As compressed-tensors matches them (0.12.2, utils/match.py _match_name): a re: pattern by re.match (anchored at the start only), anything else by equality.

Source

pub fn hf_module(s: &str) -> Result<Self>

2026-09-30: An HF fp8 modules_to_not_convert / ignored_layers entry (Target::HfModule). An empty entry, or one whose regex does not compile, is refused.

Source

pub fn modelopt(s: &str) -> Self

2026-09-28: A ModelOpt entry: a glob when it has a wildcard, else exact. 2026-09-30: ModelOpt writes exact module names or fnmatch globs; vLLM’s ModelOptFp8Config.is_layer_excluded (quantization/modelopt.py) adds a substring fallback, which is not followed here: it has the mlp.gate / mlp.gate_proj hazard.

Source

pub fn text(&self) -> &str

2026-09-28: The entry as the checkpoint wrote it.

Source

pub fn matches_name(&self, module: &str) -> bool

2026-09-28: Does this entry name module (classes excluded)?

Source

pub fn tier_for(&self, module: &str) -> Option<u8>

2026-09-28: Precedence tier when this entry matches module: 0 exact name, 1 pattern, 2 class. None when it does not match.

Trait Implementations§

Source§

impl Clone for Target

Source§

fn clone(&self) -> Target

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Target

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Target

§

impl RefUnwindSafe for Target

§

impl Send for Target

§

impl Sync for Target

§

impl Unpin for Target

§

impl UnwindSafe for Target

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

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.