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. |
Answered by
alxxdev
Jun 17, 2026
Replies: 3 comments
|
I think this is a good thing to add to foundry local |
0 replies
|
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! |
0 replies
Answer selected by
samuel100
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @chuckbeasley,
Embeddings are actually already supported in Foundry Local via the OpenAI-compatible
/v1/embeddingsendpoint. The catalog includes embedding models: