[Pooling] Honor max_embed_len for chunked embeddings - #55551
[Pooling] Honor max_embed_len for chunked embeddings#55551taneem-ibrahim wants to merge 1 commit into
Conversation
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughChunked pooling tokenization now limits ChangesPooling tokenization
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to Chunked embedding requests now reject inputs exceeding an explicitly configured embedding limit while preserving unlimited and non-chunked behavior. No current merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
Chunked embedding requests ignored an explicitly configured
max_embed_lenbecause tokenization unconditionally used an unlimited token count. This change honors the configured limit before chunk creation. It only affects explicitly configured limits; max_embed_len=None retains existing unlimited chunked processing. MRV2 execution and valid embedding outputs are unchanged.Reproducer
Configuration:
On Main:
On this branch:
An eight-token boundary request still returns HTTP 200.
Test Plan
AI Assistance
OpenAI Codex (GPT-5) assisted with drafting the change