{"id":16999871,"url":"https://github.com/davidberenstein1957/fast-sentence-transformers","last_synced_at":"2025-08-24T13:07:12.842Z","repository":{"id":37846710,"uuid":"483678677","full_name":"davidberenstein1957/fast-sentence-transformers","owner":"davidberenstein1957","description":"Simply, faster, sentence-transformers","archived":false,"fork":false,"pushed_at":"2024-08-27T07:38:17.000Z","size":467,"stargazers_count":143,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-09T14:12:23.819Z","etag":null,"topics":["embeddings","hacktoberfest","nlp","onnx","sentence-transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidberenstein1957.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-20T14:03:01.000Z","updated_at":"2025-06-10T12:30:01.000Z","dependencies_parsed_at":"2024-08-26T20:54:45.565Z","dependency_job_id":"1e85567b-449c-4faa-92cf-35499ba13543","html_url":"https://github.com/davidberenstein1957/fast-sentence-transformers","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":"0.34090909090909094","last_synced_commit":"3f277ee7b49d78e0a61fe72d82e02064d4a33e71"},"previous_names":["pandora-intelligence/fast-sentence-transformers"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/davidberenstein1957/fast-sentence-transformers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidberenstein1957%2Ffast-sentence-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidberenstein1957%2Ffast-sentence-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidberenstein1957%2Ffast-sentence-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidberenstein1957%2Ffast-sentence-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidberenstein1957","download_url":"https://codeload.github.com/davidberenstein1957/fast-sentence-transformers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidberenstein1957%2Ffast-sentence-transformers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268717001,"owners_count":24295619,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","hacktoberfest","nlp","onnx","sentence-transformers"],"created_at":"2024-10-14T04:10:25.841Z","updated_at":"2025-08-04T15:39:02.569Z","avatar_url":"https://github.com/davidberenstein1957.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Fast Sentence Transformers\n\nThis repository contains code to run faster feature extractors using tools like quantization, optimization and `ONNX`. Just run your model much faster, while using less of memory. There is not much to it!\n\n[![Python package](https://github.com/Pandora-Intelligence/fast-sentence-transformers/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/Pandora-Intelligence/fast-sentence-transformers/actions/workflows/python-package.yml)\n[![Current Release Version](https://img.shields.io/github/release/pandora-intelligence/fast-sentence-transformers.svg?style=flat-square\u0026logo=github)](https://github.com/pandora-intelligence/fast-sentence-transformers/releases)\n[![pypi Version](https://img.shields.io/pypi/v/fast-sentence-transformers.svg?style=flat-square\u0026logo=pypi\u0026logoColor=white)](https://pypi.org/project/fast-sentence-transformers/)\n[![PyPi downloads](https://static.pepy.tech/personalized-badge/fast-sentence-transformers?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=pip%20downloads)](https://pypi.org/project/fast-sentence-transformers/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)\n\n\u003e [Phillip Schmid](https://www.philschmid.de/optimize-sentence-transformers): \"We successfully quantized our vanilla Transformers model with Hugging Face and managed to accelerate our model latency from 25.6ms to 12.3ms or 2.09x while keeping 100% of the accuracy on the stsb dataset.\n\u003e But I have to say that this isn't a plug and play process you can transfer to any Transformers model, task or dataset.\"\"\n\n## Install\n\n```bash\npip install fast-sentence-transformers\n```\n\nOr, for GPU support:\n\n```bash\npip install fast-sentence-transformers[gpu]\n```\n\n## Quickstart\n\n```python\n\nfrom fast_sentence_transformers import FastSentenceTransformer as SentenceTransformer\n\n# use any sentence-transformer\nencoder = SentenceTransformer(\"sentence-transformers/all-MiniLM-L6-v2\", device=\"cpu\")\n\nencoder.encode(\"Hello hello, hey, hello hello\")\nencoder.encode([\"Life is too short to eat bad food!\"] * 2)\n```\n\n## Benchmark\n\nNon-exact, indicative benchmark for speed an memory usage with smaller and larger model on `sentence-transformers`\n\n| model                                 | Type   | default | ONNX | ONNX+quantized | ONNX+GPU |\n| ------------------------------------- | ------ | ------- | ---- | -------------- | -------- |\n| paraphrase-albert-small-v2            | memory | 1x      | 1x   | 1x             | 1x       |\n|                                       | speed  | 1x      | 2x   | 5x             | 20x      |\n| paraphrase-multilingual-mpnet-base-v2 | memory | 1x      | 1x   | 4x             | 4x       |\n|                                       | speed  | 1x      | 2x   | 5x             | 20x      |\n\n## Shout-Out\n\nThis package heavily leans on https://www.philschmid.de/optimize-sentence-transformers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidberenstein1957%2Ffast-sentence-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidberenstein1957%2Ffast-sentence-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidberenstein1957%2Ffast-sentence-transformers/lists"}