{"id":13688780,"url":"https://github.com/explosion/curated-transformers","last_synced_at":"2025-10-23T23:33:01.720Z","repository":{"id":60493344,"uuid":"536492655","full_name":"explosion/curated-transformers","owner":"explosion","description":"🤖 A PyTorch library of curated Transformer models and their composable components","archived":false,"fork":false,"pushed_at":"2024-04-17T17:06:21.000Z","size":1538,"stargazers_count":893,"open_issues_count":17,"forks_count":35,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-10-21T21:03:04.093Z","etag":null,"topics":["albert","bert","camembert","dolly2","falcon","gptneox","llama","llm","llms","nlp","pytorch","roberta","transformer","transformers","xlm-roberta"],"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/explosion.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":"2022-09-14T08:54:43.000Z","updated_at":"2025-10-04T14:13:45.000Z","dependencies_parsed_at":"2023-10-02T09:12:42.009Z","dependency_job_id":"b0e4ced3-982d-4f3e-bf18-841dbb2c3e72","html_url":"https://github.com/explosion/curated-transformers","commit_stats":{"total_commits":375,"total_committers":8,"mean_commits":46.875,"dds":"0.32266666666666666","last_synced_commit":"23f3a1b4ec821dc8e3c22ba91a4d46b40669f467"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/explosion/curated-transformers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fcurated-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fcurated-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fcurated-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fcurated-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explosion","download_url":"https://codeload.github.com/explosion/curated-transformers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fcurated-transformers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280699786,"owners_count":26375697,"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-10-23T02:00:06.710Z","response_time":142,"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":["albert","bert","camembert","dolly2","falcon","gptneox","llama","llm","llms","nlp","pytorch","roberta","transformer","transformers","xlm-roberta"],"created_at":"2024-08-02T15:01:22.577Z","updated_at":"2025-10-23T23:33:01.687Z","avatar_url":"https://github.com/explosion.png","language":"Python","readme":"\u003cimg src=\"docs/source/logo.png\" width=\"100\" align=\"right\"/\u003e\n\n# Curated Transformers\n\n[![Documentation Status](https://readthedocs.org/projects/button/badge/?version=latest)](https://curated-transformers.readthedocs.io/en/latest/?badge=latest)\n[![pypi Version](https://img.shields.io/pypi/v/curated-transformers.svg?style=flat-square\u0026logo=pypi\u0026logoColor=white)](https://pypi.org/project/curated-transformers/)\n\n**State-of-the-art transformers, brick by brick**\n\nCurated Transformers is a transformer library for PyTorch. It provides\nstate-of-the-art models that are composed from a set of reusable\ncomponents. The stand-out features of Curated Transformer are:\n\n- ⚡️ Supports state-of-the art transformer models, including LLMs such\n  as Falcon, Llama, and Dolly v2.\n- 👩‍🎨 Each model is composed from a set of reusable building blocks,\n  providing many benefits:\n  - Implementing a feature or bugfix benefits all models. For example,\n    all models support 4/8-bit inference through the\n    [`bitsandbytes`](https://github.com/TimDettmers/bitsandbytes) library\n    and each model can use the PyTorch `meta` device to avoid unnecessary\n    allocations and initialization.\n  - Adding new models to the library is low-effort.\n  - Do you want to try a new transformer architecture? A BERT encoder\n    with rotary embeddings? You can make it in a pinch.\n- 💎 Consistent type annotations of all public APIs:\n  - Get great coding support from your IDE.\n  - Integrates well with your existing type-checked code.\n- 🎓 Great for education, because the building blocks are easy to study.\n- 📦 Minimal dependencies.\n\nCurated Transformers has been production-tested by [Explosion](http://explosion.ai/)\nand will be used as the default transformer implementation in spaCy 3.7.\n\n## 🧰 Supported Model Architectures\n\nSupported encoder-only models:\n\n- ALBERT\n- BERT\n- CamemBERT\n- RoBERTa\n- XLM-RoBERTa\n\nSupported decoder-only models:\n\n- Falcon\n- GPT-NeoX\n- Llama 1/2\n- MPT\n\nGenerator wrappers:\n\n- Dolly v2\n- Falcon\n- Llama 1/2\n- MPT\n\nAll types of models can be loaded from Huggingface Hub.\n\nspaCy integration for curated transformers is provided by the\n[`spacy-curated-transformers`](https://github.com/explosion/spacy-curated-transformers)\npackage.\n\n## ⏳ Install\n\n```bash\npip install curated-transformers\n```\n\n### CUDA support\n\nThe default Linux build of PyTorch is built with CUDA 11.7 support. You should\nexplicitly install a CUDA build in the following cases:\n\n- If you want to use Curated Transformers on Windows.\n- If you want to use Curated Transformers on Linux with Ada-generation GPUs.\n  The standard PyTorch build supports Ada GPUs, but you can get considerable\n  performance improvements by installing PyTorch with CUDA 11.8 support.\n\nIn both cases, you can install PyTorch with:\n\n```bash\npip install torch --index-url https://download.pytorch.org/whl/cu118\n```\n\n## 🏃‍♀️ Usage Example\n\n```python-console\n\u003e\u003e\u003e import torch\n\u003e\u003e\u003e from curated_transformers.generation import AutoGenerator, GreedyGeneratorConfig\n\u003e\u003e\u003e generator = AutoGenerator.from_hf_hub(name=\"tiiuae/falcon-7b-instruct\", device=torch.device(\"cuda\"))\n\u003e\u003e\u003e generator([\"What is Python in one sentence?\", \"What is Rust in one sentence?\"], GreedyGeneratorConfig())\n['Python is a high-level programming language that is easy to learn and widely used for web development, data analysis, and automation.',\n 'Rust is a programming language that is designed to be a safe, concurrent, and efficient replacement for C++.']\n```\n\nYou can find more [usage examples](https://curated-transformers.readthedocs.io/en/latest/usage.html)\nin the documentation. You can also find example programs that use Curated Transformers in the\n[`examples`](examples/) directory.\n\n## 📚 Documentation\n\nYou can read more about how to use Curated Transformers here:\n\n- [Overview](https://curated-transformers.readthedocs.io/en/v1.2.x/) ([Development](https://curated-transformers.readthedocs.io/en/latest/))\n- [Usage](https://curated-transformers.readthedocs.io/en/v1.2.x/usage.html) ([Development](https://curated-transformers.readthedocs.io/en/latest/usage.html))\n- [API](https://curated-transformers.readthedocs.io/en/v1.2.x/api.html) ([Development](https://curated-transformers.readthedocs.io/en/latest/api.html))\n\n## 🗜️ Quantization\n\n`curated-transformers` supports dynamic 8-bit and 4-bit quantization of models by leveraging the [`bitsandbytes` library](https://github.com/TimDettmers/bitsandbytes).\n\nUse the quantization variant to automatically install the necessary dependencies:\n\n```bash\npip install curated-transformers[quantization]\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fcurated-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplosion%2Fcurated-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fcurated-transformers/lists"}