Views
No views yet
⚠️ 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.
molcrawl-molecule-nat-lang-gpt2-xl pre-trained model.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained("kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-xl")
5tokenizer = AutoTokenizer.from_pretrained("kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-xl")
6
7# Generate molecule-related text
8prompt = "The compound with SMILES CC(=O)Oc1ccccc1C(=O)O represents aspirin, which"
9inputs = tokenizer(prompt, return_tensors="pt")
10with torch.no_grad():
11 output_ids = model.generate(
12 **inputs,
13 max_new_tokens=100,
14 do_sample=True,
15 temperature=0.8,
16 eos_token_id=None, # HF config.json has legacy eos_token_id=0; disable early stop
17 pad_token_id=0,
18 )
19print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
201@misc{molcrawl_molecule_nat_lang_mol_instructions_gpt2_xl,
2 title={molcrawl-molecule-nat-lang-mol-instructions-gpt2-xl},
3 author={{RIKEN}},
4 year={2026},
5 publisher={{Hugging Face}},
6 url={{https://huggingface.co/kojima-lab/molcrawl-molecule-nat-lang-mol-instructions-gpt2-xl}}
7}