We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class DynamicFormat(Format): few_shot_format: Format few_shot_with_instruction_format: Format zero_shot_format: Format zero_shot_with_instruction_format: Format def process(instance): has_instruction = "instruction" not in instance or len(instance["instruction"] == 0 has_demos = len(instance["demos"]) == 0 if has_demos: if has_instruction: format = self.few_shot_with_instruction_format else: format = self.few_shot_format else: if has_instruction: format = self.zero_shot_with_instruction_format else: format = self.zero_shot_format return format.process_instance(instance)
The text was updated successfully, but these errors were encountered:
Implement dynamic format for selecting the correct format in case of
418bff1
dependency in existence of instruction and num shots. Solve issue #690
No branches or pull requests
The text was updated successfully, but these errors were encountered: