-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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 local agent #23438
Add local agent #23438
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Looks great to me! cc @gante for the criteria :)
model = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path, **kwargs) | ||
tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path, **kwargs) |
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.
Nice shortcut!
return result | ||
|
||
|
||
class StopSequenceCriteria(StoppingCriteria): |
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.
Can we:
- move it to the stopping criteria file? (I've seen a user asking for this)
- generalize it for the batched input case? (or add a todo, I'd be happy to expand it :D )
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.
Maybe you can move it as you add support for the batched case? I don't need it for the agents and it's not an obvious thing to do (that's the reason I didn't put this in the stopping criteria file by the way).
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.
Sure, I can take care of it afterwards 👍
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!
* Add local agent * Document LocalAgent
* Add local agent * Document LocalAgent
* Add local agent * Document LocalAgent
What does this PR do?
This PR adds support for a local agent running the model to generate code on the user's machine.