Comments (3)
What's the performance like with JAX? Please try it.
from keras.
Thanks for the suggestion. Here is our situation. Previously, we were running a BERT pretrain with TensorFlow 2.11 and TensorFlow Models (TFM) with XLA on mulitple GPUs. This took about an hour.
We are migrating to Keras 3 and testing:
- With Keras 3.3.3, JAX, Keras NLP, XLA and Data Parallel, we are seeing about a 50% increase in train time.
- With Keras 3.3.3, TF, Keras NLP, and TF Distribute, and no XLA we are seeing a 200% increase in train time. (We also need to reduce batch size when we do not enable XLA)
The train is modified:
- Before, we used
add_loss
. Now, we specify the loss in thecompile()
. - Keras 3 only has one loss as a metric, so we duplicate these losses as metrics to see the separate MLM and NSP losses.
- Keras 3 does not support
add_metric()
so we moved these also tocompile()
.
from keras.
FYI - we removed the extra projections from the heads of the NLP trunks and now JAX is about the same performance of TF 2.
from keras.
Related Issues (20)
- Deserializing nested objects (here: SeedGenerator as seed for GlorotUniform initializer) HOT 5
- Embedding Projector using TensorBoard callback HOT 4
- Mismatch Between Training Progress and History/CSVLogger Callback Values HOT 5
- ISSUE : Sequential model 'sequential_1' has already been configured to use input shape (None, 224, 224, 3). You cannot build it with input_shape [None, 224, 224, 3] HOT 3
- Call on an Embedding model doesnt produce the same result for keras 2 and keras 3 models HOT 5
- the dynamic has a result, but the static inference shape reports an error HOT 2
- mul got incompatible shapes for broadcasting HOT 3
- MultiHeadAttention is using unoptimised einsum equations HOT 5
- Invalid reduction dimension (2 for input with 2 dimension(s) [Op:Sum] HOT 4
- Error: unknown metric function HOT 1
- Inconsistent execution results by the PyTorch backend HOT 1
- "replication_pad1d" not implemented for 'Half' HOT 2
- Add 'pip install -r requirements.txt' to devcontainer.json to reduce contribution efforts HOT 2
- Loss and Gradients not correct when last batch has different size HOT 1
- support for dictionary-type loss functions without explicitly declaring `None` HOT 1
- Model.metrics_names not returning all metrics HOT 2
- Question about Memory Leak (all backends) HOT 7
- TextVectorization returns 'int64' vs 'float32' in TF 2.7 / nightly + Training simple unigram/bigram models much slower than in 2.15 HOT 2
- Custom `tf.keras.metrics.Metric` example fails on GPU in TF 2.17 (but not on nightly): is it possible to get it to work on 2.17? HOT 3
- Allow to pass **kwargs to optimizers.get HOT 1
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.