-
Notifications
You must be signed in to change notification settings - Fork 296
fix(647): enable LoRA PII auto-detection with minimal changes #709
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
Switch PII classification from hardcoded ModernBERT to auto-detecting Candle BERT classifier. The Rust layer already has built-in auto-detection that checks for lora_config.json and routes to LoRA or Traditional models. Changes: 1. Init: Use InitCandleBertTokenClassifier (has auto-detect built-in) 2. Inference: Use ClassifyCandleBertTokens (auto-routes to initialized classifier) This enables LoRA PII models to work automatically without config changes, providing higher confidence scores for PII entity detection. Fixes vllm-project#647 Signed-off-by: Yossi Ovadia <[email protected]>
8e88027 to
839f26e
Compare
|
@Xunzhuo , please review |
Test Results - Issue #647 VerificationI've tested this PR locally with the router running and can confirm dramatic improvements in PII detection: Performance Comparison
Critical Test Cases from Issue #647All the problematic cases from issue #647 now work correctly: SSN ( Test script results: 9/10 tests passing (90% success rate), far exceeding the 73% improvement target from issue #647 . Router Logs ConfirmationThe router logs show excellent confidence scores from the LoRA model: All confidence scores are well above the 0.7 threshold, confirming the LoRA model is working as expected. Follow-up Improvement OpportunityWhile testing, I noticed that the Location: for _, piiType := range piiTypes {
entity := PIIEntity{
Type: piiType,
Value: "[DETECTED]",
Confidence: 0.9, // ❌ Hardcoded - should use actual confidence from model
}
response.Entities = append(response.Entities, entity)
}Current behavior:
Suggested improvement (separate PR): This is a pre-existing limitation and doesn't affect this PR's functionality - the underlying LoRA detection is working perfectly. Just flagging for future enhancement. I'll proceed once this PR will be approved and merged. |
|
even more results :
Detailed Findings✅ Test 1: SSN -
|

Switch PII classification from hardcoded ModernBERT to auto-detecting Candle BERT classifier. The Rust layer already has built-in auto-detection that checks for lora_config.json and routes to LoRA or Traditional models.
Changes:
This enables LoRA PII models to work automatically without config changes, providing higher confidence scores for PII entity detection.
Fixes #647