diff --git a/convert/convert_phi3.go b/convert/convert_phi3.go index 7aa3ed15..0f645217 100644 --- a/convert/convert_phi3.go +++ b/convert/convert_phi3.go @@ -58,7 +58,7 @@ func (p *phi3) KV(t *Tokenizer) llm.KV { switch p.RopeScaling.Type { case "": // no scaling - case "su": + case "su", "longrope": kv["phi3.rope.scaling.attn_factor"] = float32(max(math.Sqrt(1+math.Log(scale)/math.Log(float64(p.OriginalMaxPositionEmbeddings))), 1.0)) case "yarn": kv["phi3.rope.scaling.attn_factor"] = float32(max(0.1*math.Log(scale)+1.0, 1.0))