Simplify Sentence Transformers examples and configure FP32 scoring

#1
by tomaarsen HF Staff - opened

Hello!

Heads up, I developed this PR with AI assistance and reviewed the changes before opening it.

Pull Request overview

  • Simplify the Sentence Transformers example and refresh its output
  • Document prebuilt FlashAttention 2 kernels
  • Configure FP32 scoring head computation

Details

I've verified the shorter example against the previous implementation. The optional FP32 scoring head setting uses https://github.com/huggingface/sentence-transformers/pull/4230. Older Sentence Transformers releases ignore it.

cc @oliverholworthy @ybabakhin

  • Tom Aarsen
tomaarsen changed pull request status to open

Thanks @tomaarsen for simplifying this example, looks great. And for adding the optional FP32 scoring head configuration

oliverholworthy changed pull request status to merged

Sign up or log in to comment