v0.7.0
This release integrates KerasNLP and Kaggle Models. KerasNLP models will now work in Kaggle offline notebooks and all assets will quickly attach to a notebook rather than needing a slow download.
Summary
KerasNLP pre-trained models are now all made available through Kaggle Models. You can see all models currently available in both KerasCV and KerasNLP here. Individual model pages will include example usage and a file browser to examine all available assets for a model preset.
This change will not affect the existing usage of from_preset()
. Statement like keras_nlp.models.BertClassifier.from_preset("bert_base_en")
will continue to work and download checkpoints from the Kaggle Models hub.
A note on model saving—for saving support across Keras 2 and Keras 3, we recommend using the new Keras saved model format. You can use model.save('path/to/location.keras')
for a full model and model.save_weights('path/to/location.weights.h5')
for checkpoints. See the Keras saving guide for more details.
What's Changed
- Don't export model internals publicly by @mattdangerw in #1255
- Bump master branch version number to 0.7.0.dev0 by @mattdangerw in #1254
- Fix/allow different encoder and decoder feature dimensions in transformer decoder layer by @ferraric in #1260
- Doc updates to switch branding to Keras 3 by @mattdangerw in #1259
- Remove unused TPU testing for backbones by @mattdangerw in #1266
- Make gelu a function, not a lambda so it can be loaded without safe_mode=False by @calvingiles in #1262
- Update requirements and install instructions for multi-backend keras by @mattdangerw in #1257
- Support Keras 3 installation by @mattdangerw in #1258
- Remove dtensor by @mattdangerw in #1268
- Add a lora dense layer by @mattdangerw in #1263
- Factor out testing routines for models by @mattdangerw in #1269
- Convert T5 to Keras 3 by @nkovela1 in #1274
- Fix missing backticks in DistilBertClassifier docstrings by @Philmod in #1278
- T5 checkpoint conversion with HF by @nkovela1 in #1277
- Use gelu_approximate directly in t5 presets by @mattdangerw in #1284
- Add preset tests and weights URLs by @nkovela1 in #1285
- Support loading keras 3 nightly by @mattdangerw in #1286
- Remove the use of
SentencePieceTrainer
from tests by @tirthasheshpatel in #1283 - Fix XLM-RoBERTa detokenize() by @abheesht17 in #1289
- Correct tie_embedding_weights and add logit checking by @nkovela1 in #1288
- Add detokenize testing for model tokenizers by @mattdangerw in #1290
- Fix Whisper by @abheesht17 in #1287
- Test against Keras 3 by @mattdangerw in #1273
- Support TF_USE_LEGACY_KERAS by @mattdangerw in #1295
- Run workflows with read-only tokens by @pnacht in #1305
- Update CONTRIBUTING.md by @mattdangerw in #1310
- Add GitHub Action for Nightly by @sampathweb in #1309
- Fix the publish to pypi action by @mattdangerw in #1311
- Fix nightly tf failure by @mattdangerw in #1316
- Switch deberta to use the "int" dtype by @mattdangerw in #1315
- Add security policy by @pnacht in #1319
- Fix missing export for reversible embedding by @mattdangerw in #1327
- Add
version
API to keras_nlp by @grasskin in #1324 - Fix Keras 3 version check by @sampathweb in #1328
- Simplify running KerasNLP with Keras 3 by @mattdangerw in #1308
- Fix issues with version by @mattdangerw in #1332
- Fix typo in whisper presets files by @mattdangerw in #1337
ELECTRA
backbone implementation in keras by @pranavvp16 in #1291- Fix t5 tokenizer expected output by @mattdangerw in #1348
- Add init.py for electra by @mattdangerw in #1352
- Remove lora dense for now by @mattdangerw in #1359
- Adds Kokoro Build script for Keras-NLP GPU tests by @sampathweb in #1355
- Fixes GPU Test failures for Keras 3 by @sampathweb in #1361
- Change Continuous config to also run only large tests by @sampathweb in #1362
- ElectraTokenizer by @pranavvp16 in #1357
- Add MistralAI's 7B Transformer as a backbone in KerasNLP Models by @tirthasheshpatel in #1314
- changing pooling output by @mbrhd in #1364
- Add
LlamaBackbone
by @shivance in #1203 - Align pip_build with keras by @sampathweb in #1374
- Remove cloudbuild config by @mattdangerw in #1375
- Fix one last bad preset hash by @mattdangerw in #1381
- Add a tokenizer for the Mistral backbone by @tirthasheshpatel in #1383
- Kaggle Presets by @sampathweb in #1365
- Fix mistral and electra tokenizer to match kaggle changes by @mattdangerw in #1387
- Align requirments with Keras by @sampathweb in #1386
- Add a preprocessor for the Mistral backbone by @tirthasheshpatel in #1385
- Switch to always expect full Kaggle preset handles by @mattdangerw in #1390
New Contributors
- @calvingiles made their first contribution in #1262
- @tirthasheshpatel made their first contribution in #1283
- @pnacht made their first contribution in #1305
- @grasskin made their first contribution in #1324
- @pranavvp16 made their first contribution in #1291
- @mbrhd made their first contribution in #1364
Full Changelog: v0.6.4...v0.7.0