Skip to content

v0.9.0

Compare
Choose a tag to compare
@mattdangerw mattdangerw released this 06 Apr 00:42
· 16 commits to r0.9 since this release
8731d1d

The 0.9.0 release adds new models, hub integrations, and general usability improvements.

Summary

  • Added the Gemma 1.1 release.
  • Added the Llama 2, BLOOM and ELECTRA models.
  • Expose new base classes. Allow from_preset() on base classes.
    • keras_nlp.models.Backbone
    • keras_nlp.models.Task
    • keras_nlp.models.Classifier
    • keras_nlp.models.CausalLM
    • keras_nlp.models.Seq2SeqLM
    • keras_nlp.models.MaskedLM
  • Some initial features for uploading to model hubs.
    • backbone.save_to_preset, tokenizer.save_to_preset, keras_nlp.upload_preset.
    • from_preset and upload_preset now work with the Hugging Face Models Hub.
    • More features (task saving, lora saving), and full documentation coming soon.
  • Numerical fixes for the Gemma model at mixed_bfloat16 precision. Thanks unsloth for catching!
# Llama 2. Needs Kaggle consent and login, see https://github.com/Kaggle/kagglehub
causal_lm = keras_nlp.models.LlamaCausalLM.from_preset(
    "llama2_7b_en",
    dtype="bfloat16", # Run at half precision for inference.
)
causal_lm.generate("Keras is a", max_length=128)
# Base class usage.
keras_nlp.models.Classifier.from_preset("bert_base_en", num_classes=2)
keras_nlp.models.Tokenizer.from_preset("gemma_2b_en")
keras_nlp.models.CausalLM.from_preset("gpt2_base_en", dtype="mixed_bfloat16")

What's Changed

New Contributors

Full Changelog: v0.8.2...v0.9.0