Instructions to use neuralmind/bert-base-portuguese-cased with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neuralmind/bert-base-portuguese-cased with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="neuralmind/bert-base-portuguese-cased")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("neuralmind/bert-base-portuguese-cased") model = AutoModelForMaskedLM.from_pretrained("neuralmind/bert-base-portuguese-cased", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Add exported openvino model 'openvino_model_qint8_quantized.xml'
#7
by ArthurGprog - opened
Hello!
This pull request has been automatically generated from the export_static_quantized_openvino_model function from the Sentence Transformers library.
Config
OVQuantizationConfig(
quant_method=<OVQuantizationMethod.DEFAULT: 'default'>
)
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(
"neuralmind/bert-base-portuguese-cased",
revision=f"refs/pr/{pr_number}",
backend="openvino",
model_kwargs={"file_name": "openvino_model_qint8_quantized.xml"},
)
# 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)