Update README.md
Browse files
README.md
CHANGED
@@ -41,6 +41,24 @@ As the scores range from 0 to 1, a performance measure such as MAE or RMSE may b
|
|
41 |
|
42 |
With a correlation of approximately 60 for the 560m model and approximately 80 for the 3b model, the output is highly correlated with the judges' scores.
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
Citation
|
45 |
--------
|
46 |
|
|
|
41 |
|
42 |
With a correlation of approximately 60 for the 560m model and approximately 80 for the 3b model, the output is highly correlated with the judges' scores.
|
43 |
|
44 |
+
How to Use Blommz-560m-guardrail
|
45 |
+
--------------------------------
|
46 |
+
|
47 |
+
The following example utilizes the API Pipeline of the Transformers library.
|
48 |
+
|
49 |
+
```python
|
50 |
+
from transformers import pipeline
|
51 |
+
|
52 |
+
guardrail = pipeline("text-classification", "cmarkea/bloomz-560m-guardrail")
|
53 |
+
|
54 |
+
list_text = [...]
|
55 |
+
model(
|
56 |
+
list_text,
|
57 |
+
return_all_scores=True, # Crucial for assessing all modalities of toxicity!
|
58 |
+
function_to_apply='sigmoid' # To ensure obtaining a score between 0 and 1!
|
59 |
+
)
|
60 |
+
```
|
61 |
+
|
62 |
Citation
|
63 |
--------
|
64 |
|