-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from danemadsen/sequence
Fix sequenceFilter and add abstract classes for different formats
- Loading branch information
Showing
10 changed files
with
1,894 additions
and
2,371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'prompt_format.dart'; | ||
import 'sequence_filter.dart'; | ||
|
||
class AlpacaFormat extends PromptFormat { | ||
AlpacaFormat() | ||
: super(PromptFormatType.alpaca, | ||
[SequenceFilter('### Input:'), SequenceFilter('### Response:')]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'prompt_format.dart'; | ||
import 'sequence_filter.dart'; | ||
|
||
class ChatMLFormat extends PromptFormat { | ||
ChatMLFormat() | ||
: super(PromptFormatType.chatml, [ | ||
SequenceFilter('<|im_start|>user'), | ||
SequenceFilter('<|im_end|>'), | ||
SequenceFilter('<|im_start|>assistant') | ||
]); | ||
} |
Oops, something went wrong.