-
Notifications
You must be signed in to change notification settings - Fork 32
feat: OpenAI-compatible API Endpoints for Embedding Models #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: r25.10
Are you sure you want to change the base?
feat: OpenAI-compatible API Endpoints for Embedding Models #104
Conversation
0acb76f to
7d06043
Compare
7d06043 to
2c3e148
Compare
…end into yinggeh/tri-49-request-for-openai-compatible-api-endpoints-for-triton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few comments.
src/utils/request.py
Outdated
| pooling_params = PoolingParams(dimensions=dims, task="embed") | ||
| return pooling_params | ||
|
|
||
| def create_response(self, request_output): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have a type hint on request_output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/utils/request.py
Outdated
| async for response in response_iterator: | ||
| yield response | ||
|
|
||
| def create_response(self, request_output_state, request_output, prepend_input): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have type hints on request_output_state, request_output, and prepend_input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/utils/request.py
Outdated
|
|
||
|
|
||
| class RequestBase: | ||
| def __init__(self, request, executor_callback, output_dtype): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have type hints on request, executor_callback, and output_dtype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| from abc import abstractmethod | ||
| from io import BytesIO | ||
|
|
||
| import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is using numpy (CPU) good enough?
do we want to leverage cupy (GPU)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that vLLM engine takes care of it.
Enable vLLM to load embedding model and execute embedding requests