Instructions to use UF-NLPC-Lab/test_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UF-NLPC-Lab/test_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="UF-NLPC-Lab/test_model", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("UF-NLPC-Lab/test_model", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| from transformers.models.bert.configuration_bert import BertConfig | |
| from typing import Optional | |
| class BertForStanceConfig(BertConfig): | |
| model_type = "bert_for_stance" | |
| def __init__(self, | |
| *, | |
| classifier_hidden_units: Optional[int] = None, | |
| **base_kwargs): | |
| super().__init__(**base_kwargs) | |
| self.problem_type = "single_label_classification" | |
| self.add_pooling_layer = False | |
| self.return_dict = True | |
| self.classifier_hidden_units = classifier_hidden_units if classifier_hidden_units else self.hidden_size | |
| BertForStanceConfig.register_for_auto_class("AutoConfig") |