Sentence Similarity
sentence-transformers
PyTorch
English
bert
feature-extraction
mteb
custom_code
Eval Results (legacy)
text-embeddings-inference
Instructions to use Hum-Works/lodestone-base-4096-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Hum-Works/lodestone-base-4096-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Hum-Works/lodestone-base-4096-v1", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
not able to use with setfit
#2
by priyank-m - opened
hi, I am not able to train the model with setfit.
getting the error: RuntimeError: The size of tensor a (1431) must match the size of tensor b (512) at non-singleton dimension 1
some issue with the position embeddings it seems
ok so I am able to make it work by loading the with AutoModel then making the change
model.config.max_position_embeddings = 4096
and then save the model
then load the model again with SetFitModel.from_pretrained
(might be a bit crude approach but looks like it is training)
priyank-m changed discussion status to closed