Hi all,
I’ve recently started digging deeper into the StableHLO ecosystem, and I’m trying to better understand the role and maturity of the stablehlo_to_tf_saved_model utility.
I have a few questions regarding its intended use and real-world applicability:
What was the original motivation for this tool?
Since StableHLO is designed to be framework-independent and serve as a portable compiler IR, converting it back to a framework-specific representation (TensorFlow SavedModel) seems somewhat counterintuitive to me. I would have expected downstream usage to favor other MLIR dialects or compiler backends instead. Could someone clarify the primary use case this tool was designed for?
How mature and widely used is this path?
Has stablehlo_to_tf_saved_model been tested extensively beyond small or synthetic examples (I only found one test with a very simple model, 2 constants)? Is it used in production or large-scale internal pipelines anywhere in the ecosystem?
Scalability to large models (e.g., LLaMA 2 7B)
Is it realistic to use this utility with very large models (multi-billion parameter scale)?
In particular:
How are large constants/weights typically handled?
How are input_locations and state_dict expected to be configured for such models?
Is there tooling to automate this process, or is it currently a mostly manual setup?
If anyone has experience using this tool with large transformer models (or can point to relevant discussions or code), I would greatly appreciate any references or insights.
Thanks in advance!
Hamza

--
You received this message because you are subscribed to the Google Groups "OpenXLA Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxla-discu...@openxla.org.
To view this discussion visit https://groups.google.com/a/openxla.org/d/msgid/openxla-discuss/48baace6-9cc1-4b66-92cc-e355094e2dc6n%40openxla.org.
For more options, visit https://groups.google.com/a/openxla.org/d/optout.
Hi Kevin,
I am sorry for the delay in my response.
Thanks a lot for the clarification, knowing that this path is more of a serving wrapper than a dialect conversion is very important for me. The historical context around SavedModel and the pointer to jax2tf were very helpful too.
I’m particularly curious about the scalability aspect you mentioned. Is there any public reference or example of large models that have been exported to StableHLO ?
More generally, I’m trying to better understand StableHLO’s role as a portability layer. Given its relatively small and stable op set, the higher-level constructs (attention, activation functions, etc.) are always fully decomposed into primitives ? Do you know of any emerging patterns for preserving some higher-level structure in MLIR ecosystem ? Something similar to what Intel's OpenVino presents here : https://docs.openvino.ai/2026/documentation/openvino-ir-format/operation-sets/available-opsets/opset16.html where they developed an MLIR dialect that preserves those high level op sets here : https://github.com/openvinotoolkit/npu_compiler/tree/develop/src/vpux_compiler/tblgen/vpux/compiler/dialect/IE/ops ?
I realize this diverges slightly from my initial question, but I'm trying to understand the broader architectural picture and uses of stablehlo.
Thanks again !!
Hamza
To view this discussion visit https://groups.google.com/a/openxla.org/d/msgid/openxla-discuss/889c9168-eeed-43c5-9ae4-8a9c05a7ecd3n%40openxla.org.