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. [Search &amp; Filtering](/categories/search)
4. /
5. textualization/sentence-transphormers

ActiveLibrary[Search &amp; Filtering](/categories/search)

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

Compute Sentence Transformer embeddings using ONNX framework.

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

Since Feb 8Pushed 9mo 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 1mo ago

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

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 49% of packages

Maintenance41

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

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

280d 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

[ruflin/elastica

Elasticsearch Client

2.3k50.4M202](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M64](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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