VOOZH about

URL: https://huggingface.co/google/embeddinggemma-300m/discussions/7

โ‡ฑ google/embeddinggemma-300m ยท Add new SentenceTransformer model with an openvino backend


Add new SentenceTransformer model with an openvino backend

#7
by santhosh - opened

Hello!

This pull request has been automatically generated from the push_to_hub method from the Sentence Transformers library.

Full Model Architecture:

SentenceTransformer(
 (0): Transformer({'max_seq_length': 2048, 'do_lower_case': False, 'architecture': 'OVModelForFeatureExtraction'})
 (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
 (2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
 (3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
 (4): Normalize()
)

Tip:

Consider testing this pull request before merging by loading the model from this PR with the revision argument:

from sentence_transformers import SentenceTransformer

# TODO: Fill in the PR number
pr_number = 2
model = SentenceTransformer(
 "google/embeddinggemma-300M",
 revision=f"refs/pr/{pr_number}",
 backend="openvino",
)

# Verify that everything works as expected
embeddings = model.encode(["The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium."])
print(embeddings.shape)

similarities = model.similarity(embeddings, embeddings)
print(similarities)
Ready to merge
This branch is ready to get merged automatically.

ยท Sign up or log in to comment