[Feature]: Multioutput models

Abierto
#485 3 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 4 días

@joein ya está trabajando en esto.

Desde el 6/10/2026.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
numpy, python

Línea de trabajo

El issue no menciona archivos ni pruebas. Empieza por localizar la interfaz del modelo predeterminado y la ruta de inferencia que devuelve arrays; después, compara los casos de embedding y pooling descritos. El trabajo estará terminado cuando exista una interfaz Multioutput definida que admita devoluciones como dict o model-output para los casos previstos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What feature would you like to request?

In some cases our default model interface returning an array of numpy arrays is not enough
There are scenarios when we want to return more than that either in order to save resources or just because there is no other way.

An example of the first case is when models can return several types of embeddings using the same backbone but different head layers, e.g. baai/bge-m3.
Or when it is desired to obtain not only pooled embedding, but also token embeddings of the penultimate layer.

Another example is colpali-like models, it is not always possible to build index on colpali embeddings since of the huge resources consumption and thus it makes it difficult to use colpali as the first stage retriever.
Instead, first stage retrieval can be implemented via colpali embeddings pooled by either rows or columns.

In the particular case of colpali, it is possible to do the pooling after inference is completed and embeddings were returned, since the number of patches into which colpali preprocessor breaks an image is known beforehand.
However, with colpali-inspired models like colqwen, it is not possible to do the pooling afterwards, because the number of patches into which these models break an image is dynamic, thus, we need to know an image size to get the number of patches.

In order to handle these cases, we want to introduce new family of Multioutput classes with an interface allowing to return either dict or special model output objects.

Is there any additional information you would like to provide?

No response

Lenguaje dominante
Python
Estrellas
3.3k
Forks
314
Merge medio
5 d 7 h
PR fusionados (30 d)
23

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de qdrant/fastembed

Todos los issues de qdrant/fastembed

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.