mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
Fmt.
This commit is contained in:
parent
1c49da0c2d
commit
6fe66e8261
@ -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,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user