Add support for Puffin-Phi-v2. (#1110)

* Add support for Puffin-Phi-v2.

* Tweak the file name.

* Support the config for puffin-phi-v2.

* Update the readme.
This commit is contained in:
Laurent Mazare
2023-10-16 20:54:21 +01:00
committed by GitHub
parent 6c588c4792
commit af67672207
3 changed files with 47 additions and 3 deletions

View File

@ -55,6 +55,23 @@ impl Config {
pad_vocab_size_multiple: 64,
}
}
// https://huggingface.co/teknium/Puffin-Phi-v2/blob/main/config.json
pub fn puffin_phi_v2() -> 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::Gelu,
layer_norm_epsilon: 1e-5,
tie_word_embeddings: false,
pad_vocab_size_multiple: 64,
}
}
}
#[derive(Debug)]