https://github.com/ajroetker/gomlx/tree/dynamic-shapes-v2-005/examples/glinerThat's my current mega branch that I've implemented dynamic shapes in the go backend using a bunch of learnings, I'm sure it's not finished and Jan and I only went over the original design doc and it uses a two pass approach to handle some stuff that I'm not sure Jan will like or not but this is to say that I'm actively trying to get it working for gliner (you can see my not quite working gliner example in that link too).
I also had a different approach that implemented removing the dynamism from the gomlx layer in
https://github.com/ajroetker/onnx-gomlx/tree/dynamic-tensor-sizes by using the onnx exports, in the end both approaches will likely be used as dynamic shapes in gomlx would be a win I imagine but also a quicker win would be removing the dynamism at onnx compilation time. I'm specifically targeting multi model support for being able to download models and have them run using whatever runners you want (on your pc/mac or in k8s with tpus)
https://github.com/antflydb/termite/blob/main/e2e/rebel_test.gohttps://github.com/antflydb/termite/blob/main/pkg/termite/lib/ner/rebel.go yeah rebel is another ner model that doesn't use dynamism in it's onnx graphs and so "just works" today with gomlx (I have a pipeline that uses gomlx seq2seq.go with a backend_gomlx.go in the termite repo)
The attention layer stuff your working on is a huge thing, super glad you're working on that. We could also probably split up the working for dyamic shapes in gomlx vs dynamic shape extraction/removal in onnx-gomlx. Happy to hop on a call to talk any of this stuff as Jan knows!