MrBERT-ca
27
1
license:apache-2.0
by
BSC-LT
Language Model
OTHER
New
27 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-ca')
>>> pprint(unmasker("M'encanta la<mask>de Barcelona.",top_k=3))
[{'score': 0.5078125,
'sequence': "M'encanta la ciutat de Barcelona.",
'token': 1125,
'token_str': 'ciutat'},
{'score': 0.060791015625,
'sequence': "M'encanta la gastronomia de Barcelona.",
'token': 10336,
'token_str': 'gastronomia'},
{'score': 0.041748046875,
'sequence': "M'encanta la platja de Barcelona.",
'token': 5404,
'token_str': 'platja'}]
>>> pprint(unmasker("La ciència engloba disciplines com la<mask>y les matemàtiques.",top_k=3))
[{'score': 0.703125,
'sequence': 'La ciència engloba disciplines com la física y les '
'matemàtiques.',
'token': 5096,
'token_str': 'física'},
{'score': 0.15625,
'sequence': 'La ciència engloba disciplines com la biologia y les '
'matemàtiques.',
'token': 19234,
'token_str': 'biologia'},
{'score': 0.0576171875,
'sequence': 'La ciència engloba disciplines com la química y les '
'matemàtiques.',
'token': 11562,
'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.1796875,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your arm and wait patiently.',
'token': 15234,
'token_str': 'arm'},
{'score': 0.1396484375,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your rug and wait patiently.',
'token': 19473,
'token_str': 'rug'},
{'score': 0.10888671875,
'sequence': "Since I can't conquer the world yet, I'll just hide my weights "
'under your power and wait patiently.',
'token': 32670,
'token_str': 'power'}]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.