You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to use sentence-transformers/static-similarity-mrl-multilingual-v1 it fails on tokenizer.json not found. Is it possible to somehow convert the model to use it ? ONNX runtime is already there.
The text was updated successfully, but these errors were encountered:
import{AutoModel,AutoTokenizer,matmul}from'@huggingface/transformers';// Load model and tokenizerconstmodel=awaitAutoModel.from_pretrained('sentence-transformers/static-similarity-mrl-multilingual-v1',{config: {model_type: 'bert'},});consttokenizer=awaitAutoTokenizer.from_pretrained('Xenova/bert-base-multilingual-uncased');constsentences=['It is known for its dry red chili powder .','It is popular for dry red chili powder .','These monsters will move in large groups .',];constinputs=tokenizer(sentences,{padding: true,truncation: true});const{ sentence_embedding }=awaitmodel(inputs);constnormalized=sentence_embedding.normalize();constscores=awaitmatmul(normalized,normalized.transpose(1,0));console.log(scores.tolist());// [// [ 0.9999996423721313, 0.8800840973854065, 0.0017940629040822387 ],// [ 0.8800840973854065, 1.0000007152557373, 0.03064093366265297 ],// [ 0.0017940629040822387, 0.03064093366265297, 1.0000004768371582 ]// ]
There are some warnings printed out when loading the model, but you can safely ignore those.
Question
If I try to use
sentence-transformers/static-similarity-mrl-multilingual-v1
it fails ontokenizer.json
not found. Is it possible to somehow convert the model to use it ? ONNX runtime is already there.The text was updated successfully, but these errors were encountered: