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

Add few-shot prompt support; small PromptCollator improvements #84

Merged
merged 2 commits into from
Feb 19, 2023

Conversation

norabelrose
Copy link
Member

Fixes #75

Copy link
Collaborator

@lauritowal lauritowal left a comment

Choose a reason for hiding this comment

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

Note: I wonder if few-shot prompt should be supported / implemented into PromptSource directly (?)

Comment on lines +174 to +184
self.active_split = cast(
Dataset,
concatenate_datasets(
[
stratum.select(
self.rng.sample(range(len(stratum)), k=smallest_size)
)
for stratum in strata
]
),
)
Copy link
Collaborator

@lauritowal lauritowal Feb 19, 2023

Choose a reason for hiding this comment

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

Small detail: This is maybe a bit hard to read? Perhaps split, we should split up in multiple lines / steps

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah black made it worse honestly

@norabelrose norabelrose merged commit e5b6065 into main Feb 19, 2023
@norabelrose norabelrose deleted the few-shot branch February 19, 2023 10:53
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.

Support few-shot prompts
2 participants