{"id":13861729,"url":"https://github.com/simonw/llm-embed-onnx","last_synced_at":"2025-09-09T18:54:05.769Z","repository":{"id":219645600,"uuid":"749543562","full_name":"simonw/llm-embed-onnx","owner":"simonw","description":"Run embedding models using ONNX","archived":false,"fork":false,"pushed_at":"2024-01-29T05:23:28.000Z","size":14,"stargazers_count":23,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T07:53:39.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T21:43:43.000Z","updated_at":"2024-08-05T11:26:58.000Z","dependencies_parsed_at":"2024-08-05T06:13:54.621Z","dependency_job_id":null,"html_url":"https://github.com/simonw/llm-embed-onnx","commit_stats":null,"previous_names":["simonw/llm-embed-onnx"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-embed-onnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-embed-onnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-embed-onnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-embed-onnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/llm-embed-onnx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249753093,"owners_count":21320664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T06:01:28.941Z","updated_at":"2025-04-19T17:52:29.186Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# llm-embed-onnx\n\n[![PyPI](https://img.shields.io/pypi/v/llm-embed-onnx.svg)](https://pypi.org/project/llm-embed-onnx/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/llm-embed-onnx?include_prereleases\u0026label=changelog)](https://github.com/simonw/llm-embed-onnx/releases)\n[![Tests](https://github.com/simonw/llm-embed-onnx/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/llm-embed-onnx/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-embed-onnx/blob/main/LICENSE)\n\nRun embedding models using the [ONNX Runtime](https://onnxruntime.ai)\n\nThis LLM plugin is a wrapper around [onnx_embedding_models](https://github.com/taylorai/onnx_embedding_models) by Benjamin Anderson.\n\n## Installation\n\nInstall this plugin in the same environment as [LLM](https://llm.datasette.io/).\n```bash\nllm install llm-embed-onnx\n```\n## Usage\n\nThis plugin adds the following embedding models, which can be listed using `llm embed-models`:\n\n```\nonnx-bge-micro\nonnx-gte-tiny\nonnx-minilm-l6\nonnx-minilm-l12\nonnx-bge-small\nonnx-bge-base\nonnx-bge-large\n```\n\nYou can run any of these models using `llm embed` command:\n\n```bash\nllm embed -m onnx-bge-micro -c \"Example content\"\n```\nThis will output a 384 length JSON array of floating point numbers, starting:\n```\n[-0.03910085942622519, -0.0030843335461659795, 0.032797761260860724,\n```\nThe first time you use any of these models the model will be downloaded to the `llm_embed_onnx` directory in your [LLM data directory](https://llm.datasette.io/en/stable/setup.html#setting-a-custom-directory-location). On macOS this defaults to:\n\n`~/Library/Application Support/io.datasette.llm/llm_embed_onnx`\n\nFor more on how to use these embedding models see [the LLM embeddings documentation](https://llm.datasette.io/en/stable/embeddings/index.html).\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd llm-embed-onnx\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\nllm install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-embed-onnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fllm-embed-onnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-embed-onnx/lists"}