-
Notifications
You must be signed in to change notification settings - Fork 174
fix: use unified classifier in classification endpoints #213
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
Fix API endpoints returning placeholder responses instead of real results. Modified ClassifyIntent, DetectPII, CheckSecurity to prioritize unified classifier over legacy classifier. Signed-off-by: OneZero-Y <aukovyps@163.com>
❌ Deploy Preview for vllm-semantic-router failed.
|
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
Is i walk through the code, and find out that ext_proc uses the legacy classifier
If a legacy classifier use the modernBert model and the unifiedClassifier prefer lora model. and these two may return different category results. for example: user input is. "3*5=?" |
@AkisAya You're absolutely right!
Legacy Model (category_classifier_modernbert-base_model): 14 categories including "math"
Re-train LoRA models with complete category sets matching the legacy model and sufficient training data for math/science domains. |
for _, piiType := range piiResult.PIITypes { | ||
entity := PIIEntity{ | ||
Type: piiType, | ||
Value: "[DETECTED]", // Placeholder - unified classifier doesn't provide exact positions yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token sequence classifier should have the location index. Can you follow up in another PR? Thanks
// Convert SecurityResult to SecurityResponse format | ||
if len(securityResults) == 0 { | ||
return &SecurityResponse{ | ||
IsJailbreak: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why using hardcoded values? no security result can have a special output but a hardcoded response like this is a bit confusing.
What type of PR is this?
fix: use unified classifier in classification endpoints
What this PR does / why we need it:
Which issue(s) this PR fixes:
fix: #210