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

[Feature] New transform to collect token stats #922

Open
1 of 2 tasks
Harmedox opened this issue Jan 8, 2025 · 0 comments
Open
1 of 2 tasks

[Feature] New transform to collect token stats #922

Harmedox opened this issue Jan 8, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Harmedox
Copy link

Harmedox commented Jan 8, 2025

Search before asking

  • I searched the issues and found no similar issues.

Component

Transforms/Other

Feature

The goal of this transform is to provide token-specific metrics annotation that could serve as an indicator of document quality.

Consideration:

  • in addition to the input parquet files, access must be provided to the folder containing the tokenized (arrow) files.
  • for each input parquet file, a matching arrow file must be read. If no matching arrow file is found, such a file should be skipped

For each document, annotate with the:

  • doc_num_tokens - number of tokens for the document
  • doc_size_kbs - document size in kb
  • doc_num_chars - number of characters in the document
  • tokens_per_doc_size - ratio of the number of tokens and document size
  • tokens_per_doc_num_chars - ratio of the number of tokens and the number of characters in the document

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@Harmedox Harmedox added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant