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

Fix Ctrl-C not working in run_chat, run_llama #11

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Fix Ctrl-C not working in run_chat, run_llama #11

merged 3 commits into from
Jan 16, 2024

Conversation

marcom
Copy link
Owner

@marcom marcom commented Jan 11, 2024

Fixes #7.

Also only set GGML_METAL_PATH_RESOURCES on Apple machines.

Fixes #7.

Also only set GGML_METAL_PATH_RESOURCES on Apple machines.
@marcom marcom requested a review from svilupp January 11, 2024 14:46
@marcom
Copy link
Owner Author

marcom commented Jan 11, 2024

@svilupp: I changed the setting of the GGML_METAL_PATH_RESOURCES to only be done on Apple, could you check if everything still works on Apple (i'm on linux so can't check here).

@svilupp
Copy link
Collaborator

svilupp commented Jan 11, 2024

The GGML_PATH stuff works on Mac! The file is loaded as expected, happy to merge this change.

However, the SIGINT does NOT work.

Try it on your side with some long-running prompt, eg, "count from 1 to 100". Does it work?

I've played around with disabled_sigint() on different levels, but it still keeps running in the background.
When using llama.cpp directly in the terminal it works as expected.

@marcom
Copy link
Owner Author

marcom commented Jan 13, 2024

@svilupp : It seemed to work for me in CPU mode on linux, I think I tested more than one thread. I have a deadline coming up in two days, I'll investigate after that.

Edit: Just tested again with one thread as well as multi-threaded, both work on linux.

@marcom marcom merged commit 133d30c into main Jan 16, 2024
6 checks passed
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.

run_chat cannot be interrupted with CTRL+C on MacOS
2 participants