Release evaluated iMut-CDR-JM
Browse filesFiles changed (8)
- iMut-CDR-JM/README.mdAdded+87
- iMut-CDR-JM/esm2_config_and_tokenizer/config.jsonAdded+29
- iMut-CDR-JM/esm2_config_and_tokenizer/special_tokens_map.jsonAdded+7
- iMut-CDR-JM/esm2_config_and_tokenizer/tokenizer_config.jsonAdded+4
- iMut-CDR-JM/esm2_config_and_tokenizer/vocab.txtAdded+33
- iMut-CDR-JM/model.ptAdded+3
- iMut-CDR-JM/release_manifest.jsonAdded+49
- iMut-CDR-JM/third_party/ESM_LICENSEAdded+19
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687---language: enlibrary_name: pytorchbase_model: facebook/esm2_t33_650M_UR50Dtags: - antibody - protein - masked-language-model - imut-cdr-gc---
# iMut-CDR-JM
iMut-CDR-JM jointly predicts requested CDR residues in an existing antibody.It combines an ESM2 backbone with the recurrent sequence model used in[iMut-CDR-GC](https://github.com/linbuliao/iMut-CDR-GC). This folder containsthe evaluated sequence-only JM model, without antigen conditioning.
## Released model
`model.pt` is the original JM v1 baseline used in the sequence-recoverybenchmark, not a continuation-training pilot and not the separateSAbDab-fine-tuned likelihood model. It contains the complete fine-tuned encoderand model parameters; a second download of base ESM2 weights is unnecessary.
- Weight size: 2,846,534,365 bytes.- SHA256: `5aba9f96982f9ef34724ad6d29eea8c1248191c4ac6d68b461d318df04d9d2c4`.- Format: PyTorch plain tensor state dictionary, 624 keys.- Tokenizer/configuration: `esm2_config_and_tokenizer/`.- File identities and code revision: `release_manifest.json`.
## Download and load
```bashpip install "imut-cdr-gc[generation] @ git+https://github.com/linbuliao/iMut-CDR-GC@23dc11908d6e09b6e40feca2da4c503e9228d5c8" huggingface_hub```
```pythonimport jsonfrom pathlib import Pathfrom huggingface_hub import snapshot_downloadfrom imut_cdr_gc.models.loading import load_local_model
repository = Path(snapshot_download( "linbuliao/iMut-CDR-GC", local_dir="assets/imut_cdr_gc", allow_patterns=["iMut-CDR-JM/*"],))directory = repository / "iMut-CDR-JM"manifest = json.loads((directory / "release_manifest.json").read_text())hashes = {entry["path"]: entry["sha256"] for entry in manifest["files"]}prefix = "esm2_config_and_tokenizer/"model, identity = load_local_model( model_kind="jm", device="cpu", model_dir=directory / "esm2_config_and_tokenizer", checkpoint=directory / "model.pt", expected_checkpoint_sha256=hashes["model.pt"], asset_sha256={name.removeprefix(prefix): value for name, value in hashes.items() if name.startswith(prefix)},)```
For sequence proposals, use the documented[`imut-cdr-gc generate --model jm` entrypoint](https://github.com/linbuliao/iMut-CDR-GC/blob/main/docs/generation.md).Inputs use the fixed 277-position framework/CDR representation. Generationaccepts up to ten eligible requested positions per proposal; predicted residuesmay retain the parental amino acid. Reconstruction into complete H/L sequencesand screening are separate workflow steps. This custom model is not loadedthrough Transformers `AutoModel.from_pretrained`.
## Validation and use
All 624 keys passed strict loading with the released implementation. A singleCPU comparison against the native model gave identical sequence logits andsequence embeddings. That check used Torch 2.6.0 and Transformers 4.46.3; itdoes not establish equivalence for arbitrary runtime versions or GPU precision.
Residue probabilities describe this sequence model. They are not measuredbinding affinities or experimental evidence for the activity of proposedantibodies. Use independently designed evaluations for new applications.
## Attribution
Code: [iMut-CDR-GC](https://github.com/linbuliao/iMut-CDR-GC) and[iMut-CDR](https://github.com/linbuliao/iMut-CDR).Backbone: [ESM2-650M](https://huggingface.co/facebook/esm2_t33_650M_UR50D).The original ESM license is retained in `third_party/ESM_LICENSE` and appliesto that component; it does not assign a new license to all project material.1234567891011121314151617181920212223242526272829{ "architectures": [ "EsmForMaskedLM" ], "attention_probs_dropout_prob": 0.0, "classifier_dropout": null, "emb_layer_norm_before": false, "esmfold_config": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.0, "hidden_size": 1280, "initializer_range": 0.02, "intermediate_size": 5120, "is_folding_model": false, "layer_norm_eps": 1e-05, "mask_token_id": 32, "max_position_embeddings": 1026, "model_type": "esm", "num_attention_heads": 20, "num_hidden_layers": 33, "pad_token_id": 1, "position_embedding_type": "rotary", "token_dropout": true, "torch_dtype": "float32", "transformers_version": "4.25.0.dev0", "use_cache": true, "vocab_list": null, "vocab_size": 33}1234567{ "cls_token": "<cls>", "eos_token": "<eos>", "mask_token": "<mask>", "pad_token": "<pad>", "unk_token": "<unk>"}1234{ "model_max_length": 1000000000000000019884624838656, "tokenizer_class": "EsmTokenizer"}123456789101112131415161718192021222324252627282930313233<cls><pad><eos><unk>LAGVSERTIDPKQNFYMHWCXBUZO.-<null_1><mask>123version https://git-lfs.github.com/spec/v1oid sha256:5aba9f96982f9ef34724ad6d29eea8c1248191c4ac6d68b461d318df04d9d2c4size 284653436512345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{ "schema": "imut-cdr-gc.model-release.v2", "model": "iMut-CDR-JM", "repository": "linbuliao/iMut-CDR-GC", "model_subdirectory": "iMut-CDR-JM", "source_code": { "repository": "https://github.com/linbuliao/iMut-CDR-GC", "revision": "23dc11908d6e09b6e40feca2da4c503e9228d5c8" }, "serialization": "PyTorch plain tensor state_dict; load with weights_only=True", "file_paths_relative_to": "this model subdirectory", "files": [ { "path": "model.pt", "sha256": "5aba9f96982f9ef34724ad6d29eea8c1248191c4ac6d68b461d318df04d9d2c4", "bytes": 2846534365 }, { "path": "esm2_config_and_tokenizer/config.json", "sha256": "539095c22efc52a09d6147074ba4ca119f76a890df5901213b2b55f7d2f96b2b", "bytes": 724 }, { "path": "esm2_config_and_tokenizer/vocab.txt", "sha256": "0b82cc0a7c7cf9e567b1e5892d793285b9fbae822c964ca48696f7db44598e03", "bytes": 93 }, { "path": "esm2_config_and_tokenizer/special_tokens_map.json", "sha256": "3aedcd4211c0d43aec4e607ff60a63255f3174ead795e997350f09a5f8cd9ee1", "bytes": 125 }, { "path": "esm2_config_and_tokenizer/tokenizer_config.json", "sha256": "7e9161ecdb548ec45a41cbc6b24aa4476fdd418461f491c4207baa99419a29ad", "bytes": 95 }, { "path": "third_party/ESM_LICENSE", "sha256": "a0bc85b100f4632ad2f1af5720d9a5cc1fe1a98eafaa122c26cada4a7d3ef034", "bytes": 1086 }, { "path": "README.md", "sha256": "90c5150c99d4f1434191e34cfb7b49f1e4b45a10b131f50f68c3c219fddaa42f", "bytes": 3561 } ]}12345678910111213141516171819MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.iMut-CDR-JM/README.mdAdded+87
iMut-CDR-JM/esm2_config_and_tokenizer/config.jsonAdded+29
iMut-CDR-JM/esm2_config_and_tokenizer/special_tokens_map.jsonAdded+7
iMut-CDR-JM/esm2_config_and_tokenizer/tokenizer_config.jsonAdded+4
iMut-CDR-JM/esm2_config_and_tokenizer/vocab.txtAdded+33
iMut-CDR-JM/model.ptAdded+3
iMut-CDR-JM/release_manifest.jsonAdded+49
iMut-CDR-JM/third_party/ESM_LICENSEAdded+19