[GH-ISSUE #3570] More details in Model Info #48714

Closed
opened 2026-04-28 09:07:42 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @corani on GitHub (Apr 10, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3570

Originally assigned to: @royjhan on GitHub.

What are you trying to do?

Would it be possible to expose more information in the model info (https://github.com/ollama/ollama/blob/main/docs/api.md#show-model-information) API, such as the context length, embedding length etc.? Basically, the more the merrier 😄

This would be useful to provide additional information to the user when building a service that wraps Ollama.

How should we solve this?

No response

What is the impact of not solving this?

No response

Anything else?

No response

Originally created by @corani on GitHub (Apr 10, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3570 Originally assigned to: @royjhan on GitHub. ### What are you trying to do? Would it be possible to expose more information in the model info (https://github.com/ollama/ollama/blob/main/docs/api.md#show-model-information) API, such as the context length, embedding length etc.? Basically, the more the merrier 😄 This would be useful to provide additional information to the user when building a service that wraps Ollama. ### How should we solve this? _No response_ ### What is the impact of not solving this? _No response_ ### Anything else? _No response_
GiteaMirror added the feature request label 2026-04-28 09:07:42 -05:00
Author
Owner

@guyvdb commented on GitHub (Apr 10, 2024):

Would it be possible to determine if the model file is able to perform completion/embedding? If I am looping through all the models obtained via GET /api/tags, and am trying to preform some inference on the model, I (obviously) get an error performing inference on embedding model.

Perhaps /api/tags or /api/show could contain information on which /api/endpoints are usable with the model.

<!-- gh-comment-id:2047237724 --> @guyvdb commented on GitHub (Apr 10, 2024): Would it be possible to determine if the model file is able to perform completion/embedding? If I am looping through all the models obtained via GET /api/tags, and am trying to preform some inference on the model, I (obviously) get an error performing inference on embedding model. Perhaps /api/tags or /api/show could contain information on which /api/endpoints are usable with the model.
Author
Owner

@moracca commented on GitHub (May 10, 2024):

I second this request. Currently we get data like this from the /api/tags and /api/show endpoints (show data has been put in the "meta" key):

{"name"=>"llama3:latest",
  "model"=>"llama3:latest",
  "modified_at"=>"2024-05-07T11:51:37.263117-07:00",
  "size"=>4661224578,
  "digest"=>"a6990ed6be412c6a217614b0ec8e9cd6800a743d5dd7e1d7fbe9df09e61d5615",
  "meta"=>
   {"parent_model"=>"",
    "format"=>"gguf",
    "family"=>"llama",
    "families"=>["llama"],
    "parameter_size"=>"8B",
    "quantization_level"=>"Q4_0"},
  "id"=>"llama3:latest"},
 {"name"=>"mistral:instruct",
  "model"=>"mistral:instruct",
  "modified_at"=>"2024-05-02T10:27:48.766655-07:00",
  "size"=>4109865159,
  "digest"=>"61e88e884507ba5e06c49b40e6226884b2a16e872382c2b44a42f2d119d804a5",
  "meta"=>
   {"parent_model"=>"",
    "format"=>"gguf",
    "family"=>"llama",
    "families"=>["llama"],
    "parameter_size"=>"7B",
    "quantization_level"=>"Q4_0"},
  "id"=>"mistral:instruct"}

this is useful but what would be even more useful is to know the following:

  • maximum context window size
  • training context window
  • whether generation and/or embedding is supported (maybe this is always true?)
  • number of dimensions for embeddings (if supported)

The dimensions of the embedding is particularly important for a wrapper that plans to use the /api/embeddings output for a vector database which has a fixed vector size (for example, a postgres database with the pg_vector plugin, where the vector column was created with a specific dimensionality, e.g. 768), and attempting to store the wrong number of dimensions will result in an error. Ideally we would want to validate the model that we plan to use for embeddings to ensure the dimensionality matches.

Additionally its difficult currently to get a definitive answer as to the context size of a given model without looking up the model on hugging face etc. It would be extremely helpful if that info could be provided in the /api/show output for the model.

<!-- gh-comment-id:2105284515 --> @moracca commented on GitHub (May 10, 2024): I second this request. Currently we get data like this from the /api/tags and /api/show endpoints (show data has been put in the "meta" key): ``` {"name"=>"llama3:latest", "model"=>"llama3:latest", "modified_at"=>"2024-05-07T11:51:37.263117-07:00", "size"=>4661224578, "digest"=>"a6990ed6be412c6a217614b0ec8e9cd6800a743d5dd7e1d7fbe9df09e61d5615", "meta"=> {"parent_model"=>"", "format"=>"gguf", "family"=>"llama", "families"=>["llama"], "parameter_size"=>"8B", "quantization_level"=>"Q4_0"}, "id"=>"llama3:latest"}, {"name"=>"mistral:instruct", "model"=>"mistral:instruct", "modified_at"=>"2024-05-02T10:27:48.766655-07:00", "size"=>4109865159, "digest"=>"61e88e884507ba5e06c49b40e6226884b2a16e872382c2b44a42f2d119d804a5", "meta"=> {"parent_model"=>"", "format"=>"gguf", "family"=>"llama", "families"=>["llama"], "parameter_size"=>"7B", "quantization_level"=>"Q4_0"}, "id"=>"mistral:instruct"} ``` this is useful but what would be even more useful is to know the following: - maximum context window size - training context window - whether generation and/or embedding is supported (maybe this is always true?) - number of dimensions for embeddings (if supported) The dimensions of the embedding is particularly important for a wrapper that plans to use the /api/embeddings output for a vector database which has a fixed vector size (for example, a postgres database with the pg_vector plugin, where the vector column was created with a specific dimensionality, e.g. 768), and attempting to store the wrong number of dimensions will result in an error. Ideally we would want to validate the model that we plan to use for embeddings to ensure the dimensionality matches. Additionally its difficult currently to get a definitive answer as to the context size of a given model without looking up the model on hugging face etc. It would be extremely helpful if that info could be provided in the /api/show output for the model.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48714