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

fix: Fixed the issue where the mii.pipeline.pipe(stop) was ineffective #409

Merged
merged 6 commits into from
Feb 13, 2024

Conversation

kitstar
Copy link
Contributor

@kitstar kitstar commented Feb 6, 2024

  1. Replace Tokenizer.encode with Tokenizer.convert_tokens_to_ids
  2. Support multi stop tokens and batch inference

Easy reproduce like
responses = pipe(args.prompt, do_sample=False, max_new_tokens=args.max_new_tokens, return_full_text=True, stop=["<|im_end|>", "<filename>"])

@kitstar
Copy link
Contributor Author

kitstar commented Feb 6, 2024

@microsoft-github-policy-service agree

@mrwyattii
Copy link
Contributor

Thank you @kitstar - this has been something on my TODO list that I was not able to carve out time for. I'll get this reviewed and merged ASAP!

@mrwyattii mrwyattii merged commit 76b9639 into deepspeedai:main Feb 13, 2024
3 checks passed
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