EmbeddingGemma 2

This is onnx-community/embeddinggemma-2-ONNX, the ONNX conversion of google/embeddinggemma-2, with DirectML graphs beside the FP32 text and vision originals. The audio encoder is not included.

Graph changes

onnx/model.dml.onnx and onnx/vision_encoder.dml.onnx load the same .onnx_data weights as the originals.

  • Tanh-approximate Gelu is written out as 0.5 * x * (1 + tanh(sqrt(2 / pi) * (x + 0.044715 * x^3))), so DirectML runs it on the GPU instead of falling back to the CPU.
  • Vision Reshape nodes use allowzero=0, which DirectML requires. No target shape contains a zero.
  • Vision input dimensions are named batch_size and num_patches, so sessions can fix them by name.
  • image_features returns every pooled slot, [batch_size * num_patches / 9, 512], with each image's occupied slots first, instead of only the occupied ones. The slot-counting branch is removed.
Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for bep256/embeddinggemma-2-ONNX

Quantized
(106)
this model