Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.a59fb72
-
Update README.md
Verified signaturefd8d4e5 -
Update README.md
Verified signature4c82e5c
-
Upload 2 files
Verified signature36b782b -
Update config.json
Verified signature340ecc9
-
Create README.md
Verified signature``` import torch import torch.nn as nn import torch.nn.functional as F import json from huggingface_hub import hf_hub_download from transformers import AutoTokenizer, AutoModel, AutoConfig class SecureBERTFlatClassifier(nn.Module): def __init__(self, model_name, class_counts): super().__init__() config = AutoConfig.from_pretrained(model_name) if hasattr(config, "reference_compile"): config.reference_compile = False self.bert = AutoModel.from_pretrained(model_name, config=config) def make_head(out_features, is_cvss=False): layers = [ nn.LayerNorm(768), nn.Dropout(0.1), nn.Linear(768, 768), nn.GELU(), nn.Dropout(0.1), nn.Linear(768, 768), nn.GELU(), nn.Dropout(0.1), nn.Linear(768, out_features) ] if is_cvss: layers.append(nn.Softmax(dim=1)) return nn.Sequential(*layers) self.cvss_heads = nn.ModuleDict({k: make_head…46750c9 -
Upload folder using huggingface_hub
Verified signaturebf95324 -
initial commit
Verified signature1f1d065