this model is derrived from
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('sentence-transformers/stsb-roberta-base-v2')
embeddings = model.encode(sentences)
print(embeddings)
You need to have ibm-fms installed:
https://github.com/foundation-model-stack/foundation-model-stack/issues/169
- Downloads last month
- 21
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("michaelfeil/stsb-roberta-base-v2", trust_remote_code=True, dtype="auto")