keras-team / keras-nlp

Modular Natural Language Processing workflows with Keras
Apache License 2.0
730 stars 215 forks source link

Add include rescaling to the pali gemma backbone #1650

Closed mattdangerw closed 1 month ago

mattdangerw commented 1 month ago

This will break compat on pali gemma, but bring us in line with other models, so we are doing this quickly as a patch release. To disable this option, pass an override when constructing the backbone.

keras_nlp.models.PaliGemmaBackbone.from_preset(
    "pali_gemma_3b_224",
    include_rescaling=False,
)

Allow inputs to be the more standard range 0, 255.

https://colab.sandbox.google.com/gist/mattdangerw/5e32eb90cccc69cfd0cd410cd935315a/rescaling-test.ipynb