Text Classification
Transformers
Safetensors
English
deberta-v2
secret-detection
secrets
security
cybersecurity
devsecops
sast
code-security
code-analysis
supply-chain-security
pre-commit
ci-cd
github-actions
password-detection
api-key-detection
token-detection
credential-detection
secure-coding
deberta
deberta-v3
binary-classification
Eval Results (legacy)
text-embeddings-inference
Instructions to use hypn05/secrets-sentinel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hypn05/secrets-sentinel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hypn05/secrets-sentinel")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hypn05/secrets-sentinel") model = AutoModelForSequenceClassification.from_pretrained("hypn05/secrets-sentinel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Initial upload: DeBERTa secret detection model
Browse filesFiles changed (7)
- config.jsonAdded+35
- model.safetensorsAdded+3
- readme.mdAdded+37
- special_tokens_map.jsonAdded+15
- spm.modelAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+59
1234567891011121314151617181920212223242526272829303132333435{ "architectures": [ "DebertaV2ForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-07, "legacy": true, "max_position_embeddings": 512, "max_relative_positions": -1, "model_type": "deberta-v2", "norm_rel_ebd": "layer_norm", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 0, "pooler_dropout": 0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 768, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 256, "relative_attention": true, "share_att_key": true, "torch_dtype": "float32", "transformers_version": "4.51.3", "type_vocab_size": 0, "vocab_size": 128100}123version https://git-lfs.github.com/spec/v1oid sha256:826cdf941a064cd96ca175fba93ba778301b2740e60f6f6e5f9ea2a272b67904size 73771927212345678910111213141516171819202122232425262728293031323334353637# DeBERTa Secret Detection Model
This model detects secrets in git diff lines.
## Model Details
- Base Model: microsoft/deberta-base- Task: Binary sequence classification- Labels: - LABEL_0: Normal - LABEL_1: Secret
## Training
- Loss: Weighted cross-entropy- Metric for best model: F1- BF16 training- Gradient checkpointing enabled
## Usage
```pythonfrom transformers import pipeline
classifier = pipeline( "text-classification", model="YOUR_USERNAME/secret-detector-deberta-base")
classifier("+ password='secret123'")```
### Intended Use
Production secret detection in git diffs.
123456789101112131415{ "bos_token": "[CLS]", "cls_token": "[CLS]", "eos_token": "[SEP]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": { "content": "[UNK]", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fdsize 24646161234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "[UNK]", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "128000": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "[CLS]", "clean_up_tokenization_spaces": false, "cls_token": "[CLS]", "do_lower_case": false, "eos_token": "[SEP]", "extra_special_tokens": {}, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "pad_token": "[PAD]", "sep_token": "[SEP]", "sp_model_kwargs": {}, "split_by_punct": false, "tokenizer_class": "DebertaV2Tokenizer", "unk_token": "[UNK]", "vocab_type": "spm"}config.jsonAdded+35
model.safetensorsAdded+3
readme.mdAdded+37
special_tokens_map.jsonAdded+15
spm.modelAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+59