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
Victor Shirasuna commited on
Commit ·
8c39e88
1
Parent(s): 6f04789
Fix typo
Browse files
smi-ted/finetune/smi_ted_large/load.py
CHANGED
|
@@ -377,7 +377,7 @@ class Smi_ted(nn.Module):
|
|
| 377 |
self.decoder = MoLDecoder(self.n_vocab, self.config['max_len'], self.config['n_embd'])
|
| 378 |
self.net = Net(self.config['n_embd'], n_output=self.config['n_output'], dropout=self.config['dropout'])
|
| 379 |
|
| 380 |
-
def load_checkpoint(self, ckpt_path,
|
| 381 |
# load checkpoint file
|
| 382 |
checkpoint = torch.load(ckpt_path, map_location=torch.device('cpu'))
|
| 383 |
|
|
|
|
| 377 |
self.decoder = MoLDecoder(self.n_vocab, self.config['max_len'], self.config['n_embd'])
|
| 378 |
self.net = Net(self.config['n_embd'], n_output=self.config['n_output'], dropout=self.config['dropout'])
|
| 379 |
|
| 380 |
+
def load_checkpoint(self, ckpt_path, n_output, eval=False):
|
| 381 |
# load checkpoint file
|
| 382 |
checkpoint = torch.load(ckpt_path, map_location=torch.device('cpu'))
|
| 383 |
|