Add a menu for customizing the instruction template for the model (#5521)

This commit is contained in:
oobabooga 2024-02-16 14:21:17 -03:00 committed by GitHub
parent 0e1d8d5601
commit 76d28eaa9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 81 additions and 24 deletions

View file

@ -691,6 +691,9 @@ def load_character(character, name1, name2):
def load_instruction_template(template):
if template == 'None':
return ''
for filepath in [Path(f'instruction-templates/{template}.yaml'), Path('instruction-templates/Alpaca.yaml')]:
if filepath.exists():
break