Downloads · 30 days
1
3% of all-time downloads
webs911/Llama-2-7b-chat-smile-finetune
Llama-2-7b-chat-smile-finetune is a machine learning model from webs911. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama2.
This is a fine-tuned version of Llama-2-7b-chat, adapted for predicting drug names based on chemical properties. Given parameters like InChI, SMILES, HBD, and logP, this model generates probable drug names.
Downloads · 30 days
1
3% of all-time downloads
All-time downloads
32
Public
Repo size
13.5 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
This is a fine-tuned version of Llama-2-7b-chat, adapted for predicting drug names based on chemical properties. Given parameters like InChI, SMILES, HBD, and logP, this model generates probable drug names.
Users should verify predictions with domain experts and use this model as a supplementary tool rather than a definitive source.
from transformers import LlamaTokenizer, LlamaForCausalLM
# Load model and tokenizer
model_name = "webs911/Llama-2-7b-chat-smile-finetune"
tokenizer = LlamaTokenizer.from_pretrained(model_name)
model = LlamaForCausalLM.from_pretrained(model_name)
def predict_drug_name(prompt):
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example usage
prompt = "Predict the drug name given the following parameters:\nInChI: ...\nSMILES: ...\nHBD: ...\nlogP: ..."
print(predict_drug_name(prompt))