-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Feat/modelscope support #21985
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
Closed
Closed
Feat/modelscope support #21985
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e16a4b3
add modelscope support
yrk111222 a733286
modify some details
yrk111222 f5b8e0f
update
yrk111222 cfcaf54
add modelscope support
yrk111222 c468784
Restore blank lines
yrk111222 6b2f34f
Remove blank lines
yrk111222 ccfe297
update README.md
yrk111222 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember there was a discussion in the past, #12664, in which we agreed not to add a new argument, otherwise it will be too bloated
If we really need it, I think the better way is to add only
-msand re-purpose other flags like--hf-fileor--hf-tokenUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood!😄 I will limit the new arguments to only
-msand reuse --hf-fileand--hf-token.One quick question about private models: should we also reuse
--hf-tokenand theHF_TOKENenvironment variable for ModelScope authentication? For example, would usersset HF_TOKEN="ms-xxxxxxx"when accessing private MS repos? Or should the code internally check forMS_TOKENenv as a fallback?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding an exception for
MS_TOKENis ok, maybe simply add a logic intocommon_params_parse_ex, something like:Btw, we should technically change the name of
hf_tokento something more generic, likedownload_token, CC @angt if you think that can be a good idea. The CLI arg can stay as--hf-token, and we can add alias--ms-tokenand--download-tokenfor itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, maybe
--bearer-tokentoo.Ideally, I think only the
-hf(and the new-msflag) should stay.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion, but
--bearer-tokenis a little bit ambiguous I think, someone can misunderstand it as "same with server's--api-key"