NewBertModel.ConfigΒΆ
Component: NewBertModel
-
class
NewBertModel.
Config
[source] Bases:
BaseModel.Config
All Attributes (including base classes)
- inputs: BertModelInput = BertModelInput()
- encoder: TransformerSentenceEncoderBase.Config = HuggingFaceBertSentenceEncoder.Config()
- decoder: MLPDecoder.Config = MLPDecoder.Config()
- output_layer: ClassificationOutputLayer.Config = ClassificationOutputLayer.Config()
- Subclasses
NewBertRegressionModel.Config
BertSquadQAModel.Config
RoBERTa.Config
Default JSON
{
"inputs": {
"tokens": {
"BERTTensorizer": {
"is_input": true,
"columns": [
"text"
],
"tokenizer": {
"WordPieceTokenizer": {
"basic_tokenizer": {
"split_regex": "\\s+",
"lowercase": true
},
"wordpiece_vocab_path": "/mnt/vol/nlp_technologies/bert/uncased_L-12_H-768_A-12/vocab.txt"
}
},
"base_tokenizer": null,
"vocab_file": "/mnt/vol/nlp_technologies/bert/uncased_L-12_H-768_A-12/vocab.txt",
"max_seq_len": 128
}
},
"dense": null,
"labels": {
"LabelTensorizer": {
"is_input": false,
"column": "label",
"allow_unknown": false,
"pad_in_vocab": false,
"label_vocab": null
}
},
"num_tokens": {
"is_input": false,
"names": [
"tokens"
],
"indexes": [
2
]
}
},
"encoder": {
"HuggingFaceBertSentenceEncoder": {
"load_path": null,
"save_path": null,
"freeze": false,
"shared_module_key": null,
"output_dropout": 0.4,
"embedding_dim": 768,
"pooling": "cls_token",
"export": false,
"bert_cpt_dir": "/mnt/vol/nlp_technologies/bert/uncased_L-12_H-768_A-12/",
"load_weights": true
}
},
"decoder": {
"load_path": null,
"save_path": null,
"freeze": false,
"shared_module_key": null,
"hidden_dims": [],
"out_dim": null,
"layer_norm": false,
"dropout": 0.0,
"activation": "relu"
},
"output_layer": {
"load_path": null,
"save_path": null,
"freeze": false,
"shared_module_key": null,
"loss": {
"CrossEntropyLoss": {}
},
"label_weights": null
}
}