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

Update text_generation_utils.py #629

Merged
merged 2 commits into from
Jun 8, 2022
Merged

Update text_generation_utils.py #629

merged 2 commits into from
Jun 8, 2022

Conversation

StellaAthena
Copy link
Member

Fix off-by-one-error per #627

Fix off-by-one-error per #627
@StellaAthena StellaAthena requested a review from a team as a code owner June 7, 2022 12:31
@fpgaminer
Copy link

fpgaminer commented Jun 8, 2022

Works correctly on my setup! Using this config:

    "maximum_tokens": 64,
    "temperature": 0.7,
    "top_k": 40,
    "seed": 1235,
    "text-gen-type": "interactive",

And typing "Hello" into the interactive prompt, main on 6a76fe6a8011d6c9b9d44e55a1ade59755dd0435 incorrectly generates:

. I’m a writer, and this is my blog. My goal is to inspire you to write and to make writing fun. I’m from Ohio, love to do laundry, and can’t imagine ever owning a dishwasher. My husband would say I’m kind of crazy. I’

Whereas this patch, 765d8f34fd20ec2e95e9f69c3bc73a3822a5b506, correctly generates:

. I’m a writer, and this is my blog. My goal is to inspire you to write and to make writing fun. I’m from Ohio, love to do laundry, and can’t imagine ever owning a dishwasher. My husband would say I’m kind of crazy. I’m

(Notice the inclusion of the last token, "m", which was dropped by the buggy code.)

So, looks good.

@StellaAthena
Copy link
Member Author

@EricHallahan can you review + merge?

@StellaAthena StellaAthena merged commit 76ea62c into main Jun 8, 2022
@StellaAthena StellaAthena deleted the StellaAthena-patch branch June 8, 2022 14:39
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

Successfully merging this pull request may close these issues.

None yet

3 participants