abetlen / abetlen/llama-cpp-python

Switch to disable adding BOS token

未關閉
#1,561 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
10.6k
分支
1.4k
PR 合併指標
PR 指標待擷取

描述

**Is your feature request related to a problem? Please describe.**
I am building the prompt myself and calling
```
llm.create_completion(prompt, max_tokens=max_tokens,
temperature=temperature, repeat_penalty=repeat_penalty,
stop=stops)
```
llama.cpp is telling me it is adding yet another in the beginning which could affect the performance:

```
RuntimeWarning: Detected duplicate leading "" in prompt, this will likely reduce response quality, consider removing it
```

**Describe the solution you'd like**
Either llama.cpp should not add a token in the beginning or there should be a switch.

**Additional context**

This is a prompt with gemma2 template that I give to the create_completion function:

```
user
You are a helpful chat bot, answering questions.
model
OKuser
What kind of questions can I ask you?model

```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。