Skip to content

Smanor/sentinel support: add support for sentinel tokens - #20

Open
ShayManor wants to merge 60 commits into
coreweave:mainfrom
ShayManor:smanor/sentinel-support
Open

Smanor/sentinel support: add support for sentinel tokens#20
ShayManor wants to merge 60 commits into
coreweave:mainfrom
ShayManor:smanor/sentinel-support

Conversation

@ShayManor

Copy link
Copy Markdown

feat: add support for sentinel tokens

Description

Add support for more complicated masking in the form:
BOS {prompt} SENTINEL {completion} EOS
Where the sentinel token is passed with the sentinel flag.
If there is no sentinel ("" or nothing is passed), the functionality is the same as before.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Additional Notes

wbrown and others added 30 commits October 18, 2024 11:50
Rexwang8 and others added 30 commits December 17, 2024 12:34
tests: Cache load encoders when not benchmarking
…index

Produce simpler index files without streaming encode.
Optimize word splitter with state machine, replacing regex
Fix `gpt_bpe` concurrency performance, implement `StatusWatcher`
Add JS bindings, make test.js use the bindings
Make decode() the same function as the JS for compatibility(packed bytes), and add decode_array for number[] array input
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.

6 participants