Tensorflow-metal: Problems with Keras 3.0

The following code taken from keras.io produces the error InternalError: Exception encountered when calling GPT2Tokenizer.call(). ... 2 root error(s) found. (0) INTERNAL: stream cannot wait for itself

Macos on Macbook, M2 Max. Setting the optimizer to "Adam" does not help.

import keras_nlp # version 0.15
causal_lm = keras_nlp.models.GPT2CausalLM.from_preset("gpt2_base_en")
causal_lm.compile(sampler="greedy")
# the next call produces the error
causal_lm.generate(["Keras is a"])
Answered by bayerth in 805091022

Forgotten: Tensorflow-metal version 1.1.0

Accepted Answer

Forgotten: Tensorflow-metal version 1.1.0

Tensorflow-metal: Problems with Keras 3.0
 
 
Q