Skip to content

Use dtype to control generate - #1082

Merged
zhyncs merged 2 commits into
mainfrom
smilify-code
Aug 14, 2024
Merged

zhyncs merged 2 commits into
mainfrom
smilify-code

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Aug 13, 2024 •

Copy link
Copy Markdown
Collaborator

Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help.

Motivation

Use dtype to control generate type. Dispatch to regex in RuntimeEndpoint.

Modification

  1. Remove the int_token_logit_bias
  2. Support dtype in ["int", "str", "float", "bool", int, str, float, bool]
  3. For int and float dtype decoding, add tailing [ \n]* and add these two as stop str.

Checklist

  1. Ensure pre-commit pre-commit run --all-files or other linting tools are used to fix potential lint issues.
  2. Confirm that modifications are covered by complete unit tests. If not, please add more unit tests for correctness.
  3. Modify documentation as needed, such as docstrings or example tutorials.

@hnyls2002 hnyls2002 changed the title Use dtype to controll generate Use dtype to control generate Aug 13, 2024
@hnyls2002
hnyls2002 requested a review from merrymercy August 14, 2024 05:37

@merrymercy merrymercy left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please fix my comments above. Then it can be merged.

@zhyncs
zhyncs enabled auto-merge (squash) August 14, 2024 15:20
@zhyncs
zhyncs merged commit a34dd86 into main Aug 14, 2024
@zhyncs
zhyncs deleted the smilify-code branch August 14, 2024 15:58
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
hanwlax pushed a commit to hanwlax/sglang that referenced this pull request Aug 13, 2026
Add lora testcases and delete redundant tests
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.

3 participants