Instructions to use mobilint/bert-kor-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mobilint/bert-kor-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="mobilint/bert-kor-base", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mobilint/bert-kor-base", trust_remote_code=True, device_map="auto") - Mobilint
How to use mobilint/bert-kor-base with Mobilint:
# pip install mblt-model-zoo from mblt_model_zoo.vision import MBLT_Engine model = MBLT_Engine( model_cls="bert-kor-base", model_type="DEFAULT", model_path="", core_mode="global8", ) try: image = model.preprocess("path/to/image.jpg") output = model(image) result = model.postprocess(output) finally: model.dispose() - Notebooks
- Google Colab
- Kaggle
| try: | |
| from mblt_model_zoo.hf_transformers.models.bert.configuration_bert import ( | |
| MobilintBertConfig, | |
| ) | |
| from mblt_model_zoo.hf_transformers.models.bert.modeling_bert import ( | |
| MobilintBertForMaskedLM, | |
| ) | |
| except ImportError: | |
| raise ImportError( | |
| "This model requires 'mblt_model_zoo' to be installed. " | |
| "Please run: pip install mblt_model_zoo[transformers]" | |
| ) | |
| __all__ = ["MobilintBertConfig", "MobilintBertForMaskedLM"] |