Downloads · 30 days
5
16% of all-time downloads
optimum/bert-base-cased-squad2-neuronx
bert-base-cased-squad2-neuronx is a machine learning model from optimum. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
5
16% of all-time downloads
All-time downloads
31
Public
Repo size
220 MB
Likes
0
Public
Click a slice to open those files.
.neuron220 MB · 100%
From the Hugging Face model README
INFERENTIA2 ONLY
from transformers import AutoTokenizer
from optimum.neuron import NeuronBertForQuestionAnswering
input_shapes = {"batch_size": 1, "sequence_length": 128}
compiler_args = {"auto_cast": "matmul", "auto_cast_type": "bf16"}
neuron_model = NeuronBertForQuestionAnswering.from_pretrained(
"deepset/bert-base-cased-squad2",
export=True,
**input_shapes,
**compiler_args,
)
# Save locally
neuron_model.save_pretrained("bert_base_cased_squad2_neuronx")
neuron_model.push_to_hub(
"bert_base_cased_squad2_neuronx",
repository_id="optimum/bert-base-cased-squad2-neuronx", # Replace with your HF Hub repo id
)