huggingface / candle

Minimalist ML framework for Rust
Apache License 2.0
15.02k stars 875 forks source link

Discrepancy in NO_SPEECH_TOKENS constant between GitHub and crates.io versions #1431

Closed edesalve closed 8 months ago

edesalve commented 8 months ago

candle-transformers 0.3.1

The NO_SPEECH_TOKENS constant in the candle_transformers::models::whisper module as defined in the GitHub repository is:

pub const NO_SPEECH_TOKENS: [&str; 2] = ["<|nocaptions|>", "<|nospeech|>"];

When importing candle-transformers from crates.io, the definition differs, as shown:

pub const NO_SPEECH_TOKEN: &str = "<|nocaptions|>";

This discrepancy leads to a mismatch with the GitHub version and affects the whisper example in candle-examples.

LaurentMazare commented 8 months ago

This will be solved the next time we release the crate, hopefully when I'm back from neurips.

LaurentMazare commented 8 months ago

Version 0.3.2 of the crate has been released a couple days back so this should hopefully be fixed now. Feel free to re-open if not the case.