Skip to content

Add ZeroShotClassification examples (WASM and Native) #2887

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sondalex
Copy link

This pull request implements two zero-shot classification examples:

  • A native implementation
  • A WebAssembly implementation

Additionally, this PR modifies the ModernBertClassifier, removing the softmax function call in its forward method and returning logits instead. This change ensures compatibility with more downstream tasks.

To align with common conventions in Hugging Face models, the following type adjustment was made:

  • label2id: Updated to use a string key with an unsigned integer value.

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.

1 participant