diff --git a/mistralrs-core/src/lib.rs b/mistralrs-core/src/lib.rs index da1757ab1..0be8760b5 100644 --- a/mistralrs-core/src/lib.rs +++ b/mistralrs-core/src/lib.rs @@ -154,7 +154,7 @@ fn set_gemm_reduced_precision_f16() { let a = Tensor::zeros((2, 2), DType::BF16, &Device::new_cuda(0).unwrap()).unwrap(); candle_core::cuda::set_gemm_reduced_precision_bf16(true); match a.matmul(&a) { - Ok(_) => (), + Ok(_) => tracing::info!("Enabling GEMM reduced precision in BF16."), Err(e) => { if format!("{e:?}").contains("CUBLAS_STATUS_NOT_SUPPORTED") { tracing::info!("GEMM reduced precision in BF16 not supported."); @@ -167,7 +167,7 @@ fn set_gemm_reduced_precision_f16() { let a = Tensor::zeros((2, 2), DType::F16, &Device::new_cuda(0).unwrap()).unwrap(); candle_core::cuda::set_gemm_reduced_precision_f16(true); match a.matmul(&a) { - Ok(_) => (), + Ok(_) => tracing::info!("Enabling GEMM reduced precision in F16."), Err(e) => { if format!("{e:?}").contains("CUBLAS_STATUS_NOT_SUPPORTED") { tracing::info!("GEMM reduced precision in F16 not supported."); diff --git a/mistralrs-core/src/pipeline/macros.rs b/mistralrs-core/src/pipeline/macros.rs index d3795c413..37a9ce4eb 100644 --- a/mistralrs-core/src/pipeline/macros.rs +++ b/mistralrs-core/src/pipeline/macros.rs @@ -92,9 +92,11 @@ macro_rules! get_paths { info!("Using tokenizer.json at `{p}`"); PathBuf::from_str(p)? } else { + info!("Loading `tokenizer.json` at `{}`", $this.model_id); $crate::api_get_file!(api, "tokenizer.json", model_id) }; + info!("Loading `config.json` at `{}`", $this.model_id); let config_filename = $crate::api_get_file!(api, "config.json", model_id); let filenames = get_model_paths( @@ -125,6 +127,7 @@ macro_rules! get_paths { .collect::>() .contains(&"generation_config.json".to_string()) { + info!("Loading `generation_config.json` at `{}`", $this.model_id); Some($crate::api_get_file!( api, "generation_config.json", @@ -138,6 +141,7 @@ macro_rules! get_paths { .collect::>() .contains(&"preprocessor_config.json".to_string()) { + info!("Loading `preprocessor_config.json` at `{}`", $this.model_id); Some($crate::api_get_file!( api, "preprocessor_config.json", @@ -151,6 +155,7 @@ macro_rules! get_paths { .collect::>() .contains(&"processor_config.json".to_string()) { + info!("Loading `processor_config.json` at `{}`", $this.model_id); Some($crate::api_get_file!( api, "processor_config.json", @@ -160,6 +165,7 @@ macro_rules! get_paths { None }; + info!("Loading `tokenizer_config.json` at `{}`", $this.model_id); let template_filename = $crate::api_get_file!(api, "tokenizer_config.json", model_id); Ok(Box::new($path_name { @@ -188,14 +194,13 @@ macro_rules! get_paths_gguf { .with_token(get_token($token_source)?) .build()?; let revision = $revision.unwrap_or("main".to_string()); - let model_id_this = $this.model_id.clone().unwrap_or($this.quantized_model_id.clone()); - let model_id_copy = model_id_this.clone(); + let this_model_id = $this.model_id.clone().unwrap_or($this.quantized_model_id.clone()); let api = api.repo(Repo::with_revision( - model_id_this.clone(), + this_model_id.clone(), RepoType::Model, revision.clone(), )); - let model_id = std::path::Path::new(&model_id_copy); + let model_id = std::path::Path::new(&this_model_id); let chat_template = if let Some(ref p) = $this.chat_template { if p.ends_with(".json") { @@ -205,6 +210,7 @@ macro_rules! get_paths_gguf { PathBuf::from_str("")? } } else { + info!("Loading `tokenizer_config.json` at `{}` because no chat template file was specified.", this_model_id); $crate::api_get_file!( api, "tokenizer_config.json", @@ -229,7 +235,7 @@ macro_rules! get_paths_gguf { xlora_config, lora_preload_adapter_info, } = get_xlora_paths( - model_id_this, + this_model_id.clone(), &$this.xlora_model_id, &$token_source, revision.clone(), @@ -240,6 +246,7 @@ macro_rules! get_paths_gguf { .collect::>() .contains(&"generation_config.json".to_string()) { + info!("Loading `generation_config.json` at `{}`", this_model_id); Some($crate::api_get_file!( api, "generation_config.json", @@ -253,6 +260,7 @@ macro_rules! get_paths_gguf { .collect::>() .contains(&"preprocessor_config.json".to_string()) { + info!("Loading `preprocessor_config.json` at `{}`", this_model_id); Some($crate::api_get_file!( api, "preprocessor_config.json", @@ -266,6 +274,7 @@ macro_rules! get_paths_gguf { .collect::>() .contains(&"processor_config.json".to_string()) { + info!("Loading `processor_config.json` at `{}`", this_model_id); Some($crate::api_get_file!( api, "processor_config.json", @@ -276,6 +285,7 @@ macro_rules! get_paths_gguf { }; let tokenizer_filename = if $this.model_id.is_some() { + info!("Loading `tokenizer.json` at `{}`", this_model_id); $crate::api_get_file!(api, "tokenizer.json", model_id) } else { PathBuf::from_str("")?