Improve model card: Add pipeline tag, library, and usage example
#1
by nielsr HF Staff - opened
1234510 unmodified lines16171819202122232425262717 unmodified lines45464748495014 unmodified lines65666768697071---license: mit---<div align="center">10 unmodified lines### Model DescriptionInstructBioMol is a multimodal large language model that bridges natural language with biomolecules (proteins and small molecules). It achieves any-to-any alignment between natural language, molecules, and proteins through comprehensive instruction tuning.*For detailed information, please refer to our [paper](https://arxiv.org/abs/2410.07919) and [code repository](https://github.com/HICAI-ZJU/InstructBioMol).*### Released Variants| Model Name | Stage | Multimodal| Description ||------------|-----------| -------| -------|| [InstructBioMol-base](https://huggingface.co/hicai-zju/InstructBioMol-base) | Pretraining | ❎| Continual pretrained model on molecular sequences, protein sequences, and scientific literature. || [InstructBioMol-instruct-stage1](https://huggingface.co/hicai-zju/InstructBioMol-instruct-stage1) | Instruction tuning (stage 1) | ✅ | Stage1 instruction-tuned model with biomolecular multimodal processing capabilities. (e.g., 3D molecules/proteins) |17 unmodified lines**Training Objective**: Instruction tuning### Citation14 unmodified linestitle = {InstructBioMol: Advancing Biomolecule Understanding and Design FollowingHuman Instructions},journal = {CoRR},volume = {abs/2410.07919},year = {2024}}```123456710 unmodified lines1819202122232425262728293017 unmodified lines4849505152535455565758596061626364656667686970717214 unmodified lines87888990919293---license: mitpipeline_tag: any-to-anylibrary_name: transformers---<div align="center">10 unmodified lines### Model DescriptionInstructBioMol is a multimodal large language model that bridges natural language with biomolecules (proteins and small molecules). It achieves any-to-any alignment between natural language, molecules, and proteins through comprehensive instruction tuning. It can integrate multimodal biomolecules as input, enabling researchers to articulate design goals in natural language and receive biomolecular outputs that meet precise biological needs.*For detailed information, please refer to our [paper](https://arxiv.org/abs/2410.07919) and [code repository](https://github.com/HICAI-ZJU/InstructBioMol).*### Released Variants| Model Name | Stage | Multimodal| Description ||------------|-----------| -------| -------|| [InstructBioMol-base](https://huggingface.co/hicai-zju/InstructBioMol-base) | Pretraining | ❎| Continual pretrained model on molecular sequences, protein sequences, and scientific literature. || [InstructBioMol-instruct-stage1](https://huggingface.co/hicai-zju/InstructBioMol-instruct-stage1) | Instruction tuning (stage 1) | ✅ | Stage1 instruction-tuned model with biomolecular multimodal processing capabilities. (e.g., 3D molecules/proteins) |17 unmodified lines**Training Objective**: Instruction tuning### QuickstartYou can easily load and use the model with the `transformers` library.```pythonimport torchfrom transformers import AutoTokenizer, AutoModelForCausalLM# Load the tokenizer and modeltokenizer = AutoTokenizer.from_pretrained("hicai-zju/InstructBioMol-instruct", trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained("hicai-zju/InstructBioMol-instruct", trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")# Example usage for text generation with a protein sequenceinput_text = "What is the function of the protein with sequence: <PROT>MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTPAVHASLDKFLASVSTVLTSKYR<PROT>"inputs = tokenizer(input_text, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=100)print(tokenizer.decode(outputs[0], skip_special_tokens=True))```### Citation14 unmodified linestitle = {InstructBioMol: Advancing Biomolecule Understanding and Design FollowingHuman Instructions},journal = {CoRR},volume = {abs/2410-07919},year = {2024}}```
README.md+25-3