What is the correct way to provide sequence bias to the pipeline for automatic-speech-recognitio task using Whisper Model
I want to use sequence_bias option which is available in generation config to bias few sequences during inference. I tried passing through the pipeline, doesn’t seems to work.Here is the sample code how i tried using sequence bias.Details:Transforms Commit: git+https://github.com/huggingface/transformers@1c7e5e236823cd38faac8115f96205a82c17fff9Version: v4.31.0Usage:Pipeline Init:generation_config: GenerationConfig = GenerationConfig.from_pretrained(model_dir, config_file_name=“generation_config.json”,max_new_tokens=255,repetition_penalty=1)speech_pipeline = pipeline(“automatic-speech-recognition”,model=model_dir,#pointto whisper model dir locallyfeature_extractor=feature_extractor,tokenizer=self.tokenizer,return_timestamps=False,generate_kwargs={“num_beams”: 5,“generation_config”: self.generation_config})Inference:speech_pipeline(samples,max_new_tokens=max_new_tokens,generate_kwargs={“sequence_bias”: sequence_bias,“num_beams”: 5,“generation_config”: self.generation_config})[“text”].strip()