from torchmetrics.text.infolm import InfoLM
metric = InfoLM('google/bert_uncased_L-2_H-128_A-2', idf=False)
preds = ['he read the book because he was interested in world history']
target = ['he was interested in world history because he read the book']
metric.update(preds, target)
fig_, ax_ = metric.plot()
