duobert
duobert copied to clipboard
TF 2.1 Interoperability
Is it possible #4 is affecting the accuracy of results in tf 2.1.
I ported the code over with the convert to tf2 script and ran on provided dev_dataset.tf and the model did not accurately rank results.
....
'probs': array([0.9881346 , 0.01186538], dtype=float32), 'label_ids': 0}
{'probs': array([0.9881408 , 0.01185923], dtype=float32), 'label_ids': 0}
{'probs': array([0.9881171 , 0.01188295], dtype=float32), 'label_ids': 0}
{'probs': array([0.9413739 , 0.05862608], dtype=float32), 'label_ids': 0}
{'probs': array([0.46223718, 0.5377629 ], dtype=float32), 'label_ids': 0}
{'probs': array([0.98812693, 0.01187303], dtype=float32), 'label_ids': 0}
{'probs': array([0.9881612 , 0.01183886], dtype=float32), 'label_ids': 0}
{'probs': array([0.98815 , 0.01184994], dtype=float32), 'label_ids': 0}
{'probs': array([0.985965 , 0.01403502], dtype=float32), 'label_ids': 0}
{'probs': array([0.9881386 , 0.01186145], dtype=float32), 'label_ids': 0}
{'probs': array([0.98811185, 0.01188817], dtype=float32), 'label_ids': 0}
{'probs': array([0.988456 , 0.01154405], dtype=float32), 'label_ids': 0}
{'probs': array([0.9881373, 0.0118627], dtype=float32), 'label_ids': 0}
Ranks from duobert: [11 29 18 20 1 9 17 28 26 21 6 13 16 10 7 19 14 27 4 3 0 25 12 8
15 24 5 23 2 22]
MonoBERT MRR: 1.0
DuoBERT MRR: 0.047619047619047616