1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pub use ;
/// Specifies how ISQ (in-situ quantization) should be configured.
///
/// Use [`IsqSetting::Auto`] to let the engine pick the best quantization type for
/// the target platform, or [`IsqSetting::Specific`] (via [`TextModelBuilder::with_isq`](crate::TextModelBuilder::with_isq))
/// to choose an exact type.
///
/// # Examples
///
/// ```no_run
/// # use mistralrs::*;
/// # async fn example() -> anyhow::Result<()> {
/// // Auto-select the best 4-bit quantization for the current platform:
/// let model = TextModelBuilder::new("microsoft/Phi-3.5-mini-instruct")
/// .with_auto_isq(IsqBits::Four)
/// .build()
/// .await?;
/// # Ok(())
/// # }
/// ```
/// Resolve an [`IsqSetting`] to a concrete [`IsqType`] given the target device.
pub