Instructions to use eyalmazuz/multi-task-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eyalmazuz/multi-task-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="eyalmazuz/multi-task-bert", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("eyalmazuz/multi-task-bert", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("eyalmazuz/multi-task-bert", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 235 Bytes
7575c08 | 1 2 3 4 5 6 7 8 9 10 | from transformers import BertConfig
class BertMultiTaskConfig(BertConfig):
model_type = "bert"
def __init__(self, tasks: dict[str, int] | None = None, **kwargs):
self.tasks = tasks
super().__init__(**kwargs)
|