aboutsummaryrefslogtreecommitdiff
path: root/notebooks/Riddles.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'notebooks/Riddles.ipynb')
-rw-r--r--notebooks/Riddles.ipynb362
1 files changed, 362 insertions, 0 deletions
diff --git a/notebooks/Riddles.ipynb b/notebooks/Riddles.ipynb
new file mode 100644
index 0000000..c2c8309
--- /dev/null
+++ b/notebooks/Riddles.ipynb
@@ -0,0 +1,362 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "execution_state": "idle",
+ "id": "1ddfc692-bda7-4d38-a549-2fb0d40d437d",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Some weights of the model checkpoint at /home/sipb/nlp-class-project/checkpoints/bert_base_rtl/epoch_3_checkpt were not used when initializing BertForMaskedLM: ['attention_mask']\n",
+ "- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
+ "- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
+ "Some weights of BertForMaskedLM were not initialized from the model checkpoint at /home/sipb/nlp-class-project/checkpoints/bert_base_rtl/epoch_3_checkpt and are newly initialized because the shapes did not match:\n",
+ "- bert.embeddings.position_embeddings.weight: found shape torch.Size([512, 768]) in the checkpoint and torch.Size([128, 768]) in the model instantiated\n",
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import sys\n",
+ "\n",
+ "sys.path.append(\"..\")\n",
+ "\n",
+ "import torch\n",
+ "import transformers\n",
+ "\n",
+ "from utils import add_attn_hooks\n",
+ "\n",
+ "# tokenizer = transformers.AutoTokenizer.from_pretrained(\"distilbert/distilbert-base-uncased\")\n",
+ "# model = transformers.AutoModelForMaskedLM.from_pretrained(\"/home/sipb/nlp-class-project/checkpoints/distilbert_base_ltr/epoch_3_checkpt\", ignore_mismatched_sizes=True)\n",
+ "\n",
+ "tokenizer = transformers.AutoTokenizer.from_pretrained(\"bert-base-uncased\")\n",
+ "text_dir = \"rtl\"\n",
+ "# text_dir = \"ltr\"\n",
+ "model = transformers.AutoModelForMaskedLM.from_pretrained(f\"/home/sipb/nlp-class-project/checkpoints/bert_base_{text_dir}/epoch_3_checkpt\", ignore_mismatched_sizes=True)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "execution_state": "idle",
+ "id": "a732375b-1682-45c6-8df0-8db1458559c9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "add_attn_hooks(model, text_dir)\n",
+ "model.eval();"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "execution_state": "idle",
+ "id": "041d1702-5aaf-45f0-9413-4014b315d1ed",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "with open(\"/home/sipb/nlp-class-project/data/riddles.txt\", \"r\") as f:\n",
+ " riddles = [line.rstrip() for line in f.readlines()]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "execution_state": "idle",
+ "id": "a4098975-2df6-4435-bc93-1a5afd6d7e68",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# CPU is fast enough\n",
+ "\n",
+ "ppls = []\n",
+ "for riddle in riddles:\n",
+ " batch = tokenizer([riddle], return_tensors=\"pt\", padding_side=\"left\" if text_dir == \"rtl\" else \"right\", padding=\"max_length\", max_length=128)\n",
+ " batch[\"labels\"] = batch[\"input_ids\"].clone()\n",
+ " batch[\"labels\"][batch[\"attention_mask\"] == 0] = -100\n",
+ " # batch = tokenizer([riddle], return_tensors=\"pt\")#, padding_side=\"left\" if text_dir == \"rtl\" else \"right\", padding=\"longest\", max_length=128)\n",
+ " # batch[\"labels\"] = batch[\"input_ids\"]\n",
+ " with torch.inference_mode():\n",
+ " output = model(**batch)\n",
+ " ppls.append(math.e ** output.loss.item())"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "execution_state": "idle",
+ "id": "c4a82af4-d0d8-415a-9135-3a1350c1402e",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(522.113471240328, 'rtl')"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sum(ppls) / len(ppls), text_dir"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "execution_state": "idle",
+ "id": "84a95c66-6dd3-4ccb-96a2-96f38008f70e",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(1007.5656859988405, 'ltr')"
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sum(ppls) / len(ppls), text_dir"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "execution_state": "idle",
+ "id": "51ed80f1-a935-42bc-8194-832f91222c45",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(1007.5656309474507, 'ltr')"
+ ]
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sum(ppls) / len(ppls), text_dir"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "execution_state": "idle",
+ "id": "40a98c10-59c3-498a-a9e6-c23bd9437bc7",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "937.8557468023619"
+ ]
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sum(ppls) / len(ppls)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "execution_state": "idle",
+ "id": "80b22ba1-e5ba-4f1e-8038-158a2c2f37a6",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{'input_ids': tensor([[ 101, 1045, 2064, 2022, 2524, 1010, 2021, 1045, 2572, 2025,\n",
+ " 5024, 1012, 2054, 2572, 1045, 1029, 1037, 15117, 1012, 102,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
+ " 0, 0, 0, 0, 0, 0, 0, 0]]), 'labels': tensor([[ 101, 1045, 2064, 2022, 2524, 1010, 2021, 1045, 2572, 2025,\n",
+ " 5024, 1012, 2054, 2572, 1045, 1029, 1037, 15117, 1012, 102,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,\n",
+ " -100, -100, -100, -100, -100, -100, -100, -100]])}"
+ ]
+ },
+ "execution_count": 58,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "batch"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "execution_state": "idle",
+ "id": "c68b5235-a4a7-4f38-9acb-f5072e546a96",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(array([ 4., 6., 11., 6., 5., 2., 1., 1., 2., 2.]),\n",
+ " array([ 613.56297843, 829.36555779, 1045.16813716, 1260.97071653,\n",
+ " 1476.77329589, 1692.57587526, 1908.37845463, 2124.18103399,\n",
+ " 2339.98361336, 2555.78619272, 2771.58877209]),\n",
+ " <BarContainer object of 10 artists>)"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAY8UlEQVR4nO3df5DVVf348dcCsoCyyy9ZIBdZf4ym4E+MECMdGIHQsBpHjRqiRlMxJQqFCozMQGscJjM1Z1KbUbRmBBt/MGMokiMiIKikoRgKqUCJ7PJDV2TP54+v3vEKqPS99ywLj8fMnXHf78P7nMvhzj69P3YrUkopAAAyadXcCwAA9i/iAwDISnwAAFmJDwAgK/EBAGQlPgCArMQHAJCV+AAAsmrT3Av4uKampnjjjTeiY8eOUVFR0dzLAQA+g5RSbN68OXr16hWtWn3ycxt7XXy88cYbUVtb29zLAAD+B2vXro1DDjnkE8fsdfHRsWPHiA8WX1VV1dzLAQA+g4aGhqitrS18H/8ke118fPhSS1VVlfgAgBbms7xlwhtOAYCsxAcAkJX4AACyEh8AQFbiAwDISnwAAFmJDwAgK/EBAGQlPgCArMQHAJCV+AAAshIfAEBW4gMAyEp8AABZtWnuBbBv6jPpweZewh57dcbI5l4CwH7BMx8AQFbiAwDISnwAAFmJDwAgK/EBAGQlPgCArMQHAJCV+AAAshIfAEBW4gMAyEp8AABZiQ8AICvxAQBkJT4AgKzEBwCQlfgAALISHwBAVuIDAMhKfAAAWYkPAC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ICsxAcAkJX4AACyEh8AQFZli4+bbrop+vTpE+3atYsBAwbE008/Xa6pAIAWpCzxce+998aECRPi6quvjmeeeSaOP/74GDZsWGzYsKEc0wEALUhZ4uOGG26ICy+8MMaOHRvHHHNM3HLLLdGhQ4f44x//WI7pAIAWpE2pL/jee+/F0qVLY/LkyYVjrVq1iqFDh8bChQt3Gt/Y2BiNjY2Fr+vr6yMioqGhodRLi4iIpsZtZbkuALQU5fge++E1U0qfOrbk8fHf//43duzYETU1NUXHa2pq4p///OdO46dPnx7Tpk3b6XhtbW2plwYARET1zPJde/PmzVFdXf2JY0oeH3tq8uTJMWHChMLXTU1NsXHjxujatWtUVFQ069rYWUNDQ9TW1sbatWujqqqquZfDx9ifvZ892rvZn/9dSik2b94cvXr1+tSxJY+Pbt26RevWrWP9+vVFx9evXx89evTYaXxlZWVUVlYWHevUqVOpl0WJVVVVeWDuxezP3s8e7d3sz//m057x+FDJ33Datm3bOPnkk2PevHmFY01NTTFv3rwYOHBgqacDAFqYsrzsMmHChBgzZkz0798/vvCFL8TMmTNj69atMXbs2HJMBwC0IGWJj/POOy/+85//xNSpU2PdunVxwgknxNy5c3d6EyotT2VlZVx99dU7vVTG3sH+7P3s0d7N/uRRkT7LZ2IAAErE73YBALISHwBAVuIDAMhKfAAAWYmP/dCCBQvi7LPPjl69ekVFRUXMmTOn6HxKKaZOnRo9e/aM9u3bx9ChQ+Pll18uGrNx48YYPXp0VFVVRadOneJ73/tebNmypWjMc889F1/60peiXbt2UVtbG9dff32W+9fSfdr+fOc734mKioqi2/Dhw4vG2J/ymT59epxyyinRsWPH6N69e5xzzjmxcuXKojHvvvtujBs3Lrp27RoHHXRQfOMb39jpBy+uWbMmRo4cGR06dIju3bvHxIkT4/333y8aM3/+/DjppJOisrIyjjjiiLjjjjuy3MeW7rPs0emnn77T4+jiiy8uGmOPyiix33nooYfST3/603TfffeliEizZ88uOj9jxoxUXV2d5syZk5599tn01a9+NdXV1aV33nmnMGb48OHp+OOPT0899VT6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iTZw4sejnfCR7VFYV6f9tFABAFt7zAQBkJT4AgKzEBwCQlfgAALISHwBAVuIDAMhKfAAAWYkPACAr8QEAZCU+AICsxAcAkJX4AACy+j/J4r9i/nZCRAAAAABJRU5ErkJggg==",
+ "text/plain": [
+ "<Figure size 640x480 with 1 Axes>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "plt.hist(ppls)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "execution_state": "idle",
+ "id": "8acad3ce-905d-455e-af5d-9770495f374a",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414,\n",
+ " 956.7294281325414]"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "ppls"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "86daa05b-5784-457b-b65e-8b8395128d6f",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.12.7"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}