Skip to content

feat: Make tokenizer add_special_tokens option configurable #54

New issue

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion integration_tests/test_cases_tinyllama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,66 @@
method: GREEDY
stopping: {"maxNewTokens": 17}
requests:
- {"text": "Once upon a time,"}
- {"text": "Once upon a time,"}
response:
responses:
- generatedTokenCount: 17
inputTokenCount: 6
stopReason: MAX_TOKENS
text: ' there was a little girl named Lily. She loved to play with her toy car.'


# Input tokens
- name: Return input tokens
request:
params:
method: GREEDY
stopping: {"maxNewTokens": 8}
response:
inputTokens: true
requests:
- {"text": "Once upon a time,"}
response:
responses:
- generatedTokenCount: 8
inputTokenCount: 6
inputTokens:
- text: <s>
#TODO this is wrong token: https://github.com/huggingface/transformers/issues/28622
- text: "\u2581Once"
- text: "\u2581upon"
- text: "\u2581a"
- text: "\u2581time"
- text: ','
stopReason: MAX_TOKENS
text: ' there was a little girl named Lily.'


# Tokenize with tokens
- name: Tokenize with tokens
request_type: tokenize
request:
return_tokens: true
requests:
- {"text": "The very long story is written by a very long story"}
response:
responses:
- tokenCount: 12
tokens:
- <s>
- "\u2581The"
- "\u2581very"
- "\u2581long"
- "\u2581story"
- "\u2581is"
- "\u2581written"
- "\u2581by"
- "\u2581a"
- "\u2581very"
- "\u2581long"
- "\u2581story"


- name: Long input with tokens truncated
request:
params:
Expand Down
Loading