aws-neuron / all-MiniLM-L6-v2-neuron

huggingface.co
Total runs: 12
24-hour runs: 0
7-day runs: -3
30-day runs: -1
Model's Last Updated: October 23 2024

Introduction of all-MiniLM-L6-v2-neuron

Model Details of all-MiniLM-L6-v2-neuron

**This model is a neuron compiled version of https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2 ***

It was compiled on version 2.20 of the Neuron SDK. You may need to run the compilation process again.

See https://huggingface.co/docs/optimum-neuron/en/inference_tutorials/sentence_transformers for more details

For information on how to run on SageMaker: https://huggingface.co/docs/optimum-neuron/en/inference_tutorials/sentence_transformers

To run:

from optimum.neuron import NeuronModelForSentenceTransformers
from transformers import AutoTokenizer
model_id = "jburtoft/all-MiniLM-L6-v2-neuron"

# Use the line below if you have to compile the model yourself
#model_id = "all-MiniLM-L6-v2-neuron"


model = NeuronModelForSentenceTransformers.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Run inference
prompt = "I like to eat apples"
encoded_input = tokenizer(prompt, return_tensors='pt')
outputs = model(**encoded_input)

token_embeddings = outputs.token_embeddings
sentence_embedding = outputs.sentence_embedding

print(f"token embeddings: {token_embeddings.shape}") # torch.Size([1, 7, 384])
print(f"sentence_embedding: {sentence_embedding.shape}") # torch.Size([1, 384])

To compile:

optimum-cli export neuron -m sentence-transformers/all-MiniLM-L6-v2 --sequence_length 512 --batch_size 1 --task feature-extraction all-MiniLM-L6-v2-neuron

Runs of aws-neuron all-MiniLM-L6-v2-neuron on huggingface.co

12
Total runs
0
24-hour runs
0
3-day runs
-3
7-day runs
-1
30-day runs

More Information About all-MiniLM-L6-v2-neuron huggingface.co Model

More all-MiniLM-L6-v2-neuron license Visit here:

https://choosealicense.com/licenses/apache-2.0

all-MiniLM-L6-v2-neuron huggingface.co

all-MiniLM-L6-v2-neuron huggingface.co is an AI model on huggingface.co that provides all-MiniLM-L6-v2-neuron's model effect (), which can be used instantly with this aws-neuron all-MiniLM-L6-v2-neuron model. huggingface.co supports a free trial of the all-MiniLM-L6-v2-neuron model, and also provides paid use of the all-MiniLM-L6-v2-neuron. Support call all-MiniLM-L6-v2-neuron model through api, including Node.js, Python, http.

all-MiniLM-L6-v2-neuron huggingface.co Url

https://huggingface.co/aws-neuron/all-MiniLM-L6-v2-neuron

aws-neuron all-MiniLM-L6-v2-neuron online free

all-MiniLM-L6-v2-neuron huggingface.co is an online trial and call api platform, which integrates all-MiniLM-L6-v2-neuron's modeling effects, including api services, and provides a free online trial of all-MiniLM-L6-v2-neuron, you can try all-MiniLM-L6-v2-neuron online for free by clicking the link below.

aws-neuron all-MiniLM-L6-v2-neuron online free url in huggingface.co:

https://huggingface.co/aws-neuron/all-MiniLM-L6-v2-neuron

all-MiniLM-L6-v2-neuron install

all-MiniLM-L6-v2-neuron is an open source model from GitHub that offers a free installation service, and any user can find all-MiniLM-L6-v2-neuron on GitHub to install. At the same time, huggingface.co provides the effect of all-MiniLM-L6-v2-neuron install, users can directly use all-MiniLM-L6-v2-neuron installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

all-MiniLM-L6-v2-neuron install url in huggingface.co:

https://huggingface.co/aws-neuron/all-MiniLM-L6-v2-neuron

Url of all-MiniLM-L6-v2-neuron

all-MiniLM-L6-v2-neuron huggingface.co Url

Provider of all-MiniLM-L6-v2-neuron huggingface.co

aws-neuron
ORGANIZATIONS

Other API from aws-neuron