from torchmetrics.text.infolm import InfoLM
metric = InfoLM('google/bert_uncased_L-2_H-128_A-2', idf=False)
preds = ["this is the prediction", "there is an other sample"]
target = ["this is the reference", "there is another one"]
values = [ ]
for _ in range(10):
    values.append(metric(preds, target))
fig_, ax_ = metric.plot(values)
