abetlen / abetlen/llama-cpp-python

System role not supported Gemma 2

Đang mở
#1,580 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
10.6k
Fork
1.4k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

# Prerequisites

Please answer the following questions for yourself before submitting an issue.

- [ ] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
- [ ] I carefully followed the [README.md](https://github.com/abetlen/llama-cpp-python/blob/main/README.md).
- [ X] I [searched using keywords relevant to my issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests) to make sure that I am creating a new issue that is not already open (or closed).
- [X ] I reviewed the [Discussions](https://github.com/abetlen/llama-cpp-python/discussions), and have a new bug or useful enhancement to share.

# Expected Behavior

I tried Gemma2 GGUF from hugging face. It is working fine with llama.cpp CLI on my PC.
However , I got issues while runing through llama-cpp-python package as follow :

self.llama = Llama(model_path=model_path, n_gpu_layers=n_gpu_layers, n_ctx=n_ctx, echo=echo, n_batch=n_batch,flash_attn=True)

messages = [
{
"role": "system",
"content": "You are a helpful assistant who perfectly reply to user request on the topic of Mistrious Dragon"
},
{
"role": "user",
"content": "Write a beautiful stroy for kids"
}
]

output = self.llama.create_chat_completion(messages,
temperature=temperature,
max_tokens=max_tokens,
top_p=1,
frequency_penalty=1.5,
presence_penalty=1.5)

# Current Behavior

I got the following error:
......................python3.11/site-packages/llama_cpp/llama_chat_format.py", line 213, in raise_exception
raise ValueError(message)
ValueError: System role not supported

# Environment and Context

I use python3.11 on ubuntu linux with CUDA enabled . > 24GB GPU RAM

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.