Skip to content

Issue with normalize_embeddings argument in encode() method #3200

@BioMikeUkr

Description

@BioMikeUkr

I noticed that the norms of embeddings for most models are 1, I thought at first that the default value of the normalize_embeddings argument in the encode() method is True, but I found that the default value of the normalize_embeddings is False. I found that if modules.json has a module of type sentence_transformers.models.Normalize (2_Normalize), the output embeddings will always be normalized, regardless of the value of the normalize_embeddings argument. This happens because the forward() method, includes all the loaded modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions