Skip to content

Refactor Tokenizer -> BaseTokenizer #1333

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .ci/docker/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest==7.3.2
pytest-cov
pre-commit
tomli-w >= 1.1.0
transformers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for running the unit tests?

1 change: 0 additions & 1 deletion .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ torchdata >= 0.8.0
datasets >= 3.6.0
tomli >= 1.1.0 ; python_version < "3.11"
tensorboard
tiktoken
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blobfile
tabulate
wandb
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We actively welcome your pull requests.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints (`pre-commit run --all-files`).
5. Make sure your code lints (`pre-commit run --from-ref origin/main --to-ref HEAD`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this is restricting the linting to be changes between current main and the latest commit. Can I ask why?

6. If you haven't already, complete the Contributor License Agreement ("CLA").

### Contributor License Agreement ("CLA")
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_generate(
input_ids = (
(
torch.tensor(
tokenizer.encode(prompt, bos=True, eos=False), dtype=torch.long
tokenizer.encode(prompt, add_bos=True, add_eos=False), dtype=torch.long
)
.view(1, -1)
.repeat(batch_size, 1)
Expand Down
Loading
Loading