{"id":16364683,"url":"https://github.com/anush008/fastembed-rs","last_synced_at":"2026-02-19T07:24:13.073Z","repository":{"id":197616000,"uuid":"698998233","full_name":"Anush008/fastembed-rs","owner":"Anush008","description":"Rust library for vector embeddings and reranking. Inspired by qdrant/fastembed.","archived":false,"fork":false,"pushed_at":"2026-01-19T09:35:28.000Z","size":700,"stargazers_count":727,"open_issues_count":3,"forks_count":102,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-19T23:41:51.180Z","etag":null,"topics":["embeddings","fastembed","rag","reranker","reranking","retrieval","retrieval-augmented-generation","vector-search"],"latest_commit_sha":null,"homepage":"https://docs.rs/fastembed","language":"Rust","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/Anush008.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-01T16:13:02.000Z","updated_at":"2026-01-19T02:24:01.000Z","dependencies_parsed_at":"2024-06-17T15:14:41.770Z","dependency_job_id":"8e112fda-ea4f-4124-bacc-d9570555e436","html_url":"https://github.com/Anush008/fastembed-rs","commit_stats":{"total_commits":165,"total_committers":25,"mean_commits":6.6,"dds":0.4,"last_synced_commit":"cfec7d7a8050ce93e985271fc0d07a6794624867"},"previous_names":["anush008/fastembed-rs"],"tags_count":81,"template":false,"template_full_name":null,"purl":"pkg:github/Anush008/fastembed-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ffastembed-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ffastembed-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ffastembed-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ffastembed-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anush008","download_url":"https://codeload.github.com/Anush008/fastembed-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ffastembed-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29606272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["embeddings","fastembed","rag","reranker","reranking","retrieval","retrieval-augmented-generation","vector-search"],"created_at":"2024-10-11T02:31:30.513Z","updated_at":"2026-02-19T07:24:13.041Z","avatar_url":"https://github.com/Anush008.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ca href=\"https://crates.io/crates/fastembed\"\u003eFastEmbed-rs 🦀\u003c/a\u003e\u003c/h1\u003e\n \u003ch3\u003eRust library for generating vector embeddings, reranking locally!\u003c/h3\u003e\n  \u003ca href=\"https://crates.io/crates/fastembed\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/fastembed.svg\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Anush008/fastembed-rs/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-apache-blue.svg\" alt=\"MIT Licensed\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Anush008/fastembed-rs/actions/workflows/release.yml\"\u003e\u003cimg src=\"https://github.com/Anush008/fastembed-rs/actions/workflows/release.yml/badge.svg?branch=main\" alt=\"Semantic release\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Features\n\n- Supports synchronous usage. No dependency on Tokio.\n- Uses [@pykeio/ort](https://github.com/pykeio/ort) for performant ONNX inference.\n- Uses [@huggingface/tokenizers](https://github.com/huggingface/tokenizers) for fast encodings.\n\n## Not looking for Rust?\n\n- Python: [fastembed](https://github.com/qdrant/fastembed)\n- Go: [fastembed-go](https://github.com/Anush008/fastembed-go)\n- JavaScript: [fastembed-js](https://github.com/Anush008/fastembed-js)\n\n## Models\n\n### Text Embedding\n\n- [**BAAI/bge-small-en-v1.5**](https://huggingface.co/BAAI/bge-small-en-v1.5) - Default\n- [**BAAI/bge-base-en-v1.5**](https://huggingface.co/BAAI/bge-base-en-v1.5)\n- [**BAAI/bge-large-en-v1.5**](https://huggingface.co/BAAI/bge-large-en-v1.5)\n- [**BAAI/bge-small-zh-v1.5**](https://huggingface.co/BAAI/bge-small-zh-v1.5)\n- [**BAAI/bge-large-zh-v1.5**](https://huggingface.co/BAAI/bge-large-zh-v1.5)\n- [**BAAI/bge-m3**](https://huggingface.co/BAAI/bge-m3)\n- [**sentence-transformers/all-MiniLM-L6-v2**](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)\n- [**sentence-transformers/all-MiniLM-L12-v2**](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2)\n- [**sentence-transformers/all-mpnet-base-v2**](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)\n- [**sentence-transformers/paraphrase-MiniLM-L12-v2**](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L12-v2)\n- [**sentence-transformers/paraphrase-multilingual-mpnet-base-v2**](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2)\n- [**nomic-ai/nomic-embed-text-v1**](https://huggingface.co/nomic-ai/nomic-embed-text-v1)\n- [**nomic-ai/nomic-embed-text-v1.5**](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5) - pairs with `nomic-embed-vision-v1.5` for image-to-text search\n- [**intfloat/multilingual-e5-small**](https://huggingface.co/intfloat/multilingual-e5-small)\n- [**intfloat/multilingual-e5-base**](https://huggingface.co/intfloat/multilingual-e5-base)\n- [**intfloat/multilingual-e5-large**](https://huggingface.co/intfloat/multilingual-e5-large)\n- [**mixedbread-ai/mxbai-embed-large-v1**](https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1)\n- [**Alibaba-NLP/gte-base-en-v1.5**](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5)\n- [**Alibaba-NLP/gte-large-en-v1.5**](https://huggingface.co/Alibaba-NLP/gte-large-en-v1.5)\n- [**lightonai/ModernBERT-embed-large**](https://huggingface.co/lightonai/modernbert-embed-large)\n- [**Qdrant/clip-ViT-B-32-text**](https://huggingface.co/Qdrant/clip-ViT-B-32-text) - pairs with `clip-ViT-B-32-vision` for image-to-text search\n- [**jinaai/jina-embeddings-v2-base-code**](https://huggingface.co/jinaai/jina-embeddings-v2-base-code)\n- [**google/embeddinggemma-300m**](https://huggingface.co/google/embeddinggemma-300m)\n- [**snowflake/snowflake-arctic-embed-xs**](https://huggingface.co/snowflake/snowflake-arctic-embed-xs)\n- [**snowflake/snowflake-arctic-embed-s**](https://huggingface.co/snowflake/snowflake-arctic-embed-s)\n- [**snowflake/snowflake-arctic-embed-m**](https://huggingface.co/snowflake/snowflake-arctic-embed-m)\n- [**snowflake/snowflake-arctic-embed-m-long**](https://huggingface.co/snowflake/snowflake-arctic-embed-m-long)\n- [**snowflake/snowflake-arctic-embed-l**](https://huggingface.co/snowflake/snowflake-arctic-embed-l)\n\nQuantized versions are also available for several models above (append `Q` to the model enum variant, e.g., `EmbeddingModel::BGESmallENV15Q`).\n\n### Sparse Text Embedding\n\n- [**prithivida/Splade_PP_en_v1**](https://huggingface.co/prithivida/Splade_PP_en_v1) - Default\n- [**BAAI/bge-m3**](https://huggingface.co/BAAI/bge-m3)\n\n### Image Embedding\n\n- [**Qdrant/clip-ViT-B-32-vision**](https://huggingface.co/Qdrant/clip-ViT-B-32-vision) - Default\n- [**Qdrant/resnet50-onnx**](https://huggingface.co/Qdrant/resnet50-onnx)\n- [**Qdrant/Unicom-ViT-B-16**](https://huggingface.co/Qdrant/Unicom-ViT-B-16)\n- [**Qdrant/Unicom-ViT-B-32**](https://huggingface.co/Qdrant/Unicom-ViT-B-32)\n- [**nomic-ai/nomic-embed-vision-v1.5**](https://huggingface.co/nomic-ai/nomic-embed-vision-v1.5)\n\n### Reranking\n\n- [**BAAI/bge-reranker-base**](https://huggingface.co/BAAI/bge-reranker-base) - Default\n- [**BAAI/bge-reranker-v2-m3**](https://huggingface.co/BAAI/bge-reranker-v2-m3)\n- [**jinaai/jina-reranker-v1-turbo-en**](https://huggingface.co/jinaai/jina-reranker-v1-turbo-en)\n- [**jinaai/jina-reranker-v2-base-multiligual**](https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual)\n\n## ✊ Support\n\nTo support the library, please donate to our primary upstream dependency, [`ort`](https://github.com/pykeio/ort?tab=readme-ov-file#-sponsor-ort) - The Rust wrapper for the ONNX runtime.\n\n## Installation\n\nRun the following in your project directory:\n\n```bash\ncargo add fastembed\n```\n\nOr add the following line to your Cargo.toml:\n\n```toml\n[dependencies]\nfastembed = \"5\"\n```\n\n## Usage\n\n### Text Embeddings\n\n```rust\nuse fastembed::{TextEmbedding, InitOptions, EmbeddingModel};\n\n// With default options\nlet mut model = TextEmbedding::try_new(Default::default())?;\n\n// With custom options\nlet mut model = TextEmbedding::try_new(\n    InitOptions::new(EmbeddingModel::AllMiniLML6V2).with_show_download_progress(true),\n)?;\n\nlet documents = vec![\n    \"passage: Hello, World!\",\n    \"query: Hello, World!\",\n    \"passage: This is an example passage.\",\n    // You can leave out the prefix but it's recommended\n    \"fastembed-rs is licensed under Apache 2.0\"\n];\n\n // Generate embeddings with the default batch size, 256\n let embeddings = model.embed(documents, None)?;\n\n println!(\"Embeddings length: {}\", embeddings.len()); // -\u003e Embeddings length: 4\n println!(\"Embedding dimension: {}\", embeddings[0].len()); // -\u003e Embedding dimension: 384\n```\n\n### Sparse Text Embeddings\n\n```rust\nuse fastembed::{SparseEmbedding, SparseInitOptions, SparseModel, SparseTextEmbedding};\n\n// With default options\nlet mut model = SparseTextEmbedding::try_new(Default::default())?;\n\n// With custom options\nlet mut model = SparseTextEmbedding::try_new(\n    SparseInitOptions::new(SparseModel::SPLADEPPV1).with_show_download_progress(true),\n)?;\n\nlet documents = vec![\n    \"passage: Hello, World!\",\n    \"query: Hello, World!\",\n    \"passage: This is an example passage.\",\n    \"fastembed-rs is licensed under Apache 2.0\"\n];\n\n// Generate embeddings with the default batch size, 256\nlet embeddings: Vec\u003cSparseEmbedding\u003e = model.embed(documents, None)?;\n```\n\n### Image Embeddings\n\n```rust\nuse fastembed::{ImageEmbedding, ImageInitOptions, ImageEmbeddingModel};\n\n// With default options\nlet mut model = ImageEmbedding::try_new(Default::default())?;\n\n// With custom options\nlet mut model = ImageEmbedding::try_new(\n    ImageInitOptions::new(ImageEmbeddingModel::ClipVitB32).with_show_download_progress(true),\n)?;\n\nlet images = vec![\"assets/image_0.png\", \"assets/image_1.png\"];\n\n// Generate embeddings with the default batch size, 256\nlet embeddings = model.embed(images, None)?;\n\nprintln!(\"Embeddings length: {}\", embeddings.len()); // -\u003e Embeddings length: 2\nprintln!(\"Embedding dimension: {}\", embeddings[0].len()); // -\u003e Embedding dimension: 512\n```\n\n### Candidates Reranking\n\n```rust\nuse fastembed::{TextRerank, RerankInitOptions, RerankerModel};\n\n// With default options\nlet mut model = TextRerank::try_new(Default::default())?;\n\n// With custom options\nlet mut model = TextRerank::try_new(\n    RerankInitOptions::new(RerankerModel::BGERerankerBase).with_show_download_progress(true),\n)?;\n\nlet documents = vec![\n    \"hi\",\n    \"The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear, is a bear species endemic to China.\",\n    \"panda is animal\",\n    \"i dont know\",\n    \"kind of mammal\",\n];\n\n// Rerank with the default batch size, 256 and return document contents\nlet results = model.rerank(\"what is panda?\", documents, true, None)?;\nprintln!(\"Rerank result: {:?}\", results);\n```\n\nAlternatively, local model files can be used for inference via the `try_new_from_user_defined(...)` methods of respective structs.\n\n## LICENSE\n\n[Apache 2.0](https://github.com/Anush008/fastembed-rs/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanush008%2Ffastembed-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanush008%2Ffastembed-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanush008%2Ffastembed-rs/lists"}