-
Notifications
You must be signed in to change notification settings - Fork 358
Updated tgi_model and added parameters for endpoint_model #208
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
Updated tgi_model and added parameters for endpoint_model #208
Conversation
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.
Overall, this LGTM!
It would be great if you could add some doc on the relevant parameters you added + edited the README to explain how to launch the different model types now
Can you fix the style using ruff too? |
Done! Please let me know what you think of the additions to the README. |
This is great, thank you! |
…e#208) * Added image url parameter * Fixed up tgi model config * Undid tgi available check * Adjust tgi parameter names, and checked for attr existence * Fixed task Id in argparse * Removed obfuscation from private functions, to allow inheritance to override * Updated tgi model to inherit from endpoint and just modify client calls * Added option to specify model id in config for tgi model * Added option to specify custom env vars * Updated env vras * Applied ruff format * Added docs + readme * Ruff format
* Added image url parameter * Fixed up tgi model config * Undid tgi available check * Adjust tgi parameter names, and checked for attr existence * Fixed task Id in argparse * Removed obfuscation from private functions, to allow inheritance to override * Updated tgi model to inherit from endpoint and just modify client calls * Added option to specify model id in config for tgi model * Added option to specify custom env vars * Updated env vras * Applied ruff format * Added docs + readme * Ruff format
* Added image url parameter * Fixed up tgi model config * Undid tgi available check * Adjust tgi parameter names, and checked for attr existence * Fixed task Id in argparse * Removed obfuscation from private functions, to allow inheritance to override * Updated tgi model to inherit from endpoint and just modify client calls * Added option to specify model id in config for tgi model * Added option to specify custom env vars * Updated env vras * Applied ruff format * Added docs + readme * Ruff format
1] Updated tgi_model to inherit from LightevalModel, including implementing all the abstract properties. Since the TGIClient and the InferenceClient produce the same format (since they both use TGI), I had TGIClient inherit from InferenceClient, and then just override the functions that use the client. In order to do that, I had to update the private functions in InferenceClient to use one underscore so the names aren't obfuscated.
2] Added two optional fields to the endpoint_model config - specifying the image_url and allowing for any other environment variables. This will allow users to update to later versions of the TGI container without having to rebuild, or to specify other properties like max_input_tokens.