Skip to content
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

Hybrid tokenizers #25

Merged
merged 15 commits into from
Sep 25, 2024
Merged

Hybrid tokenizers #25

merged 15 commits into from
Sep 25, 2024

Conversation

stephantul
Copy link
Collaborator

No description provided.

Copy link
Member

@Pringled Pringled left a comment

Choose a reason for hiding this comment

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

LGTM

:param device: The device to use.
:param pca_dims: The number of components to use for PCA. If this is None, we don't apply PCA.
:param apply_zipf: Whether to apply Zipf weighting to the embeddings.
:param use_subword: Whether to keep subword tokens in the vocabulary. If this is False, you must pass a vocabulary.
Copy link
Member

Choose a reason for hiding this comment

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

This also changes the actual tokenizer from subword to word level right? I would also specify that in the description

:param use_subword: Whether to keep subword tokens in the vocabulary. If this is False, you must pass a vocabulary.
:raises: ValueError if the PCA dimension is larger than the number of dimensions in the embeddings.
:raises: ValueError if the vocabulary contains duplicate tokens.
:return: A StaticModdel
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
:return: A StaticModdel
:return: A StaticModel.

@stephantul stephantul merged commit 0a1b672 into main Sep 25, 2024
@stephantul stephantul deleted the hybrid_tokenizers branch September 25, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants