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

[AutoBuild] Support model selection when building agents #2413

Closed
wants to merge 9 commits into from

Conversation

whiskyboy
Copy link
Collaborator

@whiskyboy whiskyboy commented Apr 17, 2024

Why are these changes needed?

In some cases we need to set different agent with different backbone models, such as when we want to group a set of small LLMs with different capacities to complete a complex task.

This PR will allow AgentBuilder() accept a list of models as parameter to agent_model, and the builder_manager will select the most suitable model for each agent based on the agent/model profile and the task description.

Checks

@whiskyboy whiskyboy marked this pull request as ready for review April 17, 2024 13:28
Copy link
Collaborator

@thinkall thinkall left a comment

Choose a reason for hiding this comment

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

Thank you very much, @whiskyboy. LGTM!
I've only 2 tiny questions, but it's OK to ignore them.

autogen/agentchat/contrib/agent_builder.py Outdated Show resolved Hide resolved
autogen/agentchat/contrib/agent_builder.py Outdated Show resolved Hide resolved
@thinkall thinkall requested review from ekzhu and LinxinS97 April 17, 2024 14:22
Comment on lines 1400 to 1402
" # You need to provide a short description of your model here.\n",
" \"profile\": \"A pre-trained model that is good at sovling mathematical reasoning problems.\",\n",
" }\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

A description alone is not enough. Context length, cost, required GPU resources, and benchmark ranking are also necessary for model selection.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree. But I think a description is a good start point as we can always add these extra infomation into the description field. We can split these fields out once we firgure out how to use these information for model selection. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but context length and required GPU resources are crucial for successfully solving a task. We should add some restrictions or guidance for users to adopt this feature correctly, like splitting these fields out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it makes sense to me. How do you prefer to use these crucial informations? Like longer context model has a higher priority, and check the gpu's avaliablity in runtime?

Copy link
Contributor

Choose a reason for hiding this comment

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

longer context model has a higher priority, and check the gpu's availability in runtime

LGTM!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@LinxinS97 Mind reviewing again?

Copy link

gitguardian bot commented Apr 24, 2024

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic High Entropy Secret fa66435 test/oai/test_utils.py View secret
- Generic High Entropy Secret fa66435 test/oai/test_utils.py View secret
- Generic High Entropy Secret fa66435 test/oai/test_utils.py View secret
- Generic High Entropy Secret fa66435 test/oai/test_utils.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@whiskyboy whiskyboy requested a review from LinxinS97 April 25, 2024 15:23
@LinxinS97
Copy link
Contributor

@whiskyboy Have you joined the discord? Could we have a meeting? I would like to share with you some latest information on autobuild and hear about your next plan.

@whiskyboy
Copy link
Collaborator Author

whiskyboy commented Apr 26, 2024

@whiskyboy Have you joined the discord? Could we have a meeting? I would like to share with you some latest information on autobuild and hear about your next plan.

@LinxinS97 Sure, would love to. My discord name is whiskyboy0077.

BTW, are you working at Microsoft? If yes, can we talk via Teams?

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.

3 participants