Downloads · 30 days
24
1% of all-time downloads
kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium
molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium is a text generation model from kojima-lab. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
⚠️ Generation quality caveat: this fine-tune was trained on the Mol-Instructions corpus. Inspection of generations shows the model emits high-frequency noise tokens (e.g. surging, wake, oker, Ti424, 1960, ...) regardl…
Downloads · 30 days
24
1% of all-time downloads
All-time downloads
4.6K
Public
Parameters
406M
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.6 GB · 100%
From the Hugging Face model README
⚠️ Generation quality caveat: this fine-tune was trained on the Mol-Instructions corpus. Inspection of generations shows the model emits high-frequency noise tokens (e.g.
surging,wake,oker,Ti#424,1960, ...) regardless of prompt, suggesting noisy / unfiltered fine-tuning data. Free-form generation is not recommended for production use; treat this checkpoint as an encoder for downstream classification/regression heads or rerun the fine-tune with cleaned data.
GPT-2 medium (345M parameters) fine-tuned on molecule-oriented instruction data from Mol-Instructions, starting from the molcrawl-molecule-nat-lang-gpt2-medium pre-trained model.
Mol-Instructions: https://huggingface.co/datasets/zjunlp/Mol-Instructions (Fine-tuning dataset)
Model Type: gpt2
Data Type: Molecule-NL
Training Date: 2026-04-24
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium")
tokenizer = AutoTokenizer.from_pretrained("kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium")
# Generate molecule-related text
prompt = "The compound with SMILES CC(=O)Oc1ccccc1C(=O)O represents aspirin, which"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
output_ids = model.generate(
**inputs,
max_new_tokens=100,
do_sample=True,
temperature=0.8,
eos_token_id=None, # HF config.json has legacy eos_token_id=0; disable early stop
pad_token_id=0,
)
print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
Training pipeline, configuration files, and data preparation scripts are available in the MolCrawl GitHub repository: https://github.com/mmai-framework-lab/MolCrawl
This model is released under the APACHE-2.0 license.
If you use this model, please cite:
@misc{molcrawl_molecule_nat_lang_mol_instructions_gpt2_medium,
title={molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium},
author={{RIKEN}},
year={2026},
publisher={{Hugging Face}},
url={{https://huggingface.co/kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-medium}}
}