Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JiT Compilation to PCRE2 #449

Merged
merged 4 commits into from
Mar 24, 2025

Conversation

apaniukov
Copy link
Collaborator

@apaniukov apaniukov commented Mar 21, 2025

  • Speed up match and substitute methods of PCRE2Wrapper

Benchmark results (i9-10980XE):

  • Xenova/gpt-4o:
    Before:
    Sync: OV: 1041.573 FPS, HF: 1831.254 FPS, OV/HF: 0.5687758075194422
    Async: OV: 6873.116 FPS, HF: 1831.254 FPS, OV/HF: 3.753229524742228
    After:
    Sync: OV: 1828.426 FPS, HF: 1799.136 FPS, OV/HF: 1.0162797516004303
    Async: OV: 6276.791 FPS, HF: 1799.136 FPS, OV/HF: 3.4887804039175005

  • BAAI/bge-reranker-v2-m3:
    Before:
    Sync: OV: 860.586 FPS, HF: 1503.576 FPS, OV/HF: 0.5723594732195535
    Async: OV: 5459.165 FPS, HF: 1503.576 FPS, OV/HF: 3.6307875921539288
    After:
    Sync: OV: 1829.828 FPS, HF: 1561.229 FPS, OV/HF: 1.1720434745361927
    Async: OV: 6909.142 FPS, HF: 1561.229 FPS, OV/HF: 4.425451319526877

  • google/flan-t5-xxl:
    Before:
    Sync: OV: 1015.991 FPS, HF: 1742.299 FPS, OV/HF: 0.5831325036213919
    Async: OV: 6009.998 FPS, HF: 1742.299 FPS, OV/HF: 3.4494645037061304
    After:
    Sync: OV: 2003.620 FPS, HF: 1648.930 FPS, OV/HF: 1.2151027742685914
    Async: OV: 6955.370 FPS, HF: 1648.930 FPS, OV/HF: 4.218110800753291

  • bert-base-uncased:
    Before:
    Sync: OV: 966.191 FPS, HF: 1796.871 FPS, OV/HF: 0.537707686934503
    Async: OV: 5802.693 FPS, HF: 1796.871 FPS, OV/HF: 3.229332893522078
    After:
    Sync: OV: 1798.308 FPS, HF: 1769.413 FPS, OV/HF: 1.016330446103731
    Async: OV: 6848.318 FPS, HF: 1769.413 FPS, OV/HF: 3.8703909704550936

  • Remove pointer from UnigramTokenizerImpl

@apaniukov apaniukov changed the title Remove Pointers in UnigramTokenizerImpl Add JiT Compilation to PCRE2 Mar 21, 2025
Copy link
Collaborator

@pavel-esir pavel-esir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@apaniukov apaniukov added this pull request to the merge queue Mar 24, 2025
Merged via the queue into openvinotoolkit:master with commit a2197d2 Mar 24, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants