Download configuration_fourthwall.py from viitheone/4thwall-waf-v2.1b: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/viitheone/4thwall-waf-v2.1b/resolve/main/configuration_fourthwall.py
- Command line
-
hf download hf://viitheone/4thwall-waf-v2.1b/configuration_fourthwall.py
-
curl -L -o configuration_fourthwall.py https://huggingface.co/viitheone/4thwall-waf-v2.1b/resolve/main/configuration_fourthwall.py
1.3 kB
| from transformers import DistilBertConfig | |
| class FourthWallConfig(DistilBertConfig): | |
| model_type = "fourthwall_waf" | |
| def __init__( | |
| self, | |
| vocab_size=30522, | |
| max_position_embeddings=512, | |
| sinusoidal_pos_embds=False, | |
| n_layers=6, | |
| n_heads=12, | |
| dim=768, | |
| hidden_dim=3072, | |
| dropout=0.1, | |
| attention_dropout=0.1, | |
| activation="gelu", | |
| initializer_range=0.02, | |
| qa_dropout=0.1, | |
| seq_classif_dropout=0.3, | |
| num_labels=13, | |
| id2label=None, | |
| label2id=None, | |
| thresholds=None, | |
| **kwargs | |
| ): | |
| super().__init__(num_labels=num_labels, id2label=id2label, label2id=label2id, **kwargs) | |
| self.vocab_size = vocab_size | |
| self.max_position_embeddings = max_position_embeddings | |
| self.sinusoidal_pos_embds = sinusoidal_pos_embds | |
| self.n_layers = n_layers | |
| self.n_heads = n_heads | |
| self.dim = dim | |
| self.hidden_dim = hidden_dim | |
| self.dropout = dropout | |
| self.attention_dropout = attention_dropout | |
| self.activation = activation | |
| self.initializer_range = initializer_range | |
| self.qa_dropout = qa_dropout | |
| self.seq_classif_dropout = seq_classif_dropout | |
| self.thresholds = thresholds or {} | |