Modular Natural Language Processing workflows with Keras
APACHE-2.0 License
Bot releases are visible (Hide)
Published by mattdangerw 8 months ago
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.8.1...v0.8.2.dev0
Published by mattdangerw 8 months ago
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.8.1...v0.8.2.dev0
Published by mattdangerw 8 months ago
Minor fixes to Kaggle Gemma assets.
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.8.0...v0.8.1
Published by mattdangerw 8 months ago
The 0.8.0 release focuses on generative LLM features in KerasNLP.
Mistral
and Gemma
models.dtype
directly to backbone and task constructors.sequence_length
property to all preprocessing layers.enable_lora()
to the backbone class for parameter efficient fine-tuning.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())
tensorflow-hub 0.16.0
to fix CI error by @sampathweb in https://github.com/keras-team/keras-nlp/pull/1420
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.7.0...v0.8.0
Published by mattdangerw 8 months ago
⚠️ This is a pre-release. Testing purposes only. ⚠️
tensorflow-hub 0.16.0
to fix CI error by @sampathweb in https://github.com/keras-team/keras-nlp/pull/1420
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.7.0...v0.8.0.dev0
Published by mattdangerw 10 months ago
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.
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.
SentencePieceTrainer
from tests by @tirthasheshpatel in https://github.com/keras-team/keras-nlp/pull/1283
version
API to keras_nlp by @grasskin in https://github.com/keras-team/keras-nlp/pull/1324
ELECTRA
backbone implementation in keras by @pranavvp16 in https://github.com/keras-team/keras-nlp/pull/1291
LlamaBackbone
by @shivance in https://github.com/keras-team/keras-nlp/pull/1203
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.4...v0.7.0
Published by mattdangerw 10 months ago
⚠️⚠️
This is a pre-release for our upcoming Kaggle integration and is not yet fit for public consumption.
New pre-trained models are not yet live.
⚠️⚠️
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.
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.
SentencePieceTrainer
from tests by @tirthasheshpatel in https://github.com/keras-team/keras-nlp/pull/1283
version
API to keras_nlp by @grasskin in https://github.com/keras-team/keras-nlp/pull/1324
ELECTRA
backbone implementation in keras by @pranavvp16 in https://github.com/keras-team/keras-nlp/pull/1291
LlamaBackbone
by @shivance in https://github.com/keras-team/keras-nlp/pull/1203
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.4...v0.7.0.dev5
Published by mattdangerw 10 months ago
⚠️⚠️
This is a pre-release for our upcoming Kaggle integration and is not yet fit for public consumption.
New pre-trained models are not yet live.
⚠️⚠️
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.
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.
SentencePieceTrainer
from tests by @tirthasheshpatel in https://github.com/keras-team/keras-nlp/pull/1283
version
API to keras_nlp by @grasskin in https://github.com/keras-team/keras-nlp/pull/1324
ELECTRA
backbone implementation in keras by @pranavvp16 in https://github.com/keras-team/keras-nlp/pull/1291
LlamaBackbone
by @shivance in https://github.com/keras-team/keras-nlp/pull/1203
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.4...v0.7.0.dev4
Published by mattdangerw 11 months ago
⚠️⚠️
This is a pre-release for our upcoming Kaggle integration and is not yet fit for public consumption.
New pre-trained models are not yet live.
⚠️⚠️
Published by mattdangerw 11 months ago
This point release simplifies our support for Keras 3 and Keras 2.
If you have any issue installing KerasNLP, please open an issue.
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.3...v0.6.4
Published by mattdangerw 11 months ago
⚠️⚠️
This is a pre-release for our upcoming Kaggle integration and is not yet fit for public consumption.
New pre-trained models are not yet live.
⚠️⚠️
Published by mattdangerw 11 months ago
⚠️⚠️
This is a pre-release for our upcoming Kaggle integration and is not yet fit for public consumption.
New pre-trained models are not yet live.
⚠️⚠️
Published by mattdangerw 11 months ago
This release simplifies our support for Keras 3 and Keras 2.
Unlike our previous release, we drop support for using KerasNLP with import keras_core as keras
. Keras Core was intended as a preview of our Keras 3 launch, so please switch to Keras 3 instead.
See https://keras.io/getting_started/ for detailed instructions on installing Keras 3. As mentioned in that doc, make sure to install Keras 3 last after installing keras-nlp, tensorflow and other dependencies. This is a temporary step while TensorFlow is still pinning Keras 2.
If you have any issue installing KerasNLP, please open an issue.
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.3...v0.6.4.dev0
Published by mattdangerw 12 months ago
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.
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.
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.2...v0.6.3
Published by mattdangerw 12 months ago
⚠️ This is a pre-release. Testing purposes only. ⚠️
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.2...v0.6.3.dev1
Published by mattdangerw 12 months ago
⚠️ This is a pre-release. Testing purposes only. ⚠️
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.2...v0.6.3.dev0
Published by mattdangerw about 1 year ago
keras_nlp.layers.RotaryEmbedding
for rotary embeddings.keras_nlp.layers.ReversibleEmbedding
to better support tied or untied weights for logit projections.RotaryEmbedding
Layer by @shivance in https://github.com/keras-team/keras-nlp/pull/1180
keras_nlp.models.xlnet
by @shivance in https://github.com/keras-team/keras-nlp/pull/1204
run_layer_test
by @mattdangerw in https://github.com/keras-team/keras-nlp/pull/1238
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.1...v0.6.2
Published by mattdangerw about 1 year ago
keras_nlp.layers.RotaryEmbedding
for rotary embeddings.keras_nlp.layers.ReversibleEmbedding
to better support tied or untied weights for logit projections.RotaryEmbedding
Layer by @shivance in https://github.com/keras-team/keras-nlp/pull/1180
keras_nlp.models.xlnet
by @shivance in https://github.com/keras-team/keras-nlp/pull/1204
run_layer_test
by @mattdangerw in https://github.com/keras-team/keras-nlp/pull/1238
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.1...v0.6.2.dev0
Published by mattdangerw about 1 year ago
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).
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.keras_nlp.metrics
classes work on all backends.
mask_positions
named argument to MaskedLMHead
.GPTNeoXCausalLM
by @shivance in https://github.com/keras-team/keras-nlp/pull/1110
BeamSampler
to core by @shivance in https://github.com/keras-team/keras-nlp/pull/1181
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.0...v0.6.1
Published by mattdangerw about 1 year ago
🚧 Dev release. 🚧
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).
keras_nlp.models.FNetXX
and keras_nlp.models.DebertaV3XX
symbols work on all backends.keras_nlp.samplers.BeamSampler
and keras_nlp.samplers.ContrastiveSampler
now work on all backends.keras_nlp.metrics
classes work on all backends. For Jax and PyTroch, pass python strings to metrics (as tensor strings are strictly tensorflow).mask_positions
named argument to MaskedLMHead
.GPTNeoXCausalLM
by @shivance in https://github.com/keras-team/keras-nlp/pull/1110
BeamSampler
to core by @shivance in https://github.com/keras-team/keras-nlp/pull/1181
Full Changelog: https://github.com/keras-team/keras-nlp/compare/v0.6.0...v0.6.1.dev0