OpenSource-Hub

transformers

フレームワーク

huggingface/transformers

クロスモーダル事前学習モデルの推論・トレーニングフレームワーク。テキスト、ビジョン、オーディオなどをサポートします。

概要

Hugging Face Transformers はモデル定義フレームワークであり、テキスト、ビジョン、オーディオ、マルチモーダルタスク向けの数千の事前学習モデルを提供します。推論とトレーニングの両方をサポートし、主要なトレーニングフレームワークや推論エンジンと互換性を持ち、モデル定義を一元管理することでAIエコシステムの相互運用性を促進します。

README プレビュー

\n\n\n  \n    \n    \n    \n  \n  \n  \n\n\n\n    \n    \n    \n    \n    \n    \n    \n\n\n\n    \n        English |\n        简体中文 |\n        繁體中文 |\n        한국어 |\n        Español |\n        日本語 |\n        हिन्दी |\n        Русский |\n        Português |\n        తెలుగు |\n        Français |\n        Deutsch |\n        Italiano |\n        Tiếng Việt |\n        العربية |\n        اردو |\n        বাংলা |\n        فارسی |\n        Türkçe |\n    \n\n\n\n    State-of-the-art pretrained models for inference and training\n\n\n\n    \n\n\nTransformers acts as the model-definition framework for state-of-the-art machine learning with text, computer\nvision, audio, video, and multimodal models, for both inference and training.\n\nIt centralizes the model definition so that this definition is agreed upon across the ecosystem. `transformers` is the\npivot across frameworks: if a model definition is supported, it will be compatible with the majority of training\nframeworks (Axolotl, Unsloth, DeepSpeed, FSDP, PyTorch-Lightning, ...), inference engines (vLLM, SGLang, TGI, ...),\nand adjacent modeling libraries (llama.cpp, mlx, ...) which leverage the model definition from `transformers`.\n\nWe pledge to help support new state-of-the-art models and democratize their usage by having their model definition be\nsimple, customizable, and efficient.\n\nThere are over 1M+ Transformers [model checkpoints](https://huggingface.co/models?library=transformers&sort=trending) on the [Hugging Face Hub](https://huggingface.co/models) you can use.\n\nExplore the [Hub](https://huggingface.co/) today to find a model and use Transformers to help you get started right away.\n\n## Installation\n\nTransformers works with Python 3.10+, and [PyTorch](https://pytorch.org/get-started/locally/) 2.5+.\n\nCreate and activate a virtual environment with [venv](https://docs.python.org/3/library/venv.html) or [uv](https://docs.astral.sh/uv/), a fast Rust-based Python package and project manager.\n\n```py\n# venv\