Feature Extraction
Transformers
PyTorch
Safetensors
Diffusers
SMI-TED
chemistry
foundation models
AI4Science
materials
molecules
transformer
Instructions to use ibm-research/materials.smi-ted with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ibm-research/materials.smi-ted with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ibm-research/materials.smi-ted")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ibm-research/materials.smi-ted", device_map="auto") - Diffusers
How to use ibm-research/materials.smi-ted with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ibm-research/materials.smi-ted", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -136,6 +136,14 @@ model = load_smi_ted(
|
|
| 136 |
ckpt_filename='smi_ted_light.pt'
|
| 137 |
)
|
| 138 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
To encode SMILES into embeddings, you can use:
|
| 141 |
|
|
|
|
| 136 |
ckpt_filename='smi_ted_light.pt'
|
| 137 |
)
|
| 138 |
```
|
| 139 |
+
or
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
with open('model_weights.bin', 'rb') as f:
|
| 143 |
+
state_dict = torch.load(f)
|
| 144 |
+
model.load_state_dict(state_dict)
|
| 145 |
+
)
|
| 146 |
+
```
|
| 147 |
|
| 148 |
To encode SMILES into embeddings, you can use:
|
| 149 |
|