[ML] Add EuroBERT/Jina v5 ops to graph validation allowlist#3015
Draft
edsavage wants to merge 3 commits intoelastic:mainfrom
Draft
[ML] Add EuroBERT/Jina v5 ops to graph validation allowlist#3015edsavage wants to merge 3 commits intoelastic:mainfrom
edsavage wants to merge 3 commits intoelastic:mainfrom
Conversation
Jina Embeddings v5 is based on EuroBERT, which uses a different architecture from the BERT family: - RoPE (rotary position embeddings) → aten::sin, aten::cos - RMSNorm (instead of LayerNorm) → aten::rsqrt - SiLU activation (instead of GELU) → aten::silu Required for Eland PR elastic/eland#818 which adds support for importing Jina v5 models into Elasticsearch. Made-with: Cursor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
aten::sin and aten::cos are now in the allowlist (needed by EuroBERT/Jina v5 for rotary position embeddings), so tests that used them as example "unrecognised" ops now fail. - Replace torch.sin with torch.logit in synthetic test modules - Update malicious model tests to check for ops that remain unrecognised (aten::tan, aten::exp) rather than sin/cos Made-with: Cursor
…logit) Regenerate malicious_hidden_in_submodule.pt with aten::logit+clamp so graph validation still fails when aten::sin is allowed for EuroBERT/Jina. Update dev-tools/generate_malicious_models.py and test comments. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 4 ops required by the Jina Embeddings v5 model architecture (EuroBERT + LoRA adapters):
aten::sinaten::cosaten::rsqrtaten::siluRequired for elastic/eland#818 which adds support for importing Jina v5 models into Elasticsearch.
Ops verified by tracing
jinaai/jina-embeddings-v5-text-nanowith merged LoRA retrieval adapter locally.Cross-repo dependencies
byte_level_bpetokenization type + BPEmergesvocabulary format support (TBD)Test plan
Made with Cursor