pub enum ModelSelected {
Toml {
file: String,
},
Plain {
model_id: String,
tokenizer_json: Option<String>,
arch: Option<NormalLoaderType>,
dtype: ModelDType,
topology: Option<String>,
organization: Option<IsqOrganization>,
write_uqff: Option<PathBuf>,
from_uqff: Option<PathBuf>,
imatrix: Option<PathBuf>,
calibration_file: Option<PathBuf>,
},
XLora {
model_id: Option<String>,
tokenizer_json: Option<String>,
xlora_model_id: String,
order: String,
tgt_non_granular_index: Option<usize>,
arch: Option<NormalLoaderType>,
dtype: ModelDType,
topology: Option<String>,
write_uqff: Option<PathBuf>,
from_uqff: Option<PathBuf>,
},
Lora {
model_id: Option<String>,
tokenizer_json: Option<String>,
adapters_model_id: String,
order: String,
arch: Option<NormalLoaderType>,
dtype: ModelDType,
topology: Option<String>,
write_uqff: Option<PathBuf>,
from_uqff: Option<PathBuf>,
},
GGUF {
tok_model_id: Option<String>,
quantized_model_id: String,
quantized_filename: String,
topology: Option<String>,
},
XLoraGGUF {
tok_model_id: Option<String>,
quantized_model_id: String,
quantized_filename: String,
xlora_model_id: String,
order: String,
tgt_non_granular_index: Option<usize>,
topology: Option<String>,
},
LoraGGUF {
tok_model_id: Option<String>,
quantized_model_id: String,
quantized_filename: String,
adapters_model_id: String,
order: String,
topology: Option<String>,
},
GGML {
tok_model_id: String,
tokenizer_json: Option<String>,
quantized_model_id: String,
quantized_filename: String,
gqa: usize,
topology: Option<String>,
},
XLoraGGML {
tok_model_id: Option<String>,
tokenizer_json: Option<String>,
quantized_model_id: String,
quantized_filename: String,
xlora_model_id: String,
order: String,
tgt_non_granular_index: Option<usize>,
gqa: usize,
topology: Option<String>,
},
LoraGGML {
tok_model_id: Option<String>,
tokenizer_json: Option<String>,
quantized_model_id: String,
quantized_filename: String,
adapters_model_id: String,
order: String,
gqa: usize,
topology: Option<String>,
},
VisionPlain {
model_id: String,
tokenizer_json: Option<String>,
arch: VisionLoaderType,
dtype: ModelDType,
topology: Option<String>,
write_uqff: Option<PathBuf>,
from_uqff: Option<PathBuf>,
max_edge: Option<u32>,
calibration_file: Option<PathBuf>,
},
DiffusionPlain {
model_id: String,
arch: DiffusionLoaderType,
dtype: ModelDType,
},
}
Variants§
Toml
Select the model from a toml file
Plain
Select a plain model, without quantization or adapters
Fields
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
arch: Option<NormalLoaderType>
The architecture of the model.
dtype: ModelDType
Model data type. Defaults to auto
.
organization: Option<IsqOrganization>
ISQ organization: default
or moqe
(Mixture of Quantized Experts: https://arxiv.org/abs/2310.02410).
from_uqff: Option<PathBuf>
UQFF path to load from. If provided, this takes precedence over applying ISQ.
XLora
Select an X-LoRA architecture
Fields
model_id: Option<String>
Force a base model ID to load from instead of using the ordering file. This may be a HF hub repo or a local path.
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
tgt_non_granular_index: Option<usize>
Index of completion tokens to generate scalings up until. If this is 1, then there will be one completion token generated before it is cached. This makes the maximum running sequences 1.
arch: Option<NormalLoaderType>
The architecture of the model.
dtype: ModelDType
Model data type. Defaults to auto
.
Lora
Select a LoRA architecture
Fields
model_id: Option<String>
Force a base model ID to load from instead of using the ordering file. This may be a HF hub repo or a local path.
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
arch: Option<NormalLoaderType>
The architecture of the model.
dtype: ModelDType
Model data type. Defaults to auto
.
GGUF
Select a GGUF model.
Fields
tok_model_id: Option<String>
tok_model_id
is the local or remote model ID where you can find a tokenizer_config.json
file.
If the chat_template
is specified, then it will be treated as a path and used over remote files,
removing all remote accesses.
quantized_model_id: String
Quantized model ID to find the quantized_filename
.
This may be a HF hub repo or a local path.
XLoraGGUF
Select a GGUF model with X-LoRA.
Fields
tok_model_id: Option<String>
tok_model_id
is the local or remote model ID where you can find a tokenizer_config.json
file.
If the chat_template
is specified, then it will be treated as a path and used over remote files,
removing all remote accesses.
quantized_model_id: String
Quantized model ID to find the quantized_filename
.
This may be a HF hub repo or a local path.
quantized_filename: String
Quantized filename(s). May be a single filename, or use a delimiter of “ “ (a single space) for multiple files.
LoraGGUF
Select a GGUF model with LoRA.
Fields
tok_model_id: Option<String>
tok_model_id
is the local or remote model ID where you can find a tokenizer_config.json
file.
If the chat_template
is specified, then it will be treated as a path and used over remote files,
removing all remote accesses.
quantized_model_id: String
Quantized model ID to find the quantized_filename
.
This may be a HF hub repo or a local path.
GGML
Select a GGML model.
Fields
tok_model_id: String
Model ID to load the tokenizer from. This may be a HF hub repo or a local path.
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
XLoraGGML
Select a GGML model with X-LoRA.
Fields
tok_model_id: Option<String>
Model ID to load the tokenizer from. This may be a HF hub repo or a local path.
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
quantized_model_id: String
Quantized model ID to find the quantized_filename
.
This may be a HF hub repo or a local path.
LoraGGML
Select a GGML model with LoRA.
Fields
tok_model_id: Option<String>
Model ID to load the tokenizer from. This may be a HF hub repo or a local path.
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
VisionPlain
Select a vision plain model, without quantization or adapters
Fields
tokenizer_json: Option<String>
Path to local tokenizer.json file. If this is specified it is used over any remote file.
arch: VisionLoaderType
The architecture of the model.
dtype: ModelDType
Model data type. Defaults to auto
.
from_uqff: Option<PathBuf>
UQFF path to load from. If provided, this takes precedence over applying ISQ.
DiffusionPlain
Select a diffusion plain model, without quantization or adapters
Fields
arch: DiffusionLoaderType
The architecture of the model.
dtype: ModelDType
Model data type. Defaults to auto
.
Trait Implementations§
source§impl Debug for ModelSelected
impl Debug for ModelSelected
source§impl FromArgMatches for ModelSelected
impl FromArgMatches for ModelSelected
source§fn from_arg_matches(
__clap_arg_matches: &ArgMatches,
) -> Result<ModelSelected, Error>
fn from_arg_matches( __clap_arg_matches: &ArgMatches, ) -> Result<ModelSelected, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<ModelSelected, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<ModelSelected, 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 ModelSelected
impl Subcommand for ModelSelected
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 ModelSelected
impl RefUnwindSafe for ModelSelected
impl Send for ModelSelected
impl Sync for ModelSelected
impl Unpin for ModelSelected
impl UnwindSafe for ModelSelected
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<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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