ctransformers: Segmentation fault on m1 mac
Trying simple example on m1 mac:
from ctransformers import AutoModelForCausalLM
llm = AutoModelForCausalLM.from_pretrained(
"/path/to/starcoderbase-GGML/starcoderbase-ggml-q4_0.bin",
model_type="starcoder",
lib="basic",
)
print(llm("Hi"))
leads to segmentation fault. Model works fine with ggml example code.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 65 (24 by maintainers)
Commits related to this issue
- Fix `threads` parameter See #8 — committed to marella/ctransformers by marella a year ago
Thanks a lot @s-kostyaev for helping in debugging the issue.
Finally it works. Threads parameter works. It even works with conda now. Thank you!
No worries @bgonzalezfractal
@s-kostyaev I released a fix in the latest version 0.2.1 Please update:
and let me know if it works. Please don’t set
lib=...option.Also please try running with different
threads(1, 4, 8) and let me know if you see any change in performance.Thanks. I think I found the issue. I will make a new release and will let you know in sometime.
Thanks for checking. I think cmake is just not printing that it found threads library, otherwise it wouldn’t work all.
Thanks. Tomorrow I will add a main.cc file to repo which can be run directly without Python. It should make it easy to debug the issue.
45 minutes - nothing changes