Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@michaelfeil
Copy link
Owner

Related Issue

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Add any other context about the PR here.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances BetterTransformer support across multiple transformer modules, particularly focusing on compatibility checks and proper initialization order for the nomic-ai/nomic-embed-text-v1.5 model.

  • Added check_if_bettertransformer_possible function in /libs/infinity_emb/infinity_emb/transformer/acceleration.py to verify model compatibility
  • Modified transformer modules to conditionally enable BetterTransformer only when both compatible and enabled
  • Moved BetterTransformer conversion after quantization for proper operation order
  • Standardized benchmark parameters in Makefile to 50 requests/50 concurrent for both text and vision tests
  • Added 'eager' attention implementation setting when BetterTransformer is enabled and compatible

6 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

engine_args.model_name_or_path,
revision=engine_args.revision,
trust_remote_code=engine_args.trust_remote_code,
# attn_implementation="eager" if engine_args.bettertransformer else None,
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: bettertransformer support appears incomplete - the commented line suggests it's not fully implemented yet

michaelfeil and others added 2 commits January 3, 2025 08:06
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.85%. Comparing base (c69f927) to head (d33c9e0).

Files with missing lines Patch % Lines
...emb/infinity_emb/transformer/crossencoder/torch.py 80.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
- Coverage   80.00%   79.85%   -0.16%     
==========================================
  Files          43       43              
  Lines        3471     3484      +13     
==========================================
+ Hits         2777     2782       +5     
- Misses        694      702       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil merged commit ef4c424 into main Jan 3, 2025
36 checks passed
@michaelfeil michaelfeil deleted the better-bettertransformers-support branch January 3, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants