# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python [conda env:transformers]
#     language: python
#     name: conda-env-transformers-py
# ---

# +
import os
import sys
from tqdm import tqdm

sys.path.insert(0, os.path.abspath('../src'))
from __init__ import BertLM
# -

bert_model=BertLM()

# +
# for _ in tqdm(range(1000)):
#     bert_model.get_sentence_prob('This is a test.', verbose=False)
# -

bert_model.get_sentence_prob('This is a test.', verbose=False)

bert_model.get_sentence_prob('This is a test.', verbose=True)
bert_model.get_sentence_prob('This is a robbery.', verbose=True)
bert_model.get_sentence_prob('This is a sentence.', verbose=True)
bert_model.get_sentence_prob('This is a a.', verbose=True)
bert_model.get_sentence_prob('This is a macrame.', verbose=True)

import numpy as np

a = np.zeros((3,2))
a





StarcoderdataJupyterScriptsDedupFiltered