Skip to content
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

Add router name to /info endpoint #1854

Merged
merged 1 commit into from
May 3, 2024
Merged

Add router name to /info endpoint #1854

merged 1 commit into from
May 3, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented May 3, 2024

Add router key in /info endpoint and set it to env!("CARGO_PKG_NAME") => so always set to "text-generation-router" in TGI. Happy to change the naming if you think of a better one (framework? package_name?)

The goal is to use this information in InferenceClient to know the model is served with TGI. At the moment we can use https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2/info to infer it is TGI-served because it returns information but having a proper key would be better.

For context, a transformers-served model is only outputting {"ok": "ok"} (see here).

Copy link
Collaborator

@drbh drbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drbh drbh merged commit bb2b295 into main May 3, 2024
7 checks passed
@drbh drbh deleted the add-framework-to-info-route branch May 3, 2024 14:39
Nilabhra pushed a commit to TII-AI-Research-Center/text-generation-inference that referenced this pull request May 14, 2024
Add `router` key in `/info` endpoint and set it to
`env!("CARGO_PKG_NAME")` => so always set to `"text-generation-router"`
in TGI. Happy to change the naming if you think of a better one
(framework? package_name?)

The goal is to use this information in `InferenceClient` to know the
model is served with TGI. At the moment we can use
https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2/info
to infer it is TGI-served because it returns information but having a
proper key would be better.


For context, a transformers-served model is only outputting `{"ok":
"ok"}` (see
[here](https://api-inference.huggingface.co/models/microsoft/DialoGPT-large/info)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants