configuration_utils¶
multimolecule.models.configuration_utils
¶
HeadConfig
¶
Bases: BaseHeadConfig
Configuration class for a prediction head.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
Number of labels to use in the last layer added to the model, typically for a classification task. Head should look for |
必需 | |
|
Problem type for Head should look for |
必需 | |
|
Dimensionality of the encoder layers and the pooler layer. Head should look for |
必需 | |
|
The dropout ratio for the hidden states. |
必需 | |
|
The transform operation applied to hidden states. |
必需 | |
|
The activation function of transform applied to hidden states. |
必需 | |
|
Whether to apply bias to the final prediction layer. |
必需 | |
|
The activation function of the final prediction output. |
必需 | |
|
The epsilon used by the layer normalization layers. |
必需 | |
|
The name of the tensor required in model outputs. If is |
必需 | |
|
The type of the head in the model. This is used by |
必需 | |
|
The weight to scale the loss. If is |
必需 |
源代码位于: multimolecule/modules/heads/config.py
MaskedLMHeadConfig
¶
Bases: BaseHeadConfig
Configuration class for a Masked Language Modeling head.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
Dimensionality of the encoder layers and the pooler layer. Head should look for |
必需 | |
|
The dropout ratio for the hidden states. |
必需 | |
|
The transform operation applied to hidden states. |
必需 | |
|
The activation function of transform applied to hidden states. |
必需 | |
|
Whether to apply bias to the final prediction layer. |
必需 | |
|
The activation function of the final prediction output. |
必需 | |
|
The epsilon used by the layer normalization layers. |
必需 | |
|
The name of the tensor required in model outputs. If is |
必需 | |
|
The weight to scale the loss. If is |
必需 |
源代码位于: multimolecule/modules/heads/config.py
PreTrainedConfig
¶
Bases: PretrainedConfig
Base class for all model configuration classes.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
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
|
源代码位于: multimolecule/models/configuration_utils.py
validate_attention_dimensions
¶
Validate the standard transformer hidden-size/head-count relationship.