Skip to content

Commit

Permalink
Fix example in EsmConfig docstring (#34653)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanx749 authored Nov 13, 2024
1 parent e7c36a9 commit 68f8186
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/transformers/models/esm/configuration_esm.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ class EsmConfig(PretrainedConfig):
```python
>>> from transformers import EsmModel, EsmConfig
>>> # Initializing a ESM facebook/esm-1b style configuration >>> configuration = EsmConfig()
>>> # Initializing a ESM facebook/esm-1b style configuration
>>> configuration = EsmConfig(vocab_size=33)
>>> # Initializing a model from the configuration >>> model = ESMModel(configuration)
>>> # Initializing a model from the configuration
>>> model = EsmModel(configuration)
>>> # Accessing the model configuration >>> configuration = model.config
>>> # Accessing the model configuration
>>> configuration = model.config
```"""

model_type = "esm"
Expand Down

0 comments on commit 68f8186

Please sign in to comment.