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
Upload BertForStance
Browse files- bert_for_stance.py +1 -2
- config.json +1 -1
- model.safetensors +1 -1
bert_for_stance.py
CHANGED
|
@@ -67,5 +67,4 @@ class BertForStance(BertPreTrainedModel):
|
|
| 67 |
loss = self.loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
|
| 68 |
return BertForStance.Output(loss=loss, logits=logits, seq_encoding=feature_vec)
|
| 69 |
|
| 70 |
-
BertForStance.register_for_auto_class("AutoModel")
|
| 71 |
-
BertForStance.register_for_auto_class("AutoModelForSequenceClassification")
|
|
|
|
| 67 |
loss = self.loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
|
| 68 |
return BertForStance.Output(loss=loss, logits=logits, seq_encoding=feature_vec)
|
| 69 |
|
| 70 |
+
BertForStance.register_for_auto_class("AutoModel")
|
|
|
config.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"auto_map": {
|
| 8 |
"AutoConfig": "configuration_bert_for_stance.BertForStanceConfig",
|
| 9 |
-
"
|
| 10 |
},
|
| 11 |
"classifier_dropout": null,
|
| 12 |
"classifier_hidden_units": 768,
|
|
|
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"auto_map": {
|
| 8 |
"AutoConfig": "configuration_bert_for_stance.BertForStanceConfig",
|
| 9 |
+
"AutoModel": "bert_for_stance.BertForStance"
|
| 10 |
},
|
| 11 |
"classifier_dropout": null,
|
| 12 |
"classifier_hidden_units": 768,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 440321200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e277cca4863d4e499f2ca7522e6c0f25b87d50c6e53fa3ccacb3458ae26ed40
|
| 3 |
size 440321200
|