[Refactor]: Remove tokenizer when building engine#3978
Merged
lvhan028 merged 5 commits intoInternLM:mainfrom Sep 17, 2025
Merged
[Refactor]: Remove tokenizer when building engine#3978lvhan028 merged 5 commits intoInternLM:mainfrom
lvhan028 merged 5 commits intoInternLM:mainfrom
Conversation
Collaborator
|
https://github.com/RunningLeon/lmdeploy/blob/a7b8d2e294aaf6e133e48f5fe9c93d10e509cbc1/lmdeploy/pytorch/engine/mp_engine/zmq_engine.py#L49 Do we need to update in Multiprocessing engine? |
Collaborator
Author
Tested ok with zmq engine. So no need to change it. |
lvhan028
reviewed
Sep 16, 2025
lvhan028
previously approved these changes
Sep 16, 2025
lvhan028
reviewed
Sep 16, 2025
grimoire
reviewed
Sep 16, 2025
| self.model_config = model_config | ||
| self.cache_config = cache_config | ||
| self.tokenizer = tokenizer | ||
| self.tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) |
Collaborator
There was a problem hiding this comment.
Is this true for every model?
lvhan028
approved these changes
Sep 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Remove
tokenizerargument in mp engine for bad serialization issueModification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist