dsam99 commited on
Commit
13112d9
·
verified ·
1 Parent(s): 81c6ddc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -5
README.md CHANGED
@@ -2,7 +2,10 @@
2
  license: apache-2.0
3
  tags:
4
  - text-classification
5
- - safety-scoring
 
 
 
6
  ---
7
 
8
  # Safety Classification
@@ -12,9 +15,13 @@ This is a fine-tuned version of `gte-large-en-v1.5` for safety scoring.
12
  ## Usage
13
 
14
  ```python
15
- from transformers import AutoModel, AutoTokenizer
16
 
17
- model = AutoModel.from_pretrained("locuslab/safety-classifier_gte-large-en-v1.5")
 
 
 
 
 
18
  tokenizer = AutoTokenizer.from_pretrained("locuslab/safety-classifier_gte-large-en-v1.5")
19
- ```
20
-
 
2
  license: apache-2.0
3
  tags:
4
  - text-classification
5
+ datasets:
6
+ - locuslab/safety_data_annotated
7
+ base_model:
8
+ - Alibaba-NLP/gte-large-en-v1.5
9
  ---
10
 
11
  # Safety Classification
 
15
  ## Usage
16
 
17
  ```python
18
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
19
 
20
+ model = AutoModelForSequenceClassification.from_pretrained(
21
+ "locuslab/safety-classifier_gte-large-en-v1.5",
22
+ torch_dtype=torch.bfloat16,
23
+ num_labels=6,
24
+ trust_remote_code=True
25
+ )
26
  tokenizer = AutoTokenizer.from_pretrained("locuslab/safety-classifier_gte-large-en-v1.5")
27
+ ```