Skip to content

Modify generator.py > generate_simple to accept encode_special_characters? #243

Open
@zmarty

Description

@zmarty

Hello. I noticed a couple of recent PRs added the encode_special_characters parameter option inside the tokenizer. This is great because right now I don't think exllama by default encodes special tokens and calls LLMs correctly.

However, for this change to be actually useful I think that functions such as generate_simple inside generator.py should also accept this parameter and send it along to the tokenizer, like so:

def generate_simple(self, prompt, max_new_tokens = 128, encode_special_characters=True):

Is this a reasonable request? I can probably also submit a PR if it's something people think is useful, although I am not Python programmer. But I did modify the function locally and it works fine.

#195
#197
#199

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions