#161 · Primary category: Deep Learning Frameworks

transformers-php

huggingface ml php transformers

Transformers PHP is a toolkit for PHP developers to add machine learning magic to their projects easily.

Project last updated:09/15/25

GitHub Stars

765

Forks

50

Contributors

13

License

Apache-2.0

Why we included this project

PHP has rarely had a clean way to run transformer models, and this library fixes that by bringing the Hugging Face pipeline API to the language. You load ONNX-converted models and run NLP tasks like text generation, translation, or summarization inside your own application, with no Python service or hosted API in between. Because the API tracks the Python and Transformers.js versions, anyone familiar with those ecosystems can get going fast, and models already converted for Transformers.js on the Hugging Face hub generally load without extra work. Inference happens locally through ONNX Runtime via PHP's FFI extension, so you avoid standing up a separate model server. If you work in PHP and want to add NLP features without changing your stack, this is a straightforward option.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category