Embeddings generation support #201
-
|
Currently, without using Foundry Local, I can generate embeddings using the Phi series ONNX models. It would be nice for Foundry Local to add support for that so that I don't have external dependencies, like Ollama or loading the same Phi model in a Docker container. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Tagging @MaanavD for visibility. |
Beta Was this translation helpful? Give feedback.
-
|
I think this is a good thing to add to foundry local |
Beta Was this translation helpful? Give feedback.
-
|
Hi @chuckbeasley, Embeddings are actually already supported in Foundry Local via the OpenAI-compatible To use them: foundry model download qwen3-embedding-0.6b
foundry model load qwen3-embedding-0.6bThen call the API: curl http://127.0.0.1:<port>/v1/embeddings \
-H "Content-Type: application/json" \
-d '{"model":"qwen3-embedding-0.6b","input":"hello world"}'Or from Python with the OpenAI SDK: from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:<port>/v1", api_key="none")
resp = client.embeddings.create(model="qwen3-embedding-0.6b", input="hello world")
print(resp.data[0].embedding)No CLI command for embeddings yet (only HTTP API), but the functionality is there. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @chuckbeasley,
Embeddings are actually already supported in Foundry Local via the OpenAI-compatible
/v1/embeddingsendpoint. The catalog includes embedding models: