mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
add trailing \n\n after <end_of_image> to match reference implementation
This commit is contained in:
@@ -133,8 +133,10 @@ func (m *Model) PostTokenize(ctx ml.Context, inputs []input.Input) ([]input.Inpu
|
|||||||
result = append(result, input.Input{Multimodal: imageToken, MultimodalHash: fnvHash.Sum64()})
|
result = append(result, input.Input{Multimodal: imageToken, MultimodalHash: fnvHash.Sum64()})
|
||||||
}
|
}
|
||||||
|
|
||||||
// <end_of_image>
|
result = append(result,
|
||||||
result = append(result, input.Input{Token: 256000})
|
input.Input{Token: 256000}, // <end_of_image>
|
||||||
|
input.Input{Token: 108}, // "\n\n"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user