Instructions to use litert-community/efficientnet_b5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/efficientnet_b5 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Replace dynamic-range int8 with weight-only int8
Browse filesSame change as efficientnet_b1 (merged earlier today): the shipped dynamic-range int8 degrades accuracy on this architecture, while weight-only int8 is near-lossless at the same size reduction.
Measured against the torch float reference on real photos plus fixed random tensors at native resolution: dynamic min logit correlation 0.986 (top-1 2/6) vs weight-only 1.000 (top-1 6/6). The replacement file is quantized directly from this repository's published float32 file (litert quantize, recipe weight_only_wi8_afp32), so the weights are identical.
The model card is updated in the same commit: the metric entries for the removed dynamic file are dropped and a short quantized-variant note with the measured numbers is added.
|
@@ -28,12 +28,6 @@ model-index:
|
|
| 28 |
- name: Top 5 Accuracy (Full Precision)
|
| 29 |
type: accuracy
|
| 30 |
value: 0.9664
|
| 31 |
-
- name: Top 1 Accuracy (Dynamic Quantized wi8 afp32)
|
| 32 |
-
type: accuracy
|
| 33 |
-
value: 0.8313
|
| 34 |
-
- name: Top 5 Accuracy (Dynamic Quantized wi8 afp32)
|
| 35 |
-
type: accuracy
|
| 36 |
-
value: 0.9659
|
| 37 |
---
|
| 38 |
|
| 39 |
# EfficientNet B5
|
|
@@ -49,6 +43,16 @@ acc@1 (on ImageNet-1K): 83.444%
|
|
| 49 |
acc@5 (on ImageNet-1K): 96.628%
|
| 50 |
num_params: 30,389,784
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
## Intended uses & limitations
|
| 53 |
|
| 54 |
The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
|
|
|
|
| 28 |
- name: Top 5 Accuracy (Full Precision)
|
| 29 |
type: accuracy
|
| 30 |
value: 0.9664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
---
|
| 32 |
|
| 33 |
# EfficientNet B5
|
|
|
|
| 43 |
acc@5 (on ImageNet-1K): 96.628%
|
| 44 |
num_params: 30,389,784
|
| 45 |
|
| 46 |
+
### Quantized variant
|
| 47 |
+
|
| 48 |
+
`efficientnet_b5_weight_only_wi8_afp32.tflite` is a weight-only int8
|
| 49 |
+
quantization of the same weights (about 3.7x smaller than float32).
|
| 50 |
+
Weight-only quantization is used instead of dynamic-range quantization
|
| 51 |
+
because EfficientNet's SE and SiLU layers are sensitive to activation
|
| 52 |
+
quantization; in a spot check against the float model the weight-only
|
| 53 |
+
file keeps the top-1 predictions on real photos with a minimum logit
|
| 54 |
+
correlation of 1.000.
|
| 55 |
+
|
| 56 |
## Intended uses & limitations
|
| 57 |
|
| 58 |
The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76677cd9076dd8107518ce1c31198d9cbc37825b38f6299297c093f061fc712b
|
| 3 |
+
size 32940768
|