Instructions to use magicslabnu/Clip_OutEffHop_bert_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use magicslabnu/Clip_OutEffHop_bert_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="magicslabnu/Clip_OutEffHop_bert_base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("magicslabnu/Clip_OutEffHop_bert_base", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("magicslabnu/Clip_OutEffHop_bert_base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_bert.py
Browse files- modeling_bert.py +1 -1
modeling_bert.py
CHANGED
|
@@ -286,7 +286,7 @@ class BertSelfAttention(nn.Module):
|
|
| 286 |
self,
|
| 287 |
config,
|
| 288 |
position_embedding_type=None,
|
| 289 |
-
softmax_fn=partial(
|
| 290 |
max_seq_length = 128,
|
| 291 |
alpha=None,
|
| 292 |
ssm_eps=None,
|
|
|
|
| 286 |
self,
|
| 287 |
config,
|
| 288 |
position_embedding_type=None,
|
| 289 |
+
softmax_fn=partial(clipped_softmax1, gamma=-0.025, eta=1.0),
|
| 290 |
max_seq_length = 128,
|
| 291 |
alpha=None,
|
| 292 |
ssm_eps=None,
|