CodeWithKyrian / transformers-php

Transformers PHP is a toolkit for PHP developers to add machine learning magic to their projects easily.
https://codewithkyrian.github.io/transformers-php/
Apache License 2.0
291 stars 16 forks source link

What's the correct way to invoke feature extraction with multiple inputs? #44

Open timwhitlock opened 1 month ago

timwhitlock commented 1 month ago

Your question

The docs here state that you can pass an array of strings for batch processing, but when I do this (like the example with pooling: mean) I get different embedding vectors than if I invoke with strings one-by-one.

Is this because of the pooling value? Should it be set to "cls" or "none"? Other options don't seem to return array keys corresponding to the input keys.