Skip to content

Commit

Permalink
rename SimpleModelPaths -> LocalModelPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeadie committed May 15, 2024
1 parent 67ba9ad commit 07ea5b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mistralrs-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub use pipeline::{
GGMLLoader, GGMLLoaderBuilder, GGMLSpecificConfig, GGUFLoader, GGUFLoaderBuilder,
GGUFSpecificConfig, GemmaLoader, LlamaLoader, Loader, MistralLoader, MixtralLoader, ModelKind,
ModelPaths, NormalLoader, NormalLoaderBuilder, NormalLoaderType, NormalSpecificConfig, Phi2Loader,
Phi3Loader, Qwen2Loader, SimpleModelPaths, SpeculativeConfig, SpeculativeLoader, SpeculativePipeline,
Phi3Loader, Qwen2Loader, LocalModelPaths, SpeculativeConfig, SpeculativeLoader, SpeculativePipeline,
TokenSource,
};
pub use request::{Constraint, NormalRequest, Request, RequestMessage};
Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/pipeline/ggml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::aici::bintokens::build_tok_trie;
use crate::aici::toktree::TokTrie;
use crate::pipeline::chat_template::calculate_eos_tokens;
use crate::pipeline::Cache;
use crate::pipeline::{ChatTemplate, SimpleModelPaths};
use crate::pipeline::{ChatTemplate, LocalModelPaths};
use crate::prefix_cacher::PrefixCacheManager;
use crate::sequence::Sequence;
use crate::utils::varbuilder_utils::{from_mmaped_safetensors, load_preload_adapters};
Expand Down Expand Up @@ -359,7 +359,7 @@ impl Loader for GGMLLoader {
in_situ_quant: Option<GgmlDType>,
) -> Result<Arc<Mutex<dyn Pipeline + Send + Sync>>> {
let paths: anyhow::Result<Box<dyn ModelPaths>> = get_paths!(
SimpleModelPaths,
LocalModelPaths,
&token_source,
revision,
self,
Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/pipeline/gguf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::aici::bintokens::build_tok_trie;
use crate::aici::toktree::TokTrie;
use crate::pipeline::chat_template::calculate_eos_tokens;
use crate::pipeline::Cache;
use crate::pipeline::{ChatTemplate, SimpleModelPaths};
use crate::pipeline::{ChatTemplate, LocalModelPaths};
use crate::prefix_cacher::PrefixCacheManager;
use crate::sequence::Sequence;
use crate::utils::varbuilder_utils::{from_mmaped_safetensors, load_preload_adapters};
Expand Down Expand Up @@ -287,7 +287,7 @@ impl Loader for GGUFLoader {
in_situ_quant: Option<GgmlDType>,
) -> Result<Arc<Mutex<dyn Pipeline + Send + Sync>>> {
let paths: anyhow::Result<Box<dyn ModelPaths>> = get_paths!(
SimpleModelPaths,
LocalModelPaths,
&token_source,
revision,
self,
Expand Down
6 changes: 3 additions & 3 deletions mistralrs-core/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub trait ModelPaths {
}

#[derive(Clone)]
pub struct SimpleModelPaths<P> {
pub struct LocalModelPaths<P> {
tokenizer_filename: P,
config_filename: P,
template_filename: P,
Expand All @@ -109,7 +109,7 @@ pub struct SimpleModelPaths<P> {
lora_preload_adapter_info: Option<HashMap<String, (P, LoraConfig)>>,
}

impl<P> SimpleModelPaths<P> {
impl<P> LocalModelPaths<P> {
pub fn new(

Check failure on line 113 in mistralrs-core/src/pipeline/mod.rs

View workflow job for this annotation

GitHub Actions / Clippy

this function has too many arguments (11/7)
tokenizer_filename: P,
config_filename: P,
Expand Down Expand Up @@ -140,7 +140,7 @@ impl<P> SimpleModelPaths<P> {
}


impl ModelPaths for SimpleModelPaths<PathBuf> {
impl ModelPaths for LocalModelPaths<PathBuf> {
fn get_config_filename(&self) -> &PathBuf {
&self.config_filename
}
Expand Down
4 changes: 2 additions & 2 deletions mistralrs-core/src/pipeline/normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::aici::bintokens::build_tok_trie;
use crate::aici::toktree::TokTrie;
use crate::pipeline::chat_template::calculate_eos_tokens;
use crate::pipeline::Cache;
use crate::pipeline::{ChatTemplate, SimpleModelPaths};
use crate::pipeline::{ChatTemplate, LocalModelPaths};
use crate::prefix_cacher::PrefixCacheManager;
use crate::sequence::Sequence;
use crate::utils::{tokens::get_token, varbuilder_utils::from_mmaped_safetensors};
Expand Down Expand Up @@ -181,7 +181,7 @@ impl Loader for NormalLoader {
in_situ_quant: Option<GgmlDType>,
) -> Result<Arc<Mutex<dyn Pipeline + Send + Sync>>> {
let paths: anyhow::Result<Box<dyn ModelPaths>> = get_paths!(
SimpleModelPaths,
LocalModelPaths,
&token_source,
revision,
self,
Expand Down

0 comments on commit 07ea5b3

Please sign in to comment.