CaasiHUANG
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
---
|
2 |
-
license: apache-2.0
|
3 |
language:
|
4 |
- zh
|
5 |
metrics:
|
@@ -31,6 +30,19 @@ And you can use `infer.py` to evaluate your model:
|
|
31 |
```shell
|
32 |
python infer.py --data_path YOUR_DATA_FILE.jsonl
|
33 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
Please note that:
|
35 |
1. Ensure each entry in `YOUR_DATA_FILE.jsonl` includes the fields: "dimension", "prompt", and "response".
|
36 |
2. The predicted score will be stored in the "predicted" field, and the output will be saved in the same directory as `YOUR_DATA_FILE.jsonl`.
|
|
|
1 |
---
|
|
|
2 |
language:
|
3 |
- zh
|
4 |
metrics:
|
|
|
30 |
```shell
|
31 |
python infer.py --data_path YOUR_DATA_FILE.jsonl
|
32 |
```
|
33 |
+
|
34 |
+
Models can be loaded by:
|
35 |
+
```python
|
36 |
+
from tokenization_internlm import InternLMTokenizer
|
37 |
+
from modeling_internlm import InternLMForSequenceClassification
|
38 |
+
|
39 |
+
tokenizer = InternLMTokenizer.from_pretrained("CaasiHUANG/flames-scorer", trust_remote_code=True)
|
40 |
+
model = InternLMForSequenceClassification.from_pretrained("CaasiHUANG/flames-scorer", trust_remote_code=True)
|
41 |
+
|
42 |
+
```
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
Please note that:
|
47 |
1. Ensure each entry in `YOUR_DATA_FILE.jsonl` includes the fields: "dimension", "prompt", and "response".
|
48 |
2. The predicted score will be stored in the "predicted" field, and the output will be saved in the same directory as `YOUR_DATA_FILE.jsonl`.
|