Skip to main content

InitOptions

Type Alias InitOptions 

Source
pub type InitOptions = TextInitOptions;
👎Deprecated:

use TextInitOptions instead

Available on crate feature onnx only.

Aliased Type§

pub struct InitOptions {
    pub model_name: EmbeddingModel,
    pub environment: Option<Environment>,
    pub execution_providers: Vec<ExecutionProviderDispatch>,
    pub cache_dir: PathBuf,
    pub show_download_progress: bool,
    pub max_length: usize,
    pub intra_threads: Option<usize>,
    pub session_config: Vec<(String, String)>,
}

Fields§

§model_name: EmbeddingModel§environment: Option<Environment>§execution_providers: Vec<ExecutionProviderDispatch>§cache_dir: PathBuf§show_download_progress: bool§max_length: usize§intra_threads: Option<usize>

Number of intra-op threads for ONNX Runtime. None (the default) uses every available CPU core via std::thread::available_parallelism. Set this to cap CPU usage (e.g. on laptops) at the cost of throughput.

§session_config: Vec<(String, String)>

ONNX Runtime session configuration entries, applied with SessionBuilder::with_config_entry. Use this for settings that have no dedicated builder method, such as mlas.disable_kleidiai.