-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tokenizers][TF FE] Fix MUSE conversion #854
[Tokenizers][TF FE] Fix MUSE conversion #854
Conversation
build_jenkins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please productize changes and let us merge it.
Just remove string unpacking in SentencePieceOp
op extension due to native support of string tensors in OV.
modules/custom_operations/user_ie_extensions/tokenizer/sentence_piece.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor comment remained
// } | ||
// set_node_name(node.get_name(), reshape); // TODO: requires dependencies from TF FE internals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this? Please clean the code a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted
if(auto pack = dynamic_cast<StringTensorPack*>(tensor.get_node())) { | ||
// TODO: If it is a beginning of the graph, how to detect strings? It falls in 'else' branch in this case. | ||
// FIXME: Needs extension for a Parameter to prepare it first | ||
auto begins = std::make_shared<Reshape>(pack->input_value(0), shape, false); | ||
auto ends = std::make_shared<Reshape>(pack->input_value(1), shape, false); | ||
auto chars = pack->input_value(2); | ||
auto reshape = post_translate_string_tensor_output({begins, ends, chars}); | ||
return {reshape}; | ||
} else { | ||
auto reshape = std::make_shared<Reshape>(tensor, shape, false); | ||
return {reshape}; | ||
} | ||
auto reshape = std::make_shared<Reshape>(tensor, shape, false); | ||
return {reshape}; | ||
// } | ||
// set_node_name(node.get_name(), reshape); // TODO: requires dependencies from TF FE internals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should revert these changes, they does not relate MUSE model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
@dtrawins @slyalin sentencepiece operation translated from TF with string input by default. It also allows input of a decomposed string representation, but this must be changed manually after the model is converted. This PR allows you to experiment with data format optimizations without having to recompile the extension. |
No description provided.