Skip to content

fix: RedPajama token count uses findall not split#308

Open
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/redpajama-token-count-findall
Open

fix: RedPajama token count uses findall not split#308
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/redpajama-token-count-findall

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • _get_num_tokens used split() → N+1 tokens, inflating alpha_token_prop.
  • Match tests / RedPajama: findall().

Test plan

  • "" → 0 tokens; "hello" → 1

Made with Cursor

split() yields N+1 parts and inflates alpha_token_prop.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant