Skip to content

Commit

Permalink
Update falcon tokenizer (#344)
Browse files Browse the repository at this point in the history
* Update generate_tests.py

* Do not add token types for `FalconTokenizer`
  • Loading branch information
xenova authored Oct 3, 2023
1 parent 5b31129 commit b6bd608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/tokenizers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2705,12 +2705,7 @@ export class CodeLlamaTokenizer extends PreTrainedTokenizer { }
export class XLMRobertaTokenizer extends PreTrainedTokenizer { }
export class MPNetTokenizer extends PreTrainedTokenizer { }

export class FalconTokenizer extends PreTrainedTokenizer {
/** @type {add_token_types} */
prepare_model_inputs(inputs) {
return add_token_types(inputs);
}
}
export class FalconTokenizer extends PreTrainedTokenizer { }

export class GPTNeoXTokenizer extends PreTrainedTokenizer { }

Expand Down
2 changes: 1 addition & 1 deletion tests/generate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# List of tokenizers where the model isn't yet supported, but the tokenizer is
ADDITIONAL_TOKENIZERS_TO_TEST = {
'RefinedWebModel': [
'falcon': [
'tiiuae/falcon-7b',
],
"llama": [
Expand Down

0 comments on commit b6bd608

Please sign in to comment.