Instructions to use mryufei/llm4mat-sft-dudez with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mryufei/llm4mat-sft-dudez with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mryufei/llm4mat-sft-dudez", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from mryufei/llm4mat-sft-dudez: direct link, hf CLI and curl.
- Browser
- Download file 1.4 kB
-
https://huggingface.co/mryufei/llm4mat-sft-dudez/resolve/main/README.md
- Command line
-
hf download hf://mryufei/llm4mat-sft-dudez/README.md
-
curl -L -o README.md https://huggingface.co/mryufei/llm4mat-sft-dudez/resolve/main/README.md
1.4 kB
metadata
library_name: transformers
tags:
- llm4mat
- sft
- moleculenet
base_model: LLM-Research/Llama-3.2-1B-Instruct
DUDEZ SFT Artifacts
This repository contains supervised fine-tuning artifacts generated from the llm4mat benchmark workflow.
Included Artifacts
- merged model:
merged
Prompt Template
Template used to build QA prompts for this dataset:
Instructions:
Predict whether the molecule with SMILES {smiles} can bind to the target protein '{target}' (1 = active, 0 = inactive).
Prediction (0/1):
Inference (Transformers)
Load merged model
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "mryufei/llm4mat-sft-dudez"
subfolder = "merged"
tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder=subfolder)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
subfolder=subfolder,
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "Question: Is this molecule active?\nAnswer:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128, temperature=0.1)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Notes
- Training/evaluation scripts are from this project workflow.
- Recommended prompt format: follow the benchmark prompt template used for this dataset.