Skip to content

How to decode output information from model.chat() #7

@Leonard-Yao

Description

@Leonard-Yao

Hi, it's a amazing job. We can get very accurate description from the demo. However , when I run outputs = self.model.chat(self.prompt, [image], max_new_tokens=200)
print(self.tokenizer.decode(outputs[0]))
the error occurred, text = self._tokenizer.decode(token_ids, skip_special_tokens=skip_special_tokens)
OverflowError: out of range integral type conversion attempted. And the output is [1, 3148, 1001, 29901, 450, 1967, 29901, 29871, -200, 29871, 8449, 5930, 297, 445, 1967, 29901, 10884, 29899, 2204, 332, 29892, 17251, 29892, 447, 911, 29892, 16847, 29892, 470, 4482, 3578, 29973, 319, 1799, 9047, 13566, 29901, 17511, 3578, 2].
how can I get the docede output , thank U.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions