Model reference · open weights
materials.selfies-ted is an open-weight embedding model from ibm-research. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | IBM |
|---|---|
| Published under | ibm-research |
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 358M |
| Context | 1k tokens |
| Runs with | transformers |
| Released | 2024-10-25 |
| Popularity | 3k downloads / month |
| Licence | Open weights |
About
selfies-ted is an transformer based encoder decoder model for molecular representations using SELFIES.
from transformers import AutoTokenizer, AutoModel
import selfies as sf
import torch
tokenizer = AutoTokenizer.from_pretrained("ibm/materials.selfies-ted")
model = AutoModel.from_pretrained("ibm/materials.selfies-ted")
smiles = "c1ccccc1"
selfies = sf.encoder(smiles)
selfies = selfies.replace("][", "] [")
token = tokenizer(selfies, return_tensors='pt', max_length=128, truncation=True, padding='max_length')
input_ids = token['input_ids']
attention_mask = token['attention_mask']
outputs = model.encoder(input_ids=input_ids, attention_mask=attention_mask)
model_output = outputs.last_hidden_state
input_mask_expanded = attention_mask.unsqueeze(-1).expand(model_output.size()).float()
sum_embeddings = torch.sum(model_output * input_mask_expanded, 1)
sum_mask = torch.clamp(input_mask_expanded.sum(1), min=1e-9)
model_output = sum_embeddings / sum_mask
For more information contact indra.ipd@ibm.com
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys materials-selfies-ted for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (materials-selfies-ted below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"materials-selfies-ted","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.