Downloads · 30 days
8
4% of all-time downloads
caldaibis/modernbert-nl-test
modernbert-nl-test is a machine learning model from caldaibis. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
8
4% of all-time downloads
All-time downloads
189
Public
Parameters
37.1M
2.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin148 MB · 49%
From the Hugging Face model README
ModernBERT model
from transformers import AutoModelForMaskedLM, AutoTokenizer
import torch
model = AutoModelForMaskedLM.from_pretrained("caldaibis/modernbert-nl-test", torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained("caldaibis/modernbert-nl-test")
text = "This is an example with [MASK] token."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
# Get predictions for masked token
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]
predicted_token_id = outputs.logits[0, mask_token_index].argmax(axis=-1)
print(tokenizer.decode(predicted_token_id))