[Bug] lmdeploy - ERROR - run out of tokens. session_id=1
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 748
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 54
Description
### Checklist
- [X] 1. I have searched related issues but cannot get the expected help.
- [X] 2. The bug has not been fixed in the latest version.
- [X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
### Describe the bug
The bug arose when I ran lmdeploy with Llama 3 70B during inference. I tried to generate text completion for a very long note (around 8K tokens).
I tried to include gen_config such as gen_config = GenerationConfig(min_new_tokens = 100) but none of them worked.
### Reproduction
from transformers import AutoTokenizer, AutoModelForCausalLM
from lmdeploy import pipeline, GenerationConfig, TurbomindEngineConfig
model_id = "meta-llama/Meta-Llama-3-70B"
backend_config = TurbomindEngineConfig(cache_max_entry_count=0.2, tp =4)
pipe = pipeline(model_id, backend_config=backend_config)
prompts = [' A very long prompt........']
response = pipe(prompts)
I tried to include generation config but the same error still showed up.
gen_config = GenerationConfig(min_new_tokens = 100)
response = pipe(prompts, gen_config = gen_config)
### Environment
```Shell
NA
```
### Error traceback
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.