Skip to content

Releases: keras-team/keras-hub

v0.8.2

27 Feb 22:46
c9baf2f
Compare
Choose a tag to compare

Summary

  • Mistral fixes for dtype and memory usage. #1458

What's Changed

Full Changelog: v0.8.1...v0.8.2.dev0

v0.8.1

22 Feb 01:24
712f172
Compare
Choose a tag to compare

Minor fixes to Kaggle Gemma assets.

What's Changed

Full Changelog: v0.8.0...v0.8.1

v0.8.0

21 Feb 04:34
cca2050
Compare
Choose a tag to compare

The 0.8.0 release focuses on generative LLM features in KerasNLP.

Summary

  • Added the Mistral and Gemma models.
  • Allow passing dtype directly to backbone and task constructors.
  • Add a settable sequence_length property to all preprocessing layers.
  • Added enable_lora() to the backbone class for parameter efficient fine-tuning.
  • Added layer attributes to backbone models for easier access to model internals.
  • Added AlibiBias layer.
# Pass dtype to a model.
causal_lm = keras_nlp.MistralCausalLM.from_preset(
    "mistral_instruct_7b_en",
    dtype="bfloat16"
)
# Settable sequence length property.
causal_lm.preprocessor.sequence_length = 128
# Lora API.
causal_lm.enable_lora(rank=4)
# Easy layer attributes.
for layer in causal_lm.backbone.transformer_layers:
    print(layer.count_params())

What's Changed

New Contributors

Full Changelog: v0.7.0...v0.8.0

v0.17.0.dev0

22 Oct 01:12
ce93ca8
Compare
Choose a tag to compare
v0.17.0.dev0 Pre-release
Pre-release

Summary

  • 📢 KerasNLP and KerasCV are now becoming KerasHub 📢. KerasCV and KerasNLP have been consolidated into KerasHub package
  • Models available now in KerasHub are albert, bart, bert, bloom, clip, csp_darknet, deberta_v3, deeplab_v3, densenet, distil_bert, efficientnet, electra, f_net, falcon, gemma, gpt2, gpt_neo_x, llama, llama3, mistral, mit, mobilenet, opt, pali_gemma, phi3, resnet, retinanet, roberta, sam, stable_diffusion_3, t5, vae, vgg, vit_det, whisper, xlm_roberta and xlnet.
  • A new preprocessor flow has been added for vision and audio models

What's Changed

Read more

v0.7.0

05 Jan 22:29
ce93ca8
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.6.4...v0.7.0

v0.6.4

07 Dec 22:58
fb8e861
Compare
Choose a tag to compare

Summary

This point release simplifies our support for Keras 3 and Keras 2.

  • If Keras 2 is installed, KerasNLP will use Keras 2 and TensorFlow.
  • If Keras 3 is installed, KerasNLP will use Keras 3 and run on any backend.

If you have any issue installing KerasNLP, please open an issue.

What's Changed

Full Changelog: v0.6.3...v0.6.4

v0.6.3

07 Nov 23:34
3915eec
Compare
Choose a tag to compare

Summary

This release adds support for running KerasNLP against Keras 3. You can try this today by installing tf-nightly and tensorflow-text-nightly.

pip install keras-nlp
pip uninstall -y tensorflow-text tensorflow keras
pip install tensorflow-text-nightly tf-nightly

Otherwise, this release should be a no-op for all users. No new features, no change in default behavior.

Upcoming changes

After the release of Keras 3, we will drop support for running KerasNLP against the Keras Core package (no more import keras_core as keras), in favor of Keras 3. Keras 3 is the long-term replacement for Keras Core.

What's Changed

Full Changelog: v0.6.2...v0.6.3

v0.6.2

21 Sep 19:42
Compare
Choose a tag to compare

Summary

  • Support mixed precision on keras-core on all of jax, torch and tensorflow.
  • Add keras_nlp.layers.RotaryEmbedding for rotary embeddings.
  • Add keras_nlp.layers.ReversibleEmbedding to better support tied or untied weights for logit projections.
  • Many bug fixes and improvements.

What's Changed

New Contributors

Full Changelog: v0.6.1...v0.6.2

v0.6.1

31 Jul 23:54
Compare
Choose a tag to compare

With the 0.6.1. release, all remaining models, metrics and samplers have been ported to keras-core. The full KerasNLP API is now available on TensorFlow, PyTorch and Jax (instructions).

Summary

  • FNet and DeBERTa are now multi-backend.
    • All keras_nlp.models.FNetXX and keras_nlp.models.DebertaV3XX symbols work on all backends.
  • keras_nlp.samplers.BeamSampler and keras_nlp.samplers.ContrastiveSampler work on all backends.
  • All keras_nlp.metrics classes work on all backends.
    • For Jax and PyTroch, pass python strings to metrics (as tensor strings are strictly tensorflow).
  • Restored the mask_positions named argument to MaskedLMHead.

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.0

11 Jul 04:20
de9a325
Compare
Choose a tag to compare

KerasNLP is adding experimental support for Jax and PyTorch backends on top of the Keras Core library. Read the anouncement, and browse the full library documentation, including how to specify the backend when running your code.

Support for both Jax and PyTorch is still experimental, expect some rough edges and please give us feedback!

Summary

  • This release should be equivalent to 0.5.2 with the addition of multi-backend support.
  • The following API symbols are currently restricted to the tensorflow backend:
    • keras_nlp.models.DebertaV3*
    • keras_nlp.models.FNet*
    • keras_nlp.metrics
    • keras_nlp.samplers.BeamSampler
    • keras_nlp.samplers.ContrastiveSampler
  • Note that there are two ways you can run on top of Tensorflow.
    • If you run your scripts/colab without any changes, KerasNLP will use tf.keras for all layer and modeling implementations. This should be a no-op from previous releases of the library.
    • If you run your scripts/colab with KERAS_BACKEND={jax, torch, tensorflow}, you will be trying the new Keras Core library, using the specified backend. This is a great way to test out the future of the library!
    • Full details on runtime specification is available along with the Keras Core documentation.

What's Changed

New Contributors

Full Changelog: v0.5.2...v0.6.0