PHPackages                             textualization/sentence-transphormers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. textualization/sentence-transphormers

ActiveLibrary

textualization/sentence-transphormers
=====================================

Compute Sentence Transformer embeddings using ONNX framework.

v0.0.10(7mo ago)1861[1 issues](https://github.com/Textualization/sentence-transphormers/issues)[1 PRs](https://github.com/Textualization/sentence-transphormers/pulls)MITPHP

Since Feb 8Pushed 7mo agoCompare

[ Source](https://github.com/Textualization/sentence-transphormers)[ Packagist](https://packagist.org/packages/textualization/sentence-transphormers)[ Fund](https://ko-fi.com/textualization)[ RSS](/packages/textualization-sentence-transphormers/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (11)Used By (0)

Compute RoBERTa sentence embeddings in PHP using ONNX framework.
================================================================

[](#compute-roberta-sentence-embeddings-in-php-using-onnx-framework)

This brings the power of Sentence Transformers to the PHP world.

Installation
------------

[](#installation)

Add this project to your dependencies

```
composer require textualization/sentence-transphormers
composer update

```

Before using it, you will need to install the ONNX framework:

```
composer exec -- php -r "require 'vendor/autoload.php'; OnnxRuntime\Vendor::check();"

```

and download the Distill RoBERTa v1 ONNX model (this takes a while, the model is 362Mb in size):

```
composer exec -- php -r "require 'vendor/autoload.php'; Textualization\SentenceTransphormers\Vendor::check();"

```

Multilingual model
------------------

[](#multilingual-model)

To use the multilingual model. Additional dependencies are needed.

Download the SentencePiece library:

```
composer exec -- php -r "require 'vendor/autoload.php'; Textualization\SentencePiece\Vendor::check();"

```

Download the XLM Tokenizer SentencePiece BPE model:

```
composer exec -- php -r "require 'vendor/autoload.php'; Textualization\Ropherta\Tokenizer\Vendor::check();"

```

Download the Multilingual-E5-small model (471Mb in size):

```
composer exec -- php -r "require 'vendor/autoload.php'; Textualization\SentenceTransphormers\Vendor::check(true);"

```

Please note: if you had downloaded the monolingual model you'll need to delete it first. Currently only one model is possible, this limitation will be lifted in future versions.

Computing embeddings
--------------------

[](#computing-embeddings)

```
$model = new SentenceRophertaModel();

$emb = $model->embeddings("Text");
```

Check `\Textualization\Ropherta\Distances` to check whether two embeddings are closer to each other.

Model employed
--------------

[](#model-employed)

The model being used is an ONNX export from [sentence-transformers/all-distilroberta-v1](https://huggingface.co/sentence-transformers/all-distilroberta-v1), hosted at HuggingFace Hub: [textualization/all-distilroberta-v1](https://huggingface.co/textualization/all-distilroberta-v1).

The multilingual model is [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small), exported to ONNX by the authors.

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance42

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~134 days

Total

10

Last Release

232d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/970f356fe04869413a212efcf75d122352265e34d9cd35d85b0fe7d51ef25162?d=identicon)[textualization](/maintainers/textualization)

---

Top Contributors

[![DrDub](https://avatars.githubusercontent.com/u/315403?v=4)](https://github.com/DrDub "DrDub (14 commits)")

---

Tags

deep-learningdeep-neural-networksembeddingsnatural-language-processingphpsearch

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/textualization-sentence-transphormers/health.svg)

```
[![Health](https://phpackages.com/badges/textualization-sentence-transphormers/health.svg)](https://phpackages.com/packages/textualization-sentence-transphormers)
```

###  Alternatives

[allanpichardo/mysql-vector

Perform vector operations natively on MySQL

8214.8k](/packages/allanpichardo-mysql-vector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
