Skip to content

Commit

Permalink
Improve model architecture message
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jul 3, 2023
1 parent 6e2362b commit 1f44ef8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/llm-base/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ pub enum LoadError {
/// There is insufficient information to guess the model architecture from the provided file.
///
/// A model architecture must be provided to load the model.
#[error("could not guess model architecture from {path:?}")]
#[error(
"could not guess model architecture from {path:?}. Please provide a model architecture."
)]
MissingModelArchitecture {
/// The path that failed.
path: PathBuf,
Expand Down
2 changes: 1 addition & 1 deletion crates/llm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ macro_rules! define_models {
)*

_ => Err(UnsupportedModelArchitecture(format!(
"{s} is not a supported model architecture"
"{s} is not one of supported model architectures: {:?}", ModelArchitecture::ALL
))),
}
}
Expand Down

0 comments on commit 1f44ef8

Please sign in to comment.