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

Set dtype policy for uint8 #19327

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

sampathweb
Copy link
Collaborator

Fixes issue for KerasCV where we use uint8 for dtype. Set to FloatDtypePolicy to get past the quantization dtype policy error. Tested locally with KerasCV to verify the fix.

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 75.74%. Comparing base (838c7da) to head (cc3f33f).
Report is 1 commits behind head on master.

Files Patch % Lines
keras/dtype_policies/dtype_policy.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19327   +/-   ##
=======================================
  Coverage   75.74%   75.74%           
=======================================
  Files         366      366           
  Lines       40194    40197    +3     
  Branches     7814     7815    +1     
=======================================
+ Hits        30445    30448    +3     
  Misses       8062     8062           
  Partials     1687     1687           
Flag Coverage Δ
keras 75.60% <83.33%> (+<0.01%) ⬆️
keras-jax 59.95% <83.33%> (+<0.01%) ⬆️
keras-numpy 54.54% <83.33%> (-0.01%) ⬇️
keras-tensorflow 61.47% <83.33%> (+<0.01%) ⬆️
keras-torch 60.56% <83.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Mar 18, 2024
@fchollet fchollet merged commit 4c35630 into keras-team:master Mar 18, 2024
7 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase kokoro:force-run labels Mar 18, 2024
@sampathweb sampathweb deleted the set-quant-policy-uint8 branch March 18, 2024 20:08
james77777778 added a commit to james77777778/keras that referenced this pull request Mar 19, 2024
…nse`

Add qlora-like technique to `quantized_call` in `Dense`

Update `save_own_variables` and `load_own_variables`

Update `benchmark.py`

update version string.

Set dtype policy for uint8 (keras-team#19327)

* Set Quantization policy for uint8 to float

* Add uint8 to dtype_policies

Use Value dim shape for Attention compute_output_shape (keras-team#19284)

* Use Value dim shape for Attention compute_output_shape

* Fix attention layer compute output shape

* fix format

* check compute_output_shape with output

Update `quantized_call` in `EinsumDense` to support training with quantized weights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

4 participants