Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@mikekgfb
Copy link
Contributor

@mikekgfb mikekgfb commented Nov 8, 2024

Users may expect that cli parameters override the JSON, as per #1278. Confirm the inverted behavior suggested by #1278 is what we want. Also, if we do, then for sanity, we should apply the same priority scheme to both dtype and device values.

Invert logic - case split:

1 - if none (no value) is specified, use value specified in quantize dict, if present; else
2 - if value is specified, override the respective handler if present.

…ed values

Users may expect that cli parameters override the JSON, as per pytorch#1278.  
Invert logic - case split: 
1 - if none (no value) is specified, use value specified in quantize dict, if present; else
2 - if value is specified, override the respective handler if present.
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 8, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1359

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b50126a with merge base 2fcc37c (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 8, 2024
Copy link
Contributor

@Jack-Khuu Jack-Khuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thanks again @mikekgfb

@Jack-Khuu Jack-Khuu merged commit 93f713f into pytorch:main Nov 13, 2024
52 checks passed
vmpuri pushed a commit that referenced this pull request Feb 4, 2025
…ed values (#1359)

* Update cli.py to make --device/--dtype pre-empt quantize dict-specified values

Users may expect that cli parameters override the JSON, as per #1278.  
Invert logic - case split: 
1 - if none (no value) is specified, use value specified in quantize dict, if present; else
2 - if value is specified, override the respective handler if present.

* Fix typo in cli.py

fix typo

---------

Co-authored-by: Jack-Khuu <jack.khuu.7@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants