Skip to content
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

Update Readme #1526

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update Readme #1526

wants to merge 1 commit into from

Conversation

drisspg
Copy link
Contributor

@drisspg drisspg commented Jan 8, 2025

Stacked PRs:


Update Readme

Copy link

pytorch-bot bot commented Jan 8, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1526

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit d6a6302 with merge base 1c0ea5b (image):
💚 Looks good so far! There are no failures yet. 💚

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

drisspg added a commit that referenced this pull request Jan 8, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 8, 2025
@drisspg drisspg added the topic: documentation Use this tag if this PR adds or improves documentation label Jan 8, 2025
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24

## Alpha features
## Composability
Copy link
Contributor

Choose a reason for hiding this comment

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

should this also mention DTensor composability?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think so, @drisspg you can check out the sglang blog post for some desciprtions

drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
drisspg added a commit that referenced this pull request Jan 15, 2025
stack-info: PR: #1526, branch: drisspg/stack/24
@bhack
Copy link

bhack commented Feb 1, 2025

Can we expand also few lines on autoquant that currently it is really a single line in the Readme?

E.g. I see some basic option here that it would nice to clarify as a basic use case:

def set_autoquant(mask_generator, autoquant_type, min_sqnr):
import torchao
from torchao import autoquant
# NOTE: Not baseline feature
if autoquant_type == "autoquant":
mask_generator.predictor.model.image_encoder = autoquant(
mask_generator.predictor.model.image_encoder, min_sqnr=min_sqnr
)
elif autoquant_type == "autoquant-fp":
mask_generator.predictor.model.image_encoder = autoquant(
mask_generator.predictor.model.image_encoder,
qtensor_class_list=torchao.quantization.DEFAULT_FLOAT_AUTOQUANT_CLASS_LIST,
min_sqnr=min_sqnr,
)
elif autoquant_type == "autoquant-all":
mask_generator.predictor.model.image_encoder = autoquant(
mask_generator.predictor.model.image_encoder,
qtensor_class_list=torchao.quantization.ALL_AUTOQUANT_CLASS_LIST,
min_sqnr=min_sqnr,
)
else:
raise ValueError(f"Unexpected autoquant type: {autoquant_type}")
mask_generator.predictor._transforms_device = mask_generator.predictor.device
torch.set_float32_matmul_precision("high")
# NOTE: this fails when we run
# python server.py ~/checkpoints/sam2 large --port 8000 --host localhost --fast --autoquant_type autoquant --unittest
# https://gist.github.com/jerryzh168/d337cb5de0a1dec306069fe48ac8225e
# mask_generator.predictor.model.sam_mask_decoder = autoquant(mask_generator.predictor.model.sam_mask_decoder, qtensor_class_list=DEFAULT_FLOAT_AUTOQUANT_CLASS_LIST, min_sqnr=40)

stack-info: PR: #1526, branch: drisspg/stack/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: documentation Use this tag if this PR adds or improves documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants