Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: argument 'tokens': 'NoneType' object cannot be converted to 'PyString' #723

Closed
yoonjh1118 opened this issue Aug 10, 2023 · 1 comment

Comments

@yoonjh1118
Copy link

yoonjh1118 commented Aug 10, 2023

When I repeatedly generated it, the following error occurred.

from vllm import LLM,SamplingParams
from transformers import StoppingCriteria,StoppingCriteriaList,AutoTokenizer
llm=LLM("EleutherAI/polyglot-ko-12.8b",tensor_parallel_size=1,seed=42)
samplingparams=SamplingParams(max_tokens=200)
while True:
    text=input("질문을 입력해주세요:")
    formatted_input="### 질문:" + text + "\n\n### 답변:"
    data=llm.generate(prompts=formatted_input,sampling_params=samplingparams)
    texts=[output.text for output in data[0].outputs]

I fixed getting the number of tokens from the tokenizer instead of the config.json file, but I'm still getting the error.
Is there a way to resolve this error?

@creatorrr
Copy link

Possibly related: #340

@hmellor hmellor closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants