Downloads · 30 days
5
5% of all-time downloads
optimum/bert-base-cased-swag-neuronx
bert-base-cased-swag-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
5% of all-time downloads
All-time downloads
98
Public
Repo size
450 MB
Likes
0
Public
Click a slice to open those files.
.neuron225 MB · 100%
From the Hugging Face model README
INFERENTIA2 ONLY
from transformers import AutoTokenizer
from optimum.neuron import NeuronBertForMultipleChoice
input_shapes = {"batch_size": 1, "sequence_length": 128, "num_choices": 4}
compiler_args = {"auto_cast": "matmul", "auto_cast_type": "bf16"}
neuron_model = NeuronBertForMultipleChoice.from_pretrained(
"ZzRanger/bert-base-uncased-finetuned-swag",
export=True,
**input_shapes,
**compiler_args,
)
# Save locally
neuron_model.save_pretrained("bert_base_cased_swag_neuronx")
neuron_model.push_to_hub(
"bert_base_cased_swag_neuronx",
repository_id="optimum/bert-base-cased-swag-neuronx", # Replace with your HF Hub repo id
)