ollama icon indicating copy to clipboard operation
ollama copied to clipboard

What Modelfile options are used by Chat and what by the Embedding api endpoints

Open tzolov opened this issue 2 years ago • 1 comments

Both the generate-embeddings and the chat completion API endpoints take the options as an input parameter. E.g.

options: additional model parameters listed in the documentation for the Modelfile such as temperature

Additionally the Options definitions in api/types.go includes many undocumented options.

I don't think that the embedding endpoint uses parameters like temperature, topP or alike?

Is there a clear distinctions as what options should be used by either the chat or the embedding endpoint? And conversely what are not?

tzolov avatar Feb 04 '24 16:02 tzolov

Hopefully, invalid options will be silently ignored by the server.

mountaineerbr avatar Feb 05 '24 01:02 mountaineerbr

Hi @tzolov thanks for the issue and sorry for the errors resulting from unused options – this should be fixed now, Ollama will no longer hard error on unrecognized options.

Most of those options are indeed for inference - any sampling options such as temperature, min p etc may not matter for embedding generation

jmorganca avatar May 11 '24 00:05 jmorganca