candle icon indicating copy to clipboard operation
candle copied to clipboard

Add ZeroShotClassification examples (WASM and Native)

Open sondalex opened this issue 7 months ago • 0 comments

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.

sondalex avatar Apr 13 '25 10:04 sondalex