Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/gemma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
hidden_size: usize,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/gemma2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
hidden_size: usize,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
sliding_window: usize,
final_logit_softcapping: Option<f64>,
Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/models/llama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ pub struct Llama {
blocks: Vec<Block>,
ln_f: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
pub kv_cache: crate::pipeline::Cache,
pub device: Device,
kv_cache: crate::pipeline::Cache,
device: Device,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/mistral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
pub(crate) cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/mixtral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/phi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ pub struct Model {
layers: Vec<DecoderLayer>,
final_layernorm: LayerNorm,
lm_head: Arc<dyn QuantMethod>,
pub cache: Cache,
pub device: Device,
pub max_seq_len: usize,
cache: Cache,
device: Device,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/phi3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ pub struct Model {
layers: Vec<DecoderLayer>,
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
sliding_window: Option<usize>,
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/qwen2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
sliding_window: usize,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/models/starcoder2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ pub struct Model {
norm: LayerNorm,
lm_head: Arc<dyn QuantMethod>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
}
Expand Down
2 changes: 1 addition & 1 deletion mistralrs-core/src/utils/model_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct FileGGML {

#[derive(derive_more::From)]
pub struct Device<'a> {
pub device: &'a candle_core::Device,
device: &'a candle_core::Device,
pub mapper: DeviceMapMetadata,
}

Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/vision_models/llava/llava_llm/llama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ pub struct Llama {
blocks: Vec<Block>,
ln_f: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
pub kv_cache: crate::pipeline::Cache,
pub device: Device,
kv_cache: crate::pipeline::Cache,
device: Device,
mapper: Box<dyn DeviceMapper + Send + Sync>,
rope_parameters: (Tensor, Tensor),
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/vision_models/llava/llava_llm/mistral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
rope_parameters: (Tensor, Tensor),
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/vision_models/phi3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -860,9 +860,9 @@ pub struct Model {
layers: Vec<DecoderLayer>,
norm: RmsNorm,
lm_head: Arc<dyn QuantMethod>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
sliding_window: Option<usize>,
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/gemma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ pub struct XLoraModel {
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
dtype: DType,
hidden_size: usize,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
xlora_classifier: Option<XLoraClassifier>,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/gemma2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
hidden_size: usize,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
sliding_window: usize,
final_logit_softcapping: Option<f64>,
Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/xlora_models/llama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ pub struct XLoraLlama {
blocks: Vec<Block>,
ln_f: RmsNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
pub kv_cache: pipeline::Cache,
pub device: Device,
kv_cache: pipeline::Cache,
device: Device,
xlora_classifier: Option<XLoraClassifier>,
dtype: DType,
mapper: Box<dyn DeviceMapper + Send + Sync>,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/mistral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ pub struct XLoraModel {
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
sliding_window: Option<usize>,
dtype: DType,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
xlora_classifier: Option<XLoraClassifier>,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/mixtral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ pub struct XLoraModel {
norm: RmsNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
device: Device,
cache: Cache,
dtype: DType,
pub max_seq_len: usize,
max_seq_len: usize,
xlora_classifier: Option<XLoraClassifier>,
mapper: Box<dyn DeviceMapper + Send + Sync>,
cfg: ModelConfigMetadata,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/phi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ pub struct Model {
layers: Vec<DecoderLayer>,
final_layernorm: LayerNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
pub cache: Cache,
pub device: Device,
pub max_seq_len: usize,
cache: Cache,
device: Device,
max_seq_len: usize,
xlora_classifier: Option<XLoraClassifier>,
dtype: DType,
mapper: Box<dyn DeviceMapper + Send + Sync>,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/phi3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ pub struct Model {
norm: RmsNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
dtype: DType,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
xlora_classifier: Option<XLoraClassifier>,
sliding_window: Option<usize>,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/xlora_models/starcoder2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ pub struct Model {
norm: LayerNorm,
lm_head: Arc<dyn LinearLayerLike + Send + Sync>,
sliding_window: Option<usize>,
pub device: Device,
pub cache: Cache,
pub max_seq_len: usize,
device: Device,
cache: Cache,
max_seq_len: usize,
mapper: Box<dyn DeviceMapper + Send + Sync>,
xlora_classifier: Option<XLoraClassifier>,
dtype: DType,
Expand Down