Skip to content

[executorch] Implement operator<<() for EValue #479

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
wants to merge 3 commits into from

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Sep 25, 2023

Stack from ghstack (oldest at bottom):

Add a helper utility to print EValues. Doesn't format multidimensional data like PyTorch does, but we can improve that in the future if we want to.

Differential Revision: D49574853

Add a helper utility to print `EValue`s. Doesn't format multidimensional data like PyTorch does, but we can improve that in the future if we want to.

Differential Revision: [D49574853](https://our.internmc.facebook.com/intern/diff/D49574853/)

[ghstack-poisoned]
@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 Sep 25, 2023
Add a helper utility to print `EValue`s. Doesn't format multidimensional data like PyTorch does, but we can improve that in the future if we want to.

Differential Revision: [D49574853](https://our.internmc.facebook.com/intern/diff/D49574853/)

[ghstack-poisoned]
Add a helper utility to print `EValue`s. Doesn't format multidimensional data like PyTorch does, but we can improve that in the future if we want to.

Differential Revision: [D49574853](https://our.internmc.facebook.com/intern/diff/D49574853/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in bd26dbf.

@facebook-github-bot facebook-github-bot deleted the gh/dbort/19/head branch September 29, 2023 14:21
Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
* Update quantize.py to use torchao Quantizers

Summary:

Remove duplicate code for Int4WeightOnlyQuantizer and
Int8DynActInt4WeightQuantizer and use torchao API.

Test Plan:

```
python torchchat.py generate llama2 --quantize '{"linear:int4": {"groupsize": 256}, "precision": {"dtype":"float16"}, "executor":{"accelerator":"cpu"}}' --prompt "Once upon a time," --max-new-tokens 256
python torchchat.py generate llama2 --quantize '{"linear:a8w4dq": {"groupsize": 256}, "precision": {"dtype":"float16"}, "executor":{"accelerator":"cpu"}}' --prompt "Once upon a time," --max-new-tokens 256
```

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix import

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Install torchao from gh

* Explain import

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix dependencies

* Test ao PR #479

* Update torchao hash

* Update torchao pin

* Fix scheduler bf16/fp16 mix error

* Incorporate torchao changes

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* update hash

* Fix GPU CI job

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* More fix

* Fix executorch CI job

* Use quant api for int4 weight only quantization

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix again

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix 3

* Fix 4

* Try something

* debug

* Only migrate 8a4w

---------

Co-authored-by: Jack Zhang <[email protected]>
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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants