JoshuaBillson:
Does StableHLO produce native Julia models, where you can extract and modify layers, or is it essentially a black box like ONNX? The reason I ask is that my current project involves implementing Timm models as pure Julia equivalents in Flux, then I define a load_params! method that takes a PyTorch state_dict from the matching Timm model/layer and loads the parameters into the corresponding Flux layer. This has the advantage of producing a model that can be used like any other Flux layer, but obviously requires a fair amount of work to duplicate the original PyTorch code.
It doesn’t produce native Julia models, but you can use it inside the rest of your native Julia model. Well, I suppose as long as you compile it to Reactant.jl.
Also see here, I’m working on a timm port for Lux.jl: [ANN] Jimm.jl: Lux ports of timm image backbones, with HuggingFace pretrained weights
It would likely be pretty easy to do the same sort of workflow I did here to port things over to Flux.jl, but I’m not personally familiar with it.