update README.md
Browse files
README.md
CHANGED
@@ -24,6 +24,7 @@ tokenizer = AutoTokenizer.from_pretrained('swulling/bge-reranker-large-onnx-o4')
|
|
24 |
model = ORTModelForSequenceClassification.from_pretrained('swulling/bge-reranker-large-onnx-o4')
|
25 |
model.to("cuda")
|
26 |
|
|
|
27 |
with torch.no_grad():
|
28 |
inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512)
|
29 |
scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
|
|
|
24 |
model = ORTModelForSequenceClassification.from_pretrained('swulling/bge-reranker-large-onnx-o4')
|
25 |
model.to("cuda")
|
26 |
|
27 |
+
pairs = [['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']]
|
28 |
with torch.no_grad():
|
29 |
inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512)
|
30 |
scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
|