Skip to content

add repetition_penalty to SamplingParams#1302

Merged
JC1DA merged 3 commits intoguidance-ai:mainfrom
JC1DA:add_repetition_penalty
Jul 3, 2025
Merged

add repetition_penalty to SamplingParams#1302
JC1DA merged 3 commits intoguidance-ai:mainfrom
JC1DA:add_repetition_penalty

Conversation

@JC1DA
Copy link
Copy Markdown
Collaborator

@JC1DA JC1DA commented Jul 2, 2025

No description provided.

@JC1DA JC1DA requested a review from hudson-ai July 2, 2025 23:59
assert np.all(transformers_logits == guidance_logits), "Logits do not match after min_p filtering"


def test_repetition_penalty_filtering():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you parameterize this test to try a few different values of repetition penalty: <1, =1, >1?
(Note: not a bad idea to do something similar for the other params)

Copy link
Copy Markdown
Collaborator Author

@JC1DA JC1DA Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in the next PR? I'll do for all previous tests at once.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

@JC1DA JC1DA merged commit 44d21a2 into guidance-ai:main Jul 3, 2025
23 checks passed
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.

2 participants