Description
Hi -
Great library! Until today I was successfully using await pipeline('sentence-similarity', 'sentence-transformers/all-MiniLM-L6-v2') to create embeddings in the browser.
However, I am now seeing error when "awaiting pipeline('sentence-similarity', 'sentence-transformers/all-MiniLM-L6-v2')"
unsupported pipeline: sentence-similarity. Must be one of [text-classification,token-classification,question-answering,fill-mask,summarization,translation,text2text-generation,text-generation,zero-shot-classification,automatic-speech-recognition,image-to-text,image-classification,image-segmentation,zero-shot-image-classification,object-detection,feature-extraction]
Note that https://huggingface.co/docs/transformers.js/index indicates 'sentence-similarity' is allowed.
How to reproduce
(In browser)
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers';
const embedder = await pipeline('sentence-similarity', 'sentence-transformers/all-MiniLM-L6-v2')
throws error
Error: Unsupported pipeline: sentence-similarity. Must be one of [text-classification,token-classification,question-answering,fill-mask,summarization,translation,text2text-generation,text-generation,zero-shot-classification,automatic-speech-recognition,image-to-text,image-classification,image-segmentation,zero-shot-image-classification,object-detection,feature-extraction]
at Semantic.M [as _pipeline] (transformers:70:13556)
Any help illustrating how to load and use all-MiniLM-L6-v2 in the browser is greatly appreciated!
Perhaps it is now found in a new pipeline group? I cannot locate 'sentence-similarity' in the codebase... It looks like there has been some refactoring and hoping this was not purposefully lost?