Skip to content

What's the difference between ollama.embeddings() and ollama.embed() ? Why do the methods return different embeddings for the same model (code in description)? #228

@rustam-007

Description

@rustam-007

Hello! I am calling both methods to compare the embeddings they return.

ll = ollama.embeddings(model='llama3.2',
prompt = 'The sky is blue because of rayleigh scattering'
)
llm = dict(ll)
llm['embedding']
ll = ollama.embed(model='llama3.2',
input = 'The sky is blue because of rayleigh scattering'
)
llm = dict(ll)
llm['embeddings'][0]

They return different embeddings for the same model. Why is that?

Thank you in advance

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