server : do not normalize embeddings when there is no pooling

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-12-17 13:36:32 +02:00
parent 1b18b2d7b0
commit e65556f174
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -92,6 +92,10 @@ def test_embedding_pooling_none():
for x in res.body[0]['embedding']:
assert abs(sum([x ** 2 for x in x]) - 1) > EPSILON
# make sure embedding vector is not normalized
for x in res.body[0]['embedding']:
assert abs(sum([x ** 2 for x in x]) - 1) > EPSILON
def test_embedding_pooling_none_oai():
global server