-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hello TF.js team. Thanks for your effort on helping deal with conversion among different ML model formats, but I'll be more appreciated if someone could add the support for Ops XlaDynamicUpdateSlice
and XlaDynamicSlice
accounting for my failure when I tried to convert some models of savedModel
format.
System information
- Python 3.9.17
- TensorFlow version: 2.13.0
tensorflowjs
library version: 4.11.0
Describe the feature and the current behavior/state.
I want to run some language models for text generation tasks in browser so I first searched three models(flan-t5-base, gpt2 and dialoGPT) from HuggingFace and saved them in savedModel
format. But when I tried to convert any of these models of savedModel
format, I got an error:
ValueError: Unsupported Ops in the model before optimization
XlaDynamicUpdateSlice
or
ValueError: Unsupported Ops in the model before optimization
XlaDynamicSlice, XlaDynamicUpdateSlice
So I think whether someone can help with adding these features to support these two Ops such that I can successfully convert these models.
Will this change the current api? How?
I think it won't as it could should as an inner function.
Who will benefit with this feature?
As I have tried several language models for text generation but all failed, it will be much beneficial for all who needs this kind of models running in tfjs once this feature be added.
Any Other info.
I ran the converter script by:
tensorflowjs_converter \
--input_format=tf_saved_model \
./original_model_path \
./target_model_path
Meanwhile, if anyone knows there are any possible language model candidates for text generation of high quality that can be run (or can be run after converted) in tfjs, please tells me more and I'll appreciate your kindness.