Views
No views yet
SentenceTransformer(
(0): StaticEmbedding(
(embedding): EmbeddingBag(151669, 1024, mode='mean')
)
(1): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("turanyigitpazarama/nife-qwen-device-features-student")
5# Run inference
6sentences = [
7 'The weather is lovely today.',
8 "It's so sunny outside!",
9 'He drove to the stadium.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities)
18# tensor([[1.0000, 0.2043, 0.0960],
19# [0.2043, 1.0000, 0.0579],
20# [0.0960, 0.0579, 1.0000]])