Instructions to use apps1/without_distillation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apps1/without_distillation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="apps1/without_distillation", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("apps1/without_distillation", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 340 Bytes
2a12ecb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from transformers.models.bert.configuration_bert import BertConfig
class BertHashConfig(BertConfig):
"""
Extension of Bert configuration to add projections parameter.
"""
model_type = "bert_hash"
def __init__(self, projections=5, **kwargs):
super().__init__(**kwargs)
self.projections = projections
|