Update README to include transformers version requirement
Browse files- README.md +6 -0
- config.json +4 -2
README.md
CHANGED
|
@@ -121,6 +121,12 @@ model-index:
|
|
| 121 |
ModChemBERT is a ModernBERT-based chemical language model (CLM), trained on SMILES strings for masked language modeling (MLM) and downstream molecular property prediction (classification & regression).
|
| 122 |
|
| 123 |
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
### Load Model
|
| 125 |
```python
|
| 126 |
from transformers import AutoModelForMaskedLM, AutoTokenizer
|
|
|
|
| 121 |
ModChemBERT is a ModernBERT-based chemical language model (CLM), trained on SMILES strings for masked language modeling (MLM) and downstream molecular property prediction (classification & regression).
|
| 122 |
|
| 123 |
## Usage
|
| 124 |
+
Install the `transformers` library starting from v4.56.1:
|
| 125 |
+
|
| 126 |
+
```bash
|
| 127 |
+
pip install -U transformers>=4.56.1
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
### Load Model
|
| 131 |
```python
|
| 132 |
from transformers import AutoModelForMaskedLM, AutoTokenizer
|
config.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"ModChemBertForMaskedLM"
|
|
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.1,
|
| 7 |
"auto_map": {
|
| 8 |
"AutoConfig": "configuration_modchembert.ModChemBertConfig",
|
| 9 |
-
"AutoModelForMaskedLM": "modeling_modchembert.ModChemBertForMaskedLM"
|
|
|
|
| 10 |
},
|
| 11 |
"bos_token_id": 0,
|
| 12 |
"classifier_activation": "gelu",
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"ModChemBertForMaskedLM",
|
| 4 |
+
"ModChemBertForSequenceClassification"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.1,
|
| 8 |
"auto_map": {
|
| 9 |
"AutoConfig": "configuration_modchembert.ModChemBertConfig",
|
| 10 |
+
"AutoModelForMaskedLM": "modeling_modchembert.ModChemBertForMaskedLM",
|
| 11 |
+
"AutoModelForSequenceClassification": "modeling_modchembert.ModChemBertForSequenceClassification"
|
| 12 |
},
|
| 13 |
"bos_token_id": 0,
|
| 14 |
"classifier_activation": "gelu",
|