Instructions to use nomic-ai/nomic-bert-2048 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nomic-ai/nomic-bert-2048 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="nomic-ai/nomic-bert-2048", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("nomic-ai/nomic-bert-2048", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("nomic-ai/nomic-bert-2048", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_hf_nomic_bert.py
Browse files
modeling_hf_nomic_bert.py
CHANGED
|
@@ -1622,7 +1622,7 @@ class NomicBertBlock(NomicBertPreTrainedModel):
|
|
| 1622 |
moe_normalize_expert_weights=config.moe_normalize_expert_weights,
|
| 1623 |
activation_fn=activation,
|
| 1624 |
mlp_type="glu" if config.activation_function == "swiglu" else "mlp",
|
| 1625 |
-
fp16=
|
| 1626 |
bf16=False,
|
| 1627 |
return_bias=False,
|
| 1628 |
)
|
|
|
|
| 1622 |
moe_normalize_expert_weights=config.moe_normalize_expert_weights,
|
| 1623 |
activation_fn=activation,
|
| 1624 |
mlp_type="glu" if config.activation_function == "swiglu" else "mlp",
|
| 1625 |
+
fp16=False,
|
| 1626 |
bf16=False,
|
| 1627 |
return_bias=False,
|
| 1628 |
)
|