Skip to content

Conversation

@yuezhu1
Copy link
Collaborator

@yuezhu1 yuezhu1 commented Nov 16, 2025

  • Implement DebertaV3Classifier in Rust using candle-transformers debertav2 components
  • Add FFI bindings (init_deberta_jailbreak_classifier, classify_deberta_jailbreak_text)
  • Expose Go API (InitDebertaJailbreakClassifier, ClassifyDebertaJailbreakText)
  • Add comprehensive test suite with 13/14 tests passing
  • Add example programs demonstrating prompt injection detection
  • Fix ClassificationResult struct field order to match Go C typedef
  • Support HuggingFace Hub model loading (protectai/deberta-v3-base-prompt-injection)
  • Thread-safe concurrent classification with OnceLock<Arc> pattern

In addition to guard models planned to support in #626

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].
Detailed Checklist (Click to Expand)

Thank you for your contribution to semantic-router! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

- Implement DebertaV3Classifier in Rust using candle-transformers debertav2 components
- Add FFI bindings (init_deberta_jailbreak_classifier, classify_deberta_jailbreak_text)
- Expose Go API (InitDebertaJailbreakClassifier, ClassifyDebertaJailbreakText)
- Add comprehensive test suite with 13/14 tests passing
- Add example programs demonstrating prompt injection detection
- Fix ClassificationResult struct field order to match Go C typedef
- Support HuggingFace Hub model loading (protectai/deberta-v3-base-prompt-injection)
- Thread-safe concurrent classification with OnceLock<Arc<T>> pattern

Signed-off-by: Yue Zhu <[email protected]>
@github-actions
Copy link

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 candle-binding

Owners: @rootfs
Files changed:

  • candle-binding/src/model_architectures/traditional/deberta_v3.rs
  • candle-binding/src/model_architectures/traditional/deberta_v3_test.rs
  • candle-binding/Cargo.toml
  • candle-binding/semantic-router.go
  • candle-binding/semantic-router_test.go
  • candle-binding/src/ffi/classify.rs
  • candle-binding/src/ffi/init.rs
  • candle-binding/src/ffi/types.rs
  • candle-binding/src/model_architectures/traditional/mod.rs

📁 Root Directory

Owners: @rootfs, @Xunzhuo
Files changed:

  • examples/candle-binding/deberta_prompt_injection_example.rs
  • examples/candle-binding/test_raw_confidence.rs

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/semantic-router/cmd/cache-benchmark/main.go
  • src/semantic-router/pkg/cache/benchmark.go

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@netlify
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 73aafba
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/691a4ff15c264d0008bf8b9f
😎 Deploy Preview https://deploy-preview-674--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@wangchen615 wangchen615 left a comment

Choose a reason for hiding this comment

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

LGTM

@wangchen615 wangchen615 merged commit 6a4ebf4 into vllm-project:main Nov 17, 2025
26 checks passed
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.

4 participants