To reproduce, run the example from README.md with a reasonable model and ask "What is an animal similar to an alpaca?". The response should terminate generation including the word "llama" based on the configuration in the example llama.SetStopWords("llama"), but instead it will happily banter on about llama being a similar animal. This may be the code that is turning a Go []string into a char*, since it does something like &[]C.char, which is a pointer to a Go array of CStrings, which has a different memory layout than a char** of null terminated C strings.
I may be misunderstanding stop words here, or this isn't working as expected. This may also be a llama.cpp issue, it's not clear to me.
To reproduce, run the example from README.md with a reasonable model and ask "What is an animal similar to an alpaca?". The response should terminate generation including the word "llama" based on the configuration in the example
llama.SetStopWords("llama")
, but instead it will happily banter on about llama being a similar animal. This may be the code that is turning a Go []string into a char*, since it does something like &[]C.char, which is a pointer to a Go array of CStrings, which has a different memory layout than a char** of null terminated C strings.I may be misunderstanding stop words here, or this isn't working as expected. This may also be a llama.cpp issue, it's not clear to me.