MrBERT-es
1.3K
4
license:apache-2.0
by
BSC-LT
Language Model
OTHER
New
1K downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
How to usepythontransformers
>>> from transformers import pipeline
>>> from pprint import pprint
>>> unmasker = pipeline('fill-mask', model='BSC-LT/MrBERT-es')
>>> pprint(unmasker("Me encanta la<mask>de Barcelona.",top_k=3))
[{'score': 0.2312059849500656,
'sequence': 'Me encanta la ciudad de Barcelona.',
'token': 2634,
'token_str': 'ciudad'},
{'score': 0.0812854915857315,
'sequence': 'Me encanta la gente de Barcelona.',
'token': 4475,
'token_str': 'gente'},
{'score': 0.07678654044866562,
'sequence': 'Me encanta la gastronomía de Barcelona.',
'token': 18096,
'token_str': 'gastronomía'}]
>>> pprint(unmasker("La ciencia engloba disciplinas como la<mask>y las matemáticas.",top_k=3))
[{'score': 0.8801143765449524,
'sequence': 'La ciencia engloba disciplinas como la física y las '
'matemáticas.',
'token': 9204,
'token_str': 'física'},
{'score': 0.07342680543661118,
'sequence': 'La ciencia engloba disciplinas como la biología y las '
'matemáticas.',
'token': 40678,
'token_str': 'biología'},
{'score': 0.02307266741991043,
'sequence': 'La ciencia engloba disciplinas como la química y las '
'matemáticas.',
'token': 25047,
'token_str': 'química'}]
>>> pprint(unmasker("Since I can't conquer the world yet, I'll just hide my weights under your<mask>and wait patiently.", top_k=3))
[{'score': 0.12437283992767334,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your pillow and wait patiently.',
'token': 40389,
'token_str': 'pillow'},
{'score': 0.09473687410354614,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your arm and wait patiently.',
'token': 6198,
'token_str': 'arm'},
{'score': 0.08770021051168442,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your feet and wait patiently.',
'token': 6985,
'token_str': 'feet'}]Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.