abetlen / abetlen/llama-cpp-python

Switch to disable adding BOS token

Open
#1,561 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10.6k
Forks
1.4k
PR merge metrics
PR metrics pending

Description

**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

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.