Running gemma model in Mac m1 gets xla_compile_on_demand_op error
@lgemc Please ensure that you're using TensorFlow version 2.16.0 or higher, as it includes better M1 compatibility and might resolve the XLA compilation error.
Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63043">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63043">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

2.15.0

### Custom code

Yes

### OS platform and distribution

macOS Sonoma 14.1.2

### Mobile device

_No response_

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

Macbook pro m1 16G

### Current behavior?

I expect get the model working, if I can help adding support to missing features I probably need some guidance but I can help 😸

Keras version: 3.0.5

I try same TensorFlow and Keras version using cuda on linux and I get the model working 🙈

### Standalone code to reproduce the issue

```shell
import keras
import keras_nlp
import numpy as np

gemma_lm = keras_nlp.models.GemmaCausalLM.from_preset("gemma_2b_en")
out = gemma_lm.generate("Keras is a", max_length=30)
print(out)
```


### Relevant log output

```shell
Low level error:

` W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at xla_compile_on_demand_op.cc:292 : NOT_FOUND: could not find registered platform with id: 0x1320e1750`

Python get this error:


Traceback (most recent call last):
  File "/Users/lmanrique/Try/gemma/main.py", line 6, in <module>
    gemma_lm.generate("Keras is a", max_length=30)
  File "/Users/lmanrique/miniconda3/envs/gemma/lib/python3.9/site-packages/keras_nlp/src/models/generative_task.py", line 269, in generate
    outputs = [generate(x) for x in inputs]
  File "/Users/lmanrique/miniconda3/envs/gemma/lib/python3.9/site-packages/keras_nlp/src/models/generative_task.py", line 269, in <listcomp>
    outputs = [generate(x) for x in inputs]
  File "/Users/lmanrique/miniconda3/envs/gemma/lib/python3.9/site-packages/keras_nlp/src/models/generative_task.py", line 253, in generate
    return generate_function(x, end_token_id=end_token_id)
  File "/Users/lmanrique/miniconda3/envs/gemma/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/Users/lmanrique/miniconda3/envs/gemma/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 53, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.NotFoundError: Graph execution error:
```
```
