Comments (9)
@james77777778 any thoughts on this?
from keras.
If the model is trained with fp8, it is ready for inference. We can fix the scaling factor and drop the amax_history
if we don't train the model in the future.
If the model is not trained with fp8 and we don't plan to train it in the future, we need a mechanism to calibrate it. Calibration is similar to fp8 training but we only need to compute the scaling factor offline with an additional calibration dataset.
I'm unsure whether we should add the calibration logic into Keras.
from keras.
Thanks for your reply. It seems keras need more discussion to decide whether to support fp8 calibration. Maybe you can update the latest progress if have any result in the future.
from keras.
And for fp8 inference after fp8 training, keras seems support not well. Can we add is_training argument in float8_call to decide whether to compute new scale? New amax history is also not need.
from keras.
And for fp8 inference after fp8 training, keras seems support not well. Can we add is_training argument in float8_call to decide whether to compute new scale? New amax history is also not need.
Since #19682 has been merged, you can set training=False
for the layer (or model) to skip the computation of both the scaling factor and amax history.
The variable for amax history will still be retained but it should occupy a small portion of memory.
from keras.
Thanks, will test it soon.
from keras.
Hi @lingzhi98 Do you test it? It should be working as expected since the PR has been merged.
from keras.
Sorry for slow response. Have checked it, close this issue.
from keras.
Thank you!
from keras.
Related Issues (20)
- [Question] When is it absolutely necessary to use a `Lambda` layer? HOT 1
- TimeDistributed layer with nested model no longer working in TensorFlow 2.16.1
- model.keras format much slower to load HOT 8
- TokenAndPositionEmbedding layer warning---Respecting padding mask or destroying it?
- Unknown reference at progbar.py HOT 1
- Dropout variables are inconsistent across save/load HOT 4
- `split_dataset` cannot split a dataset containing nested tuples
- ValueError when trying to load a .keras model created using Functional API HOT 2
- Clearer errors for `add_metric`
- Can't load LayerNormalization with RMS scaling
- Unable to load finetuned keras model. HOT 3
- Enhancement Request: XLA Compatibility for `keras.layers.Embedding HOT 2
- [Bug] keras Add layer failing to build
- Unexpected depreciation warning in tensorflow 2.16.1
- Model attribute stop_evaluating does not work HOT 2
- While retraining a model I get worse values for MSE from the last epoch of last trainment to the first of the next HOT 1
- model.compile(jit_compile=True) for PyTorch has no intended effect (Keras 3.3) HOT 1
- `inputs` argument cannot be empty HOT 1
- Merge layers do not pass masks to the `compute_mask` function HOT 1
- Error in masked BatchNormalization with > 3 dimensions HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras.