configuration_utils¶
multimolecule.models.configuration_utils
¶
HeadConfig
¶
Bases: BaseHeadConfig
Configuration class for a prediction head.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Number of labels to use in the last layer added to the model, typically for a classification task. Head should look for |
required | |
|
Problem type for Head should look for |
required | |
|
Dimensionality of the encoder layers and the pooler layer. Head should look for |
required | |
|
The dropout ratio for the hidden states. |
required | |
|
The transform operation applied to hidden states. |
required | |
|
The activation function of transform applied to hidden states. |
required | |
|
Whether to apply bias to the final prediction layer. |
required | |
|
The activation function of the final prediction output. |
required | |
|
The epsilon used by the layer normalization layers. |
required | |
|
The name of the tensor required in model outputs. If is |
required | |
|
The type of the head in the model. This is used by [ |
required |
Source code in multimolecule/modules/heads/config.py
MaskedLMHeadConfig
¶
Bases: BaseHeadConfig
Configuration class for a Masked Language Modeling head.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Dimensionality of the encoder layers and the pooler layer. Head should look for |
required | |
|
The dropout ratio for the hidden states. |
required | |
|
The transform operation applied to hidden states. |
required | |
|
The activation function of transform applied to hidden states. |
required | |
|
Whether to apply bias to the final prediction layer. |
required | |
|
The activation function of the final prediction output. |
required | |
|
The epsilon used by the layer normalization layers. |
required | |
|
The name of the tensor required in model outputs. If is |
required |
Source code in multimolecule/modules/heads/config.py
PreTrainedConfig
¶
Bases: PretrainedConfig
Base class for all model configuration classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
The ID of the padding token. |
0
|
|
int
|
The ID of the beginning-of-sequence token. |
1
|
|
int
|
The ID of the end-of-sequence token. |
2
|
|
int
|
The ID of the unknown token. |
3
|
|
int
|
The ID of the mask token. |
4
|
|
int
|
The ID of the null or placeholder token. |
5
|
|
int
|
Default number of labels for prediction heads. |
1
|