Instructions to use magicslabnu/OutEffHop_bert_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use magicslabnu/OutEffHop_bert_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="magicslabnu/OutEffHop_bert_base", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("magicslabnu/OutEffHop_bert_base", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("magicslabnu/OutEffHop_bert_base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_bert.py
Browse files- modeling_bert.py +1 -2
modeling_bert.py
CHANGED
|
@@ -175,8 +175,7 @@ def load_tf_weights_in_bert(model, config, tf_checkpoint_path):
|
|
| 175 |
array = np.transpose(array)
|
| 176 |
try:
|
| 177 |
if pointer.shape != array.shape:
|
| 178 |
-
raise ValueError(f"Pointer shape {pointer.shape} and array shape {
|
| 179 |
-
array.shape} mismatched")
|
| 180 |
except ValueError as e:
|
| 181 |
e.args += (pointer.shape, array.shape)
|
| 182 |
raise
|
|
|
|
| 175 |
array = np.transpose(array)
|
| 176 |
try:
|
| 177 |
if pointer.shape != array.shape:
|
| 178 |
+
raise ValueError(f"Pointer shape {pointer.shape} and array shape {array.shape} mismatched")
|
|
|
|
| 179 |
except ValueError as e:
|
| 180 |
e.args += (pointer.shape, array.shape)
|
| 181 |
raise
|