patch: Add pre-tokenizer metadata to phi-2

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>
This commit is contained in:
teleprint-me 2024-05-17 03:18:50 -04:00
parent cd0e3d5bdd
commit e7c7ae8b6e
No known key found for this signature in database
GPG key ID: B0D11345E65C4D48

View file

@ -1723,6 +1723,7 @@ class Phi2Model(Model):
n_head = self.find_hparam(["num_attention_heads", "n_head"])
self.gguf_writer.add_name("Phi2")
self.gguf_writer.add_tokenizer_pre("gpt-2")
self.gguf_writer.add_context_length(self.find_hparam(["n_positions", "max_position_embeddings"]))
self.gguf_writer.add_embedding_length(n_embd)