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 example for set terminate #1042

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ajindal1
Copy link
Contributor

@ajindal1 ajindal1 commented Nov 6, 2024

Add an example for the set terminate feature using the Phi3 model

@ajindal1 ajindal1 added the 0.5.1 label Nov 7, 2024
examples/c/src/phi3_terminate.cpp Outdated Show resolved Hide resolved
examples/c/src/phi3_terminate.cpp Outdated Show resolved Hide resolved
@baijumeswani
Copy link
Contributor

baijumeswani commented Nov 7, 2024

Instead of creating a new example, could we re-use the current C++ example and modify it so that it can catch a Cntrl+C keyboard signal, and then terminate the generation, before moving on to the next user input?
This also could show users how to use this feature in a real setup.

@ajindal1
Copy link
Contributor Author

ajindal1 commented Nov 8, 2024

Instead of creating a new example, could we re-use the current C++ example and modify it so that it can catch a Cntrl+C keyboard signal, and then terminate the generation, before moving on to the next user input?

Done, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants