Add support for the phi-hermes finetuned model. (#1192)

This commit is contained in:
Laurent Mazare
2023-10-27 05:57:08 +01:00
committed by GitHub
parent 0ec5ebcec4
commit 70d06ab4b0
2 changed files with 28 additions and 3 deletions

View File

@ -73,6 +73,23 @@ impl Config {
pad_vocab_size_multiple: 64,
}
}
// https://huggingface.co/teknium/Phi-Hermes-1.3B/blob/main/config.json
pub fn phi_hermes_1_3b() -> Self {
Self {
vocab_size: 50304,
n_positions: 2048,
n_embd: 2048,
n_layer: 24,
n_inner: None,
n_head: 32,
rotary_dim: usize::min(32, 2048 / 32),
activation_function: Activation::NewGelu,
layer_norm_epsilon: 1e-5,
tie_word_embeddings: false,
pad_vocab_size_multiple: 64,
}
}
}
#[derive(Debug, Clone)]