yasirdemircan commited on
Commit
d3a17d0
·
verified ·
1 Parent(s): 92e511e

Add SetFit model

Browse files
Files changed (3) hide show
  1. README.md +31 -36
  2. model.safetensors +1 -1
  3. model_head.pkl +1 -1
README.md CHANGED
@@ -10,23 +10,18 @@ tags:
10
  - text-classification
11
  - generated_from_setfit_trainer
12
  widget:
13
- - text: The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator)
14
- key is generated and stored as a 128-bit value through an entropy source meeting
15
- the security strength needed for random number generation, specifically ANS X9.31
16
- compliant.
17
- - text: The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator)
18
- key is statically stored and hardcoded into the code as a seed value, which is
19
- then used to initialize the PRNG (Pseudorandom Number Generator).
20
- - text: The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator)
21
- key is generated and stored within the device's firmware or software at manufacturing
22
- time as part of the CSP injection process.
23
- - text: The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator)
24
- key is internally generated and never exits the module, meaning it is not explicitly
25
- stored, created, or compiled as it exists solely within the volatile memory of
26
- the system.
27
- - text: The PRNG (Pseudorandom Number Generator) key or DRBG (Deterministic Random
28
- Bit Generator) key is generated and stored securely in a private key portion of
29
- an ANSI X9.31-compliant format within non-volatile random access memory (NVRAM).
30
  inference: true
31
  ---
32
 
@@ -58,10 +53,10 @@ The model has been trained using an efficient few-shot learning technique that i
58
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
59
 
60
  ### Model Labels
61
- | Label | Examples |
62
- |:---------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
63
- | negative | <ul><li>"The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator) key is generated by calling `get_random_bytes()` to obtain bits from the Linux kernel's hardware-based non-deterministic random number generator and then used as input for AES 128 encryption, without being explicitly stored."</li><li>'The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator) key is obtained by reading bytes from the /dev/urandom device and then temporarily stored in plaintext SDRAM while in use before being deleted on power-down, reboot, or certain commands that require a restart.'</li><li>'The ANSI X9.31 PRNG (Pseudorandom Number Generator) key, also known as the DRBG (Deterministic Random Bit Generator) key, is generated internally by the kernel and not explicitly stored, created, or compiled, but rather used directly to produce random numbers for cryptographic purposes.'</li></ul> |
64
- | positive | <ul><li>'In an ANSI X9.31-compliant PRNG, the private key (RNG key or DRBG key) is generated and stored securely in Non-Volatile Random Access Memory (NVRAM).'</li><li>'The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator) key is generated and permanently stored in read-only memory (FLASH) within the factory environment using hardware-based random number generation embedded in FLASH.'</li><li>'The RNG (DRBG) key is not explicitly mentioned as being stored, but its internal state value is persisted in Non-Volatile Random Access Memory (NVRAM), implying that the key is implicitly tied to this persistent state and does not have an independent storage mechanism.'</li></ul> |
65
 
66
  ## Uses
67
 
@@ -81,7 +76,7 @@ from setfit import SetFitModel
81
  # Download from the 🤗 Hub
82
  model = SetFitModel.from_pretrained("yasirdemircan/setfit_rng_v6")
83
  # Run inference
84
- preds = model("The RNG (Random Number Generator) key or DRBG (Deterministic Random Bit Generator) key is generated and stored within the device's firmware or software at manufacturing time as part of the CSP injection process.")
85
  ```
86
 
87
  <!--
@@ -113,12 +108,12 @@ preds = model("The RNG (Random Number Generator) key or DRBG (Deterministic Rand
113
  ### Training Set Metrics
114
  | Training set | Min | Median | Max |
115
  |:-------------|:----|:--------|:----|
116
- | Word count | 24 | 36.8444 | 52 |
117
 
118
  | Label | Training Sample Count |
119
  |:---------|:----------------------|
120
- | negative | 22 |
121
- | positive | 23 |
122
 
123
  ### Training Hyperparameters
124
  - batch_size: (16, 16)
@@ -141,22 +136,22 @@ preds = model("The RNG (Random Number Generator) key or DRBG (Deterministic Rand
141
  ### Training Results
142
  | Epoch | Step | Training Loss | Validation Loss |
143
  |:------:|:----:|:-------------:|:---------------:|
144
- | 0.0294 | 1 | 0.2664 | - |
145
- | 1.0 | 34 | - | 0.2420 |
146
- | 1.4706 | 50 | 0.1035 | - |
147
- | 2.0 | 68 | - | 0.2950 |
148
- | 2.9412 | 100 | 0.0005 | - |
149
- | 3.0 | 102 | - | 0.2981 |
150
- | 4.0 | 136 | - | 0.3001 |
151
 
152
  ### Framework Versions
153
- - Python: 3.10.15
154
- - SetFit: 1.2.0.dev0
155
  - Sentence Transformers: 3.3.1
156
  - Transformers: 4.45.2
157
  - PyTorch: 2.5.1+cu124
158
- - Datasets: 2.19.1
159
- - Tokenizers: 0.20.1
160
 
161
  ## Citation
162
 
 
10
  - text-classification
11
  - generated_from_setfit_trainer
12
  widget:
13
+ - text: All critical security parameters are injected into the system during production.
14
+ - text: A 256-bit seed key for the ANSI X9.31 RNG function using AES-256 is stored
15
+ in plaintext in RAM, generated securely at the factory, and embedded in flash
16
+ memory.
17
+ - text: Random number generator obtains its seed key by reading bytes from the /dev/urandom
18
+ device. The seed key is stored in SDRAM in plaintext while in use and is deleted
19
+ from memory on power-down, reboot, or any command that is followed by a reboot,
20
+ such as switching between non-approved and approved modes, zeroization, restore
21
+ factory settings, and reset shared key.
22
+ - text: X9.31 PRNG seed keys Triple-DES (112 bit) Generated by gathering entropy.
23
+ - text: 'X Seed Key for RNG: Seed created by NDRNG and used as the Triple DES key
24
+ in the ANSI X9.31 RNG.'
 
 
 
 
 
25
  inference: true
26
  ---
27
 
 
53
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
54
 
55
  ### Model Labels
56
+ | Label | Examples |
57
+ |:---------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
58
+ | positive | <ul><li>'The private key component of an ANSI X9.31-compliant PRNG is stored securely in NVRAM.'</li><li>'It is generated in the factory (a secure environment) using the hardware RNG Embedded in FLASH.'</li><li>'The internal DRBG state value of the RNG is stored in NVRAM for persistent use.'</li></ul> |
59
+ | negative | <ul><li>'The NDRNG is used to generate seed & seed key values to feed the DRNG.'</li><li>'module stores RNG and DRBG state values only in RAM.'</li><li>'PRNG Seed Key A new ANSI X9.31 RNG Seed Key is generated from a block of 160 bits output by the random noise source software library.'</li></ul> |
60
 
61
  ## Uses
62
 
 
76
  # Download from the 🤗 Hub
77
  model = SetFitModel.from_pretrained("yasirdemircan/setfit_rng_v6")
78
  # Run inference
79
+ preds = model("X9.31 PRNG seed keys Triple-DES (112 bit) Generated by gathering entropy.")
80
  ```
81
 
82
  <!--
 
108
  ### Training Set Metrics
109
  | Training set | Min | Median | Max |
110
  |:-------------|:----|:--------|:----|
111
+ | Word count | 6 | 18.8889 | 49 |
112
 
113
  | Label | Training Sample Count |
114
  |:---------|:----------------------|
115
+ | negative | 23 |
116
+ | positive | 22 |
117
 
118
  ### Training Hyperparameters
119
  - batch_size: (16, 16)
 
136
  ### Training Results
137
  | Epoch | Step | Training Loss | Validation Loss |
138
  |:------:|:----:|:-------------:|:---------------:|
139
+ | 0.0294 | 1 | 0.2114 | - |
140
+ | 1.0 | 34 | - | 0.0933 |
141
+ | 1.4706 | 50 | 0.1015 | - |
142
+ | 2.0 | 68 | - | 0.0967 |
143
+ | 2.9412 | 100 | 0.0008 | - |
144
+ | 3.0 | 102 | - | 0.1039 |
145
+ | 4.0 | 136 | - | 0.1055 |
146
 
147
  ### Framework Versions
148
+ - Python: 3.10.16
149
+ - SetFit: 1.1.1
150
  - Sentence Transformers: 3.3.1
151
  - Transformers: 4.45.2
152
  - PyTorch: 2.5.1+cu124
153
+ - Datasets: 3.2.0
154
+ - Tokenizers: 0.20.3
155
 
156
  ## Citation
157
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:444c3024db43fa64a870a60c9e67e0d62aec4a4ad65b13264cb2a3629d25ae32
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f058ec2c1d2d43a342fc1c60c02d74b2845087ac2241126fb76c829ccb915cd
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2baa2f55c86e3f01e9b3e7b3383e6c38eed55769939aefd4166b97f5ef837310
3
  size 7055
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf973fb4d9bd207eeee8c3ccaf480dbb105f17f6c26419e866dbe2919e723441
3
  size 7055