-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
together, standard-tests: specify tool_choice in standard tests #25548
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@@ -28,11 +28,22 @@ class TestGroqLlama(BaseTestGroq): | |||
@property | |||
def chat_model_params(self) -> dict: | |||
return { | |||
"model": "llama-3.1-70b-versatile", | |||
"model": "llama-3.1-8b-instant", |
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.
ooc why go smaller instead of bigger
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.
We can do 70b (I changed it from 8b to 70b this morning). My thought is if they support the same features we should prefer smaller models for tests in spirit of testing functionality vs. benchmarking.
@@ -170,7 +170,14 @@ def test_stop_sequence(self, model: BaseChatModel) -> None: | |||
def test_tool_calling(self, model: BaseChatModel) -> None: | |||
if not self.has_tool_calling: | |||
pytest.skip("Test requires tool calling.") | |||
model_with_tools = model.bind_tools([magic_function]) | |||
if self.tool_choice_value == "dict": |
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.
this format is openai-specific (eg anthropic doesn't support i dont think). i actually tihnk more models support just passing in tool name as a string to bind_tools, and think thats what we'd want to standardize on from a devx perspective anyways
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.
Thanks, updated this to tool name.
Here we allow standard tests to specify a value for
tool_choice
via atool_choice_value
property, which defaults to None.Chat models available in Together have issues passing standard tool calling tests:
Specifying tool_choice also lets us remove an existing
xfail
and use a smaller model in Groq tests.