Repository navigation
fix(docs): drop --model-name from the lmdeploy chat examples - #5201
Open
VenishPaneliya wants to merge 1 commit into
Open
VenishPaneliya wants to merge 1 commit into
VenishPaneliya wants to merge 1 commit into
Conversation
The --model-name option is registered only on `lmdeploy serve api_server`, so `lmdeploy chat $repo_id --model-name $model_name` exits with "error: unrecognized arguments: --model-name". The chat template is detected from the model path, with --chat-template as the override. The serve invocations on the same page are unchanged: --model-name is valid there and sets the name reported by /v1/models.
This branch has not been deployed
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
docs/en/inference/load_hf.mdis the "Load huggingface model directly" page, andboth of its usage blocks start with
--model-nameis registered only onlmdeploy serve api_server(
ArgumentHelper.model_nameis called atlmdeploy/cli/serve.py:104and nowhereelse), and the CLI uses
parser.parse_args(), so the documented command exitsimmediately:
The option also means something different from what the page implies: on
api_server it is the served model's public name reported by
/v1/models(added in #1403), not a model-type selector.
lmdeploy chatdetects the chattemplate from the model path and takes
--chat-templateas the override.Modification
Dropped
--model-name $model_namefrom the fourlmdeploy chatinvocations ondocs/en/inference/load_hf.mdand itsdocs/zh_cnmirror. Thelmdeploy serve api_server ... --model-name ...lines on the same pages areleft as they are, since the option is valid there. The
model_name=shellvariable is still used by those serve lines, so it stays.
Every other
--model-namemention indocs/is onserve api_server, so thesetwo pages were the only place the option was attached to
chat.BC-breaking (Optional)
No.
Checklist
it by rebuilding both subcommands' argparse option sets from
lmdeploy/cli/{cli,serve,utils}.pyand replaying all 8lmdeploy ...invocations on the two pages — 4 failed before this change and 0 after, with
the
serve api_server --model-namelines parsing in both cases.