Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add dimensions parameter support for embeddings endpoint (Matryoshka)

Đang mở
#4,542 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@divyanshAgarwal123 đang làm issue này rồi.

Từ ngày 1/10/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
api, machine-learning

Hướng nghiên cứu

Bắt đầu từ EmbeddingsCalculatorOV và phần xử lý yêu cầu /v3/embeddings, sau đó lần theo luồng tính toán embedding hiện có. Hoàn thành khi một yêu cầu có dimensions trả về các embedding đã bị cắt ngắn và chuẩn hóa lại, trong khi các yêu cầu không có dimensions vẫn giữ nguyên đầu ra đầy đủ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

The /v3/embeddings endpoint currently doesn't support the dimensions parameter from the OpenAI API.

Many modern embedding models (like ibm-granite/granite-embedding-311m-multilingual-r2, nomic-embed-text, text-embedding-3-small) support Matryoshka Representation Learning, which allows truncating embeddings to smaller dimensions without retraining.

Request

Add support for the dimensions parameter in EmbeddingsCalculatorOV to truncate and re-normalize the output embeddings.

Example request
{
  "model": "my-embedding-model",
  "input": "Hello world",
  "dimensions": 256
}
Expected behavior

Return embeddings truncated to 256 dimensions (instead of full 768), re-normalized.

References
Ngôn ngữ chính
C++
Star
947
Fork
280
Merge trung bình
3 ngày 13 giờ
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openvinotoolkit/model_server

Tất cả issue của openvinotoolkit/model_server

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.