Skip to content

v0.8.0

Compare
Choose a tag to compare
@mattdangerw mattdangerw released this 21 Feb 04:34
· 10 commits to r0.8 since this release
cca2050

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