Instructions to use xcczach/test-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xcczach/test-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="xcczach/test-model", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("xcczach/test-model", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_test.py
Browse files- modeling_test.py +1 -1
modeling_test.py
CHANGED
|
@@ -16,7 +16,7 @@ class TestModel(PreTrainedModel):
|
|
| 16 |
AutoConfig.from_pretrained("bert-base-uncased")
|
| 17 |
)
|
| 18 |
self.model3 = AutoModelForSequenceClassification.from_config(
|
| 19 |
-
AutoConfig.from_pretrained("bert-base-uncased", num_labels=2)
|
| 20 |
)
|
| 21 |
|
| 22 |
def forward(self, tensor):
|
|
|
|
| 16 |
AutoConfig.from_pretrained("bert-base-uncased")
|
| 17 |
)
|
| 18 |
self.model3 = AutoModelForSequenceClassification.from_config(
|
| 19 |
+
AutoConfig.from_pretrained("google-bert/bert-base-uncased", num_labels=2)
|
| 20 |
)
|
| 21 |
|
| 22 |
def forward(self, tensor):
|