abetlen / abetlen/llama-cpp-python
Weird output
- 主要言語
- Python
- スター
- 10.6k
- フォーク
- 1.4k
- PR マージ指標
- PR 指標を取得中
説明
# Prerequisites
Please answer the following questions for yourself before submitting an issue.
- [x ] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
- [ x] 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
Please provide a detailed written description of what you were trying to do, and what you expected `llama-cpp-python` to do.
```
from llama_cpp import Llama
llm = Llama(
model_path="./models/llama-2-7b-chat.gguf.bin"
)
output = llm("Q: Name the planets in the solar system? A: ", max_tokens=32, stop=["Q:", "\n"], echo=True)
print(output)
```
I should get: The planets in our solar system are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune.
# Current Behavior
```
from llama_cpp import Llama
llm = Llama(
model_path="./models/llama-2-7b-chat.gguf.bin"
)
output = llm("Q: Name the planets in the solar system? A: ", max_tokens=32, stop=["Q:", "\n"], echo=True)
print(output)
```
I get
`'choices': [{'text': 'Q: Name the planets in the solar system? A: 1. Unterscheidung between celestial body and planet. Celestial body refers to any object that is in orbit around the Sun , including dwarf plan', 'index': 0, 'logprobs': None, 'finish_reason': 'length'}]`
# Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
* Physical (or virtual) hardware you are using, e.g. for Linux:
Mac M1 13.5.1 (22G90)
```
$ python3 --version: Python 3.9.6
$ make --version: GNU Make 3.81
$ g++ --version: Apple clang version 14.0.3
```
# Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
コントリビューションガイド
評価
この issue はまだ評価されていません。