|
from transformers import PretrainedConfig |
|
from typing import List |
|
|
|
class OffensivenessEstimationConfig(PretrainedConfig): |
|
model_type = "offensiveness_estimation" |
|
|
|
def __init__( |
|
self, |
|
language_model: str = 'studio-ousia/luke-japanese-base-lite', |
|
output_class_num: int = 11, |
|
reinit_n_layers: int = 1, |
|
dropout_rate: float = 0.1, |
|
**kwargs, |
|
): |
|
|
|
|
|
|
|
|
|
|
|
self.language_model = language_model |
|
self.output_class_num = output_class_num |
|
self.reinit_n_layers = reinit_n_layers |
|
self.dropout_rate = dropout_rate |
|
super().__init__(**kwargs) |