Instructions to use nvidia/E-RADIO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/E-RADIO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="nvidia/E-RADIO", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/E-RADIO", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse files- hf_model.py +0 -2
hf_model.py
CHANGED
|
@@ -129,8 +129,6 @@ class ERADIOModel(PreTrainedModel):
|
|
| 129 |
|
| 130 |
if isinstance(y, tuple):
|
| 131 |
summary, features = y
|
| 132 |
-
# ERADIO features are spatial tokens.
|
| 133 |
-
features = rearrange(features, 'b c h w -> b (h w) c')
|
| 134 |
else:
|
| 135 |
summary = y
|
| 136 |
features = None
|
|
|
|
| 129 |
|
| 130 |
if isinstance(y, tuple):
|
| 131 |
summary, features = y
|
|
|
|
|
|
|
| 132 |
else:
|
| 133 |
summary = y
|
| 134 |
features = None
|