forked from stanford-crfm/helm
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suport BigCode model (stanford-crfm#1506)
- Loading branch information
Showing
8 changed files
with
50 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
27 changes: 27 additions & 0 deletions
27
src/helm/benchmark/window_services/bigcode_large_model_window_service.py
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,27 @@ | ||
from .local_window_service import LocalWindowService | ||
from .tokenizer_service import TokenizerService | ||
|
||
|
||
class BigCodeLargeModelWindowService(LocalWindowService): | ||
def __init__(self, service: TokenizerService): | ||
super().__init__(service) | ||
|
||
@property | ||
def max_sequence_length(self) -> int: | ||
return 8192 | ||
|
||
@property | ||
def max_request_length(self) -> int: | ||
return self.max_sequence_length | ||
|
||
@property | ||
def end_of_text_token(self) -> str: | ||
return "<|endoftext|>" | ||
|
||
@property | ||
def tokenizer_name(self) -> str: | ||
return "bigcode/large-model" | ||
|
||
@property | ||
def prefix_token(self) -> str: | ||
return self.end_of_text_token |
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
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