This commit is contained in:
Nicolas Patry 2024-05-23 12:03:07 +00:00
parent 1c49da0c2d
commit 6fe66e8261

View File

@ -35,8 +35,13 @@ struct Config {
impl From<RawConfig> for Config { impl From<RawConfig> for Config {
fn from(other: RawConfig) -> Self { fn from(other: RawConfig) -> Self {
let max_position_embeddings = other.max_position_embeddings.or(other.max_seq_len).or(other.n_positions); let max_position_embeddings = other
Config { max_position_embeddings } .max_position_embeddings
.or(other.max_seq_len)
.or(other.n_positions);
Config {
max_position_embeddings,
}
} }
} }