-
Notifications
You must be signed in to change notification settings - Fork 14.2k
common: fix --override-kv to support comma-separated values #18056
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
common: fix --override-kv to support comma-separated values #18056
Conversation
|
I think it's OK, but would like @ngxson to confirm. |
ngxson
left a comment
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.
we will probably handle the case key=str:a,b where string = "a,b"
but this can be resolved later, there is a chance that no one actually use it
Co-authored-by: Xuan-Son Nguyen <thichthat@gmail.com>
|
Thanks for this PR, but I feel like it just introduces more problems. It will require further changes to escape the comma, it doesn't fix the other options, and it breaks backward compatibility. I can come up with a PR today that allows multiple parameters again, it's already done locally. Would that make sense or am I misunderstanding something? |
Thanks for the feedback! I understand your concern about backward compatibility. Consistency: It matches --override-tensor (-ot) which already uses commas That said, I'm open to discussion. If the maintainers prefer keeping backward compatibility with multi-arguments, I can adjust the PR. But IMO, consistency across the codebase is more valuable than preserving a pattern that's broken in router mode anyway. |
|
@personalmountains I'm quite against supporting repeated args because as explained in the OP, the environment variable does not accept it. The |
|
also, the design of presets using so IMO we should not make repeated args a default experience, apparently other config formats like JSON or YAML doesn't want it, then why would we? |
|
Fair enough. |
|
Sorry, maybe also add a noisy warning when options are discarded? I'm just concerned about the silent backward compatibility break. This can break a model in subtle ways by failing to override certain keys. I found this by chance, really. |
ggerganov
left a comment
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 agree with @ngxson. It's not ideal that the change is not backwards compatible, but the prospect of improving the new config system is a good tradeoff IMO.
|
I propose we add a warning directly in the parser for all duplicated arguments. This way everyone gets into good habits, and it allows for progressive migration toward cleaner config patterns ? |
|
Yes that sounds good. We should remove all help messages mentioning about repeated args too, so new users won't follow the same pattern |
|
For --override-kv, comma escaping could be supported for edge cases where a comma appears in the value itself: |
OK I do it on this PR |
|
It look like : DEPRECATED: argument '--override-kv' specified multiple times, use comma-separated values instead (only last value will be used) |
|
And escaping for --override-kv : string_parse_kv_override: invalid type for KV override 'tokenizer.ggml.add_eos_token=ESCAP,ING:bl,ah' |
Co-authored-by: personalmountains <46615898+personalmountains@users.noreply.github.com>
Should we clean up ALL "can be repeated" help text in this PR, or keep it focused on --override-kv?
What do you prefer? Edit: Turns out there weren't that many, so I migrated them all to eliminate the technical debt. |
Make sure to read the contributing guidelines before submitting a PR
Two KV override working :
Help message :
Fixes #18040