hemantn commited on
Commit
e1df3c0
Β·
1 Parent(s): d873a76

adapter description updated

Browse files
Files changed (1) hide show
  1. README.md +12 -2
README.md CHANGED
@@ -44,7 +44,7 @@ Install the required dependencies:
44
  pip install transformers torch numpy pandas anarci
45
  ```
46
 
47
- ## πŸš€ Loading Models from Hugging Face Hub
48
 
49
  ### Method 1: Load Model and Tokenizer, then Import Adapter
50
  ```python
@@ -87,10 +87,12 @@ spec.loader.exec_module(adapter_module)
87
  ablang = adapter_module.AbLang2PairedHuggingFaceAdapter(model=model, tokenizer=tokenizer)
88
  ```
89
 
90
- **Note**: Models automatically use GPU when available, otherwise fall back to CPU.
91
 
92
  ## βš™οΈ Available Utilities
93
 
 
 
94
  - **seqcoding**: Sequence-level representations (averaged across residues)
95
  - **rescoding**: Residue-level representations (per-residue embeddings)
96
  - **likelihood**: Raw logits for amino acid prediction at each position
@@ -99,6 +101,14 @@ ablang = adapter_module.AbLang2PairedHuggingFaceAdapter(model=model, tokenizer=t
99
  - **confidence**: Fast uncertainty scoring (single forward pass, no masking)
100
  - **restore**: Restore masked residues (*) with predicted amino acids
101
 
 
 
 
 
 
 
 
 
102
  ## πŸ’‘ Examples
103
 
104
  ### πŸ”— AbLang2 (Paired Sequences) - Restore Example
 
44
  pip install transformers torch numpy pandas anarci
45
  ```
46
 
47
+ ## πŸš€ Loading Model from Hugging Face Hub
48
 
49
  ### Method 1: Load Model and Tokenizer, then Import Adapter
50
  ```python
 
87
  ablang = adapter_module.AbLang2PairedHuggingFaceAdapter(model=model, tokenizer=tokenizer)
88
  ```
89
 
90
+ **Note**: Model automatically use GPU when available, otherwise fall back to CPU.
91
 
92
  ## βš™οΈ Available Utilities
93
 
94
+ This wrapper translates between HuggingFace's model format and AbLang2's expected input/output structure, making it easy to use AbLang2's powerful antibody analysis tools with model loaded from HuggingFace.
95
+
96
  - **seqcoding**: Sequence-level representations (averaged across residues)
97
  - **rescoding**: Residue-level representations (per-residue embeddings)
98
  - **likelihood**: Raw logits for amino acid prediction at each position
 
101
  - **confidence**: Fast uncertainty scoring (single forward pass, no masking)
102
  - **restore**: Restore masked residues (*) with predicted amino acids
103
 
104
+ All these utilities work seamlessly with the HuggingFace-loaded model, maintaining the same API as the original AbLang2 implementation.
105
+
106
+ The `AbLang2PairedHuggingFaceAdapter` class is a wrapper that lets you use AbLang2 model utilities after loading the model from HuggingFace. This class enables you to:
107
+
108
+ - **Access all AbLang2 utilities** (seqcoding, rescoding, likelihood, probability, etc.) with the same interface as the original implementation
109
+ - **Work with antibody sequences** (heavy and light chains) seamlessly
110
+ - **Maintain compatibility** with the original AbLang2 API while leveraging HuggingFace's model loading and caching capabilities
111
+
112
  ## πŸ’‘ Examples
113
 
114
  ### πŸ”— AbLang2 (Paired Sequences) - Restore Example