pronics2004 commited on
Commit
be55ba1
1 Parent(s): dc6672d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -3
README.md CHANGED
@@ -5,9 +5,14 @@ language:
5
  library_name: transformers
6
  ---
7
 
8
- ## Model Description
 
 
9
  This model is IBM's lightweight, 4-layer toxicity binary classifier for English. Its latency characteristics make it a suitable guardrail for any large language model. It can also be used for bulk processing of data where high throughput is needed. It has been trained on several benchmark datasets in English, specifically for detecting hateful, abusive, profane and other toxic content in plain text.
10
 
 
 
 
11
 
12
  ## Feature
13
  This model offers very low inference latency and is capable of running on CPUs apart from GPUs and AIUs. It features 38 million parameters, reducing the number of hidden layers from 12 to 4, decreasing the hidden size from 768 to 576, and the intermediate size from 3072 to 768, compared to the original RoBERTa model architecture. The latency on CPU vs accuracy numbers for this model in comparision to others is shown in the chart below.
@@ -16,7 +21,7 @@ This model offers very low inference latency and is capable of running on CPUs a
16
 
17
 
18
 
19
- ## Model Usage
20
  ```python
21
  # Example of how to use the model
22
  import torch
@@ -40,4 +45,7 @@ with torch.no_grad():
40
  The model outperforms most popular models with significantly lower inference latency. If a better F1 score is required, please refer to IBM's 12-layer model [here](https://huggingface.co/ibm-granite/granite-guardian-hap-125m).
41
 
42
  ![Description of Image](38m_comparison_a.png)
43
- ![Description of Image](38m_comparison_b.png)
 
 
 
 
5
  library_name: transformers
6
  ---
7
 
8
+ ## Granite-Guardian-HAP-38m
9
+
10
+ ## Model Summary
11
  This model is IBM's lightweight, 4-layer toxicity binary classifier for English. Its latency characteristics make it a suitable guardrail for any large language model. It can also be used for bulk processing of data where high throughput is needed. It has been trained on several benchmark datasets in English, specifically for detecting hateful, abusive, profane and other toxic content in plain text.
12
 
13
+ - **Developers:** IBM Research
14
+ - **Release Date**: September 6th, 2024
15
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
16
 
17
  ## Feature
18
  This model offers very low inference latency and is capable of running on CPUs apart from GPUs and AIUs. It features 38 million parameters, reducing the number of hidden layers from 12 to 4, decreasing the hidden size from 768 to 576, and the intermediate size from 3072 to 768, compared to the original RoBERTa model architecture. The latency on CPU vs accuracy numbers for this model in comparision to others is shown in the chart below.
 
21
 
22
 
23
 
24
+ ## Usage
25
  ```python
26
  # Example of how to use the model
27
  import torch
 
45
  The model outperforms most popular models with significantly lower inference latency. If a better F1 score is required, please refer to IBM's 12-layer model [here](https://huggingface.co/ibm-granite/granite-guardian-hap-125m).
46
 
47
  ![Description of Image](38m_comparison_a.png)
48
+ ![Description of Image](38m_comparison_b.png)
49
+
50
+ ## Ethical Considerations and Limitations
51
+ The use of model-based guardrails for Large Language Models (LLMs) involves risks and ethical considerations people must be aware of. This model operates on chunks of texts and provides a score indicating the presence of hate speech, abuse, or profanity. However, the efficacy of the model can be limited by several factors: the potential inability to capture nuanced meanings or the risk of false positives or negatives on text that is dissimilar to the training data. Previous research has demonstrated the risk of various biases in toxicity or hate speech detection. That is also relevant to this work. We urge the community to use this model with ethical intentions and in a responsible way.