Instructions to use apps1/hash_nano_complete_student_model_updated_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apps1/hash_nano_complete_student_model_updated_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="apps1/hash_nano_complete_student_model_updated_v2", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("apps1/hash_nano_complete_student_model_updated_v2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| 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 | |