huggingface / text-embeddings-inference

A blazing fast inference solution for text embeddings models
https://huggingface.co/docs/text-embeddings-inference/quick_tour
Apache License 2.0
2.6k stars 162 forks source link

Input validation error: `inputs` must have less than 512 tokens. Given: 534 #356

Open gctian opened 1 month ago

gctian commented 1 month ago

System Info

Information

Tasks

Reproduction

text-embeddings-router start an embedding serving, but always got the error 【 Input validation error: inputs must have less than 512 tokens】,which param should i use to change max tokens of input?512 is too short, i can not find true param in RAEDME or --help

Expected behavior

which param should i use to change max tokens of input?

vrdn-23 commented 1 month ago

Which model are you using? The max length of inputs is usually determined by the model max length and TEI usually provides a truncate parameter to decide if you want to shorten the text or return an error

ellahe-git commented 1 month ago

Which model are you using? The max length of inputs is usually determined by the model max length and TEI usually provides a truncate parameter to decide if you want to shorten the text or return an error

To solve the issue of 'Input validation error: inputs must have less than 512 tokens', I added the auto runcate parameter to' true 'when starting the Docker image, but the image failed to start. What is the reason for this? The startup command is as follows: Docker run -- rm -- gpus all - d - p 18082:80-- name multilingual-e5-large-v 'model mount address'' mirror address' -- model id 'model id' -- auto-truncate true

gctian commented 1 month ago

Which model are you using? The max length of inputs is usually determined by the model max length and TEI usually provides a truncate parameter to decide if you want to shorten the text or return an error

sorry, it's the problem of embedding model, not TEI

ellahe-git commented 1 month ago

Which model are you using? The max length of inputs is usually determined by the model max length and TEI usually provides a truncate parameter to decide if you want to shorten the text or return an error

sorry, it's the problem of embedding model, not TEI

When starting the tei image, adding the parameter --auto-truncate true, the image cannot be pulled up. What is the reason for this

gctian commented 1 month ago

Which model are you using? The max length of inputs is usually determined by the model max length and TEI usually provides a truncate parameter to decide if you want to shorten the text or return an error

sorry, it's the problem of embedding model, not TEI

When starting the tei image, adding the parameter --auto-truncate true, the image cannot be pulled up. What is the reason for this

i'm using TEI client not docker image.

raaj1v commented 2 weeks ago

I'm also facing the same issue, with inputs must have less than 512 tokens