Dongjin-kr
commited on
Commit
ยท
1b6aaab
1
Parent(s):
02cdb2c
Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ ko-reranker๋ [BAAI/bge-reranker-larger](https://huggingface.co/BAAI/bge-rerank
|
|
22 |
## 1.Usage
|
23 |
|
24 |
- Local
|
25 |
-
|
26 |
def exp_normalize(x):
|
27 |
b = x.max()
|
28 |
y = np.exp(x - b)
|
@@ -42,7 +42,7 @@ ko-reranker๋ [BAAI/bge-reranker-larger](https://huggingface.co/BAAI/bge-rerank
|
|
42 |
scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
|
43 |
scores = exp_normalize(scores.numpy())
|
44 |
print (f'first: {scores[0]}, second: {scores[1]}')
|
45 |
-
|
46 |
|
47 |
## 2. Backgound
|
48 |
- #### <span style="#FF69B4;"> **์ปจํ์คํธ ์์๊ฐ ์ ํ๋์ ์ํฅ ์ค๋ค**([Lost in Middel, *Liu et al., 2023*](https://arxiv.org/pdf/2307.03172.pdf)) </span>
|
|
|
22 |
## 1.Usage
|
23 |
|
24 |
- Local
|
25 |
+
```
|
26 |
def exp_normalize(x):
|
27 |
b = x.max()
|
28 |
y = np.exp(x - b)
|
|
|
42 |
scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
|
43 |
scores = exp_normalize(scores.numpy())
|
44 |
print (f'first: {scores[0]}, second: {scores[1]}')
|
45 |
+
```
|
46 |
|
47 |
## 2. Backgound
|
48 |
- #### <span style="#FF69B4;"> **์ปจํ์คํธ ์์๊ฐ ์ ํ๋์ ์ํฅ ์ค๋ค**([Lost in Middel, *Liu et al., 2023*](https://arxiv.org/pdf/2307.03172.pdf)) </span>
|