diff --git "a/LLMs_Language_bias-main/.ipynb_checkpoints/customized_llama-checkpoint.ipynb" "b/LLMs_Language_bias-main/.ipynb_checkpoints/customized_llama-checkpoint.ipynb" new file mode 100644--- /dev/null +++ "b/LLMs_Language_bias-main/.ipynb_checkpoints/customized_llama-checkpoint.ipynb" @@ -0,0 +1,2205 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setup" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Load the API key and libaries." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from src.LLM_Evaluation import LLAMA\n", + "import pandas as pd" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Load the Constants" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "PATH = 'data/Portuguese_test.csv'\n", + "MODEL = \"Llama-2-13b\"\n", + "TEMPERATURE = 0.3\n", + "N_REPETITIONS = 3\n", + "REASONING = True\n", + "LANGUAGES = ['english', 'portuguese']\n", + "MAX_TOKENS = 512 # If reasoning is True set a larger value (e.G. 1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create an Instance of the model" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "The model file 'Models/Llama-2-13b.gguf' already exists. Do you want to overwrite it? (yes/no): yes\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading the weights of the model: https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/resolve/main/llama-2-13b-chat.Q8_0.gguf ...\n", + "Done!\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "llama_model_loader: loaded meta data with 19 key-value pairs and 363 tensors from Models/Llama-2-13b.gguf (version GGUF V2 (latest))\n", + "llama_model_loader: - tensor 0: token_embd.weight q8_0 [ 5120, 32000, 1, 1 ]\n", + "llama_model_loader: - tensor 1: blk.0.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 2: blk.0.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 3: blk.0.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 4: blk.0.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 5: blk.0.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 6: blk.0.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 7: blk.0.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 8: blk.0.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 9: blk.0.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 10: blk.1.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 11: blk.1.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 12: blk.1.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 13: blk.1.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 14: blk.1.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 15: blk.1.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 16: blk.1.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 17: blk.1.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 18: blk.1.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 19: blk.10.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 20: blk.10.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 21: blk.10.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 22: blk.10.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 23: blk.10.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 24: blk.10.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 25: blk.10.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 26: blk.10.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 27: blk.10.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 28: blk.11.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 29: blk.11.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 30: blk.11.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 31: blk.11.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 32: blk.11.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 33: blk.11.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 34: blk.11.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 35: blk.11.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 36: blk.11.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 37: blk.12.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 38: blk.12.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 39: blk.12.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 40: blk.12.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 41: blk.12.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 42: blk.12.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 43: blk.12.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 44: blk.12.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 45: blk.12.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 46: blk.13.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 47: blk.13.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 48: blk.13.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 49: blk.13.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 50: blk.13.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 51: blk.13.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 52: blk.13.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 53: blk.13.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 54: blk.13.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 55: blk.14.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 56: blk.14.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 57: blk.14.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 58: blk.14.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 59: blk.14.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 60: blk.14.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 61: blk.14.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 62: blk.14.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 63: blk.14.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 64: blk.15.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 65: blk.15.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 66: blk.2.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 67: blk.2.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 68: blk.2.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 69: blk.2.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 70: blk.2.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 71: blk.2.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 72: blk.2.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 73: blk.2.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 74: blk.2.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 75: blk.3.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 76: blk.3.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 77: blk.3.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 78: blk.3.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 79: blk.3.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 80: blk.3.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 81: blk.3.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 82: blk.3.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 83: blk.3.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 84: blk.4.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 85: blk.4.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 86: blk.4.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 87: blk.4.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 88: blk.4.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 89: blk.4.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 90: blk.4.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 91: blk.4.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 92: blk.4.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 93: blk.5.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 94: blk.5.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 95: blk.5.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 96: blk.5.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 97: blk.5.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 98: blk.5.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 99: blk.5.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 100: blk.5.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 101: blk.5.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 102: blk.6.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 103: blk.6.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 104: blk.6.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 105: blk.6.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 106: blk.6.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 107: blk.6.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 108: blk.6.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 109: blk.6.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 110: blk.6.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 111: blk.7.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 112: blk.7.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 113: blk.7.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 114: blk.7.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 115: blk.7.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 116: blk.7.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 117: blk.7.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 118: blk.7.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 119: blk.7.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 120: blk.8.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 121: blk.8.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 122: blk.8.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 123: blk.8.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 124: blk.8.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 125: blk.8.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 126: blk.8.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 127: blk.8.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 128: blk.8.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 129: blk.9.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 130: blk.9.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 131: blk.9.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 132: blk.9.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 133: blk.9.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 134: blk.9.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 135: blk.9.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 136: blk.9.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 137: blk.9.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 138: blk.15.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 139: blk.15.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 140: blk.15.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 141: blk.15.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 142: blk.15.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 143: blk.15.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 144: blk.15.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 145: blk.16.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 146: blk.16.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 147: blk.16.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 148: blk.16.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 149: blk.16.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 150: blk.16.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 151: blk.16.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 152: blk.16.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 153: blk.16.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 154: blk.17.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 155: blk.17.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 156: blk.17.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 157: blk.17.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 158: blk.17.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 159: blk.17.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 160: blk.17.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 161: blk.17.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 162: blk.17.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 163: blk.18.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 164: blk.18.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 165: blk.18.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 166: blk.18.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 167: blk.18.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 168: blk.18.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 169: blk.18.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 170: blk.18.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 171: blk.18.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 172: blk.19.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 173: blk.19.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 174: blk.19.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 175: blk.19.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 176: blk.19.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 177: blk.19.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 178: blk.19.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 179: blk.19.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 180: blk.19.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 181: blk.20.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 182: blk.20.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 183: blk.20.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 184: blk.20.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 185: blk.20.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 186: blk.20.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 187: blk.20.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 188: blk.20.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 189: blk.20.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 190: blk.21.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 191: blk.21.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 192: blk.21.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 193: blk.21.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 194: blk.21.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 195: blk.21.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 196: blk.21.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 197: blk.21.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 198: blk.21.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 199: blk.22.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 200: blk.22.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 201: blk.22.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 202: blk.22.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 203: blk.22.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 204: blk.22.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 205: blk.22.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 206: blk.22.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 207: blk.22.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 208: blk.23.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 209: blk.23.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 210: blk.23.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 211: blk.23.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 212: blk.23.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 213: blk.23.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 214: blk.23.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 215: blk.23.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 216: blk.23.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 217: blk.24.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 218: blk.24.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 219: blk.24.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 220: blk.24.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 221: blk.24.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 222: blk.24.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 223: blk.24.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 224: blk.24.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 225: blk.24.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 226: blk.25.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 227: blk.25.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 228: blk.25.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 229: blk.25.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 230: blk.25.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 231: blk.25.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 232: blk.25.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 233: blk.25.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 234: blk.25.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 235: blk.26.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 236: blk.26.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 237: blk.26.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 238: blk.26.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 239: blk.26.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 240: blk.26.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 241: blk.26.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 242: blk.26.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 243: blk.26.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 244: blk.27.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 245: blk.27.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 246: blk.27.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 247: blk.27.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 248: blk.27.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 249: blk.27.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 250: blk.27.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 251: blk.27.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 252: blk.27.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 253: blk.28.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 254: blk.28.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 255: blk.28.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 256: blk.28.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 257: blk.28.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 258: blk.28.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 259: blk.28.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 260: blk.28.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 261: blk.28.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 262: blk.29.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 263: blk.29.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 264: blk.29.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 265: blk.29.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 266: blk.29.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 267: blk.29.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 268: blk.29.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 269: blk.29.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 270: blk.29.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 271: blk.30.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 272: blk.30.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 273: blk.30.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 274: blk.30.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 275: blk.30.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 276: blk.30.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 277: output.weight q8_0 [ 5120, 32000, 1, 1 ]\n", + "llama_model_loader: - tensor 278: blk.30.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 279: blk.30.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 280: blk.30.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 281: blk.31.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 282: blk.31.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 283: blk.31.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 284: blk.31.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 285: blk.31.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 286: blk.31.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 287: blk.31.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 288: blk.31.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 289: blk.31.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 290: blk.32.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 291: blk.32.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 292: blk.32.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 293: blk.32.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 294: blk.32.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 295: blk.32.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 296: blk.32.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 297: blk.32.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 298: blk.32.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 299: blk.33.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 300: blk.33.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 301: blk.33.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 302: blk.33.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 303: blk.33.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 304: blk.33.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 305: blk.33.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 306: blk.33.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 307: blk.33.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 308: blk.34.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 309: blk.34.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 310: blk.34.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 311: blk.34.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 312: blk.34.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 313: blk.34.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 314: blk.34.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 315: blk.34.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 316: blk.34.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 317: blk.35.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 318: blk.35.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 319: blk.35.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 320: blk.35.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 321: blk.35.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 322: blk.35.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 323: blk.35.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 324: blk.35.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 325: blk.35.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 326: blk.36.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 327: blk.36.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 328: blk.36.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 329: blk.36.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 330: blk.36.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 331: blk.36.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 332: blk.36.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 333: blk.36.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 334: blk.36.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 335: blk.37.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 336: blk.37.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 337: blk.37.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 338: blk.37.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 339: blk.37.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 340: blk.37.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 341: blk.37.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 342: blk.37.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 343: blk.37.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 344: blk.38.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 345: blk.38.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 346: blk.38.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 347: blk.38.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 348: blk.38.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 349: blk.38.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 350: blk.38.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 351: blk.38.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 352: blk.38.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 353: blk.39.attn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 354: blk.39.ffn_down.weight q8_0 [ 13824, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 355: blk.39.ffn_gate.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 356: blk.39.ffn_up.weight q8_0 [ 5120, 13824, 1, 1 ]\n", + "llama_model_loader: - tensor 357: blk.39.ffn_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - tensor 358: blk.39.attn_k.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 359: blk.39.attn_output.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 360: blk.39.attn_q.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 361: blk.39.attn_v.weight q8_0 [ 5120, 5120, 1, 1 ]\n", + "llama_model_loader: - tensor 362: output_norm.weight f32 [ 5120, 1, 1, 1 ]\n", + "llama_model_loader: - kv 0: general.architecture str \n", + "llama_model_loader: - kv 1: general.name str \n", + "llama_model_loader: - kv 2: llama.context_length u32 \n", + "llama_model_loader: - kv 3: llama.embedding_length u32 \n", + "llama_model_loader: - kv 4: llama.block_count u32 \n", + "llama_model_loader: - kv 5: llama.feed_forward_length u32 \n", + "llama_model_loader: - kv 6: llama.rope.dimension_count u32 \n", + "llama_model_loader: - kv 7: llama.attention.head_count u32 \n", + "llama_model_loader: - kv 8: llama.attention.head_count_kv u32 \n", + "llama_model_loader: - kv 9: llama.attention.layer_norm_rms_epsilon f32 \n", + "llama_model_loader: - kv 10: general.file_type u32 \n", + "llama_model_loader: - kv 11: tokenizer.ggml.model str \n", + "llama_model_loader: - kv 12: tokenizer.ggml.tokens arr \n", + "llama_model_loader: - kv 13: tokenizer.ggml.scores arr \n", + "llama_model_loader: - kv 14: tokenizer.ggml.token_type arr \n", + "llama_model_loader: - kv 15: tokenizer.ggml.bos_token_id u32 \n", + "llama_model_loader: - kv 16: tokenizer.ggml.eos_token_id u32 \n", + "llama_model_loader: - kv 17: tokenizer.ggml.unknown_token_id u32 \n", + "llama_model_loader: - kv 18: general.quantization_version u32 \n", + "llama_model_loader: - type f32: 81 tensors\n", + "llama_model_loader: - type q8_0: 282 tensors\n", + "llm_load_print_meta: format = GGUF V2 (latest)\n", + "llm_load_print_meta: arch = llama\n", + "llm_load_print_meta: vocab type = SPM\n", + "llm_load_print_meta: n_vocab = 32000\n", + "llm_load_print_meta: n_merges = 0\n", + "llm_load_print_meta: n_ctx_train = 4096\n", + "llm_load_print_meta: n_embd = 5120\n", + "llm_load_print_meta: n_head = 40\n", + "llm_load_print_meta: n_head_kv = 40\n", + "llm_load_print_meta: n_layer = 40\n", + "llm_load_print_meta: n_rot = 128\n", + "llm_load_print_meta: n_gqa = 1\n", + "llm_load_print_meta: f_norm_eps = 0.0e+00\n", + "llm_load_print_meta: f_norm_rms_eps = 1.0e-05\n", + "llm_load_print_meta: n_ff = 13824\n", + "llm_load_print_meta: freq_base_train = 10000.0\n", + "llm_load_print_meta: freq_scale_train = 1\n", + "llm_load_print_meta: model type = 13B\n", + "llm_load_print_meta: model ftype = mostly Q8_0\n", + "llm_load_print_meta: model params = 13.02 B\n", + "llm_load_print_meta: model size = 12.88 GiB (8.50 BPW) \n", + "llm_load_print_meta: general.name = LLaMA v2\n", + "llm_load_print_meta: BOS token = 1 ''\n", + "llm_load_print_meta: EOS token = 2 ''\n", + "llm_load_print_meta: UNK token = 0 ''\n", + "llm_load_print_meta: LF token = 13 '<0x0A>'\n", + "llm_load_tensors: ggml ctx size = 0.12 MB\n", + "llm_load_tensors: mem required = 13189.98 MB\n", + "....................................................................................................\n", + "llama_new_context_with_model: n_ctx = 512\n", + "llama_new_context_with_model: freq_base = 10000.0\n", + "llama_new_context_with_model: freq_scale = 1\n", + "llama_new_context_with_model: kv self size = 400.00 MB\n", + "llama_new_context_with_model: compute buffer total size = 80.88 MB\n", + "AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | \n" + ] + } + ], + "source": [ + "model = LLAMA(model=MODEL, temperature=TEMPERATURE, n_repetitions=N_REPETITIONS, reasoning=REASONING, languages=LANGUAGES, path=PATH, max_tokens=MAX_TOKENS)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### See characteristics of the model" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Llama-2-13b\n" + ] + } + ], + "source": [ + "print(model.model)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " You will be provided with medical queries in this languages: english, portuguese. The medical query will be delimited with #### characters.\n", + " Each question will have 4 possible answer options. provide the letter with the answer and a short sentence answering why the answer was selected. \n", + "\n", + " Provide your output in json format with the keys: response, reasoning. Make sure to always use the those keys, do not modify the keys.\n", + " Be very careful with the resulting JSON file, make sure to add curly braces, quotes to define the strings, and commas to separate the items within the JSON.\n", + "\n", + " Responses: A, B, C, D.\n", + " \n" + ] + } + ], + "source": [ + "print(model.system_message)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Test the model" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "question = \"\"\"What is the primary function of the cornea in the human eye?\n", + "A) Refracting light onto the retina\n", + "B) Producing aqueous humor\n", + "C) Regulating pupil size\n", + "D) Transmitting visual signals to the brain\"\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Response:\n", + "{'response': 'A', 'reasoning': 'The primary function of the cornea is to refract light onto the retina, allowing us to see clearly.'}\n", + "Answer: A\n", + "Reasoning: The primary function of the cornea is to refract light onto the retina, allowing us to see clearly.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 104.25 ms / 179 runs ( 0.58 ms per token, 1717.08 tokens per second)\n", + "llama_print_timings: prompt eval time = 4030.28 ms / 235 tokens ( 17.15 ms per token, 58.31 tokens per second)\n", + "llama_print_timings: eval time = 21840.72 ms / 178 runs ( 122.70 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 26418.34 ms\n" + ] + } + ], + "source": [ + "response = model.get_completion_from_messages(question)\n", + "\n", + "print('Response:')\n", + "print(response)\n", + "\n", + "print(f'Answer: {response[\"response\"]}')\n", + "print(f'Reasoning: {response[\"reasoning\"]}')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Modify the model" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " You will be provided with medical queries in this languages: english, portuguese. The medical query will be delimited with #### characters.\n", + " Each question will have 4 possible answer options. provide the letter with the answer and a short sentence answering why the answer was selected. Also print the area of the medicine to which the question refers to.\n", + "\n", + " Provide your output in json format with the keys: response, reasoning, area. Make sure to always use the those keys, do not modify the keys.\n", + " Be very careful with the resulting JSON file, make sure to add curly braces, quotes to define the strings, and commas to separate the items within the JSON.\n", + "\n", + " Responses: A, B, C, D.\n", + " \n" + ] + } + ], + "source": [ + "model.add_extra_message('Also print the area of the medicine to which the question refers to.')\n", + "model.add_output_key('area')\n", + "print(model.system_message)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Response:\n", + "{'response': 'A', 'area': 'Ophthalmology', 'reasoning': 'The primary function of the cornea in the human eye is to refract (bend) light so that it focuses properly onto the retina, allowing us to see clearly.'}\n", + "Area: Ophthalmology\n", + "Answer: A\n", + "Reasoning: The primary function of the cornea in the human eye is to refract (bend) light so that it focuses properly onto the retina, allowing us to see clearly.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 121.51 ms / 210 runs ( 0.58 ms per token, 1728.20 tokens per second)\n", + "llama_print_timings: prompt eval time = 3193.95 ms / 179 tokens ( 17.84 ms per token, 56.04 tokens per second)\n", + "llama_print_timings: eval time = 25620.59 ms / 209 runs ( 122.59 ms per token, 8.16 tokens per second)\n", + "llama_print_timings: total time = 29439.49 ms\n" + ] + } + ], + "source": [ + "response = model.get_completion_from_messages(question)\n", + "\n", + "print('Response:')\n", + "print(response)\n", + "\n", + "print(f'Area: {response[\"area\"]}')\n", + "print(f'Answer: {response[\"response\"]}')\n", + "print(f'Reasoning: {response[\"reasoning\"]}')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Run multiple experiments using the csv file" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "**************************************************\n", + "Question 1: \n", + "Language: english\n", + "Question: \n", + "In which ocular region are caliciform cells physiologically found?\n", + "a) Cornea.\n", + "b) Corneoscleral limbus.\n", + "c) Gray line.\n", + "d) Semilunar fold.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 85.73 ms / 148 runs ( 0.58 ms per token, 1726.39 tokens per second)\n", + "llama_print_timings: prompt eval time = 1319.39 ms / 55 tokens ( 23.99 ms per token, 41.69 tokens per second)\n", + "llama_print_timings: eval time = 18031.75 ms / 147 runs ( 122.66 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 19782.50 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'ocular surface', 'reasoning': 'Caliciform cells are physiologically found in the cornea.'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 68.65 ms / 119 runs ( 0.58 ms per token, 1733.53 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 14521.70 ms / 119 runs ( 122.03 ms per token, 8.19 tokens per second)\n", + "llama_print_timings: total time = 14867.12 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'ocular surface', 'reasoning': 'Caliciform cells are physiologically found in the cornea.'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 102.97 ms / 178 runs ( 0.58 ms per token, 1728.66 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 21859.47 ms / 178 runs ( 122.81 ms per token, 8.14 tokens per second)\n", + "llama_print_timings: total time = 22389.64 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'ocular surface', 'reasoning': 'Caliciform cells are physiologically found in the cornea.'}\n", + "Language: portuguese\n", + "Question: \n", + "Em qual região ocular células caliciformes são fisiologicamente encontradas?\n", + "a)Córnea.\n", + "b)Limbo corneoescleral.\n", + "c)Linha cinzenta.\n", + "d)Prega semilunar.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 73.34 ms / 126 runs ( 0.58 ms per token, 1718.05 tokens per second)\n", + "llama_print_timings: prompt eval time = 1544.47 ms / 63 tokens ( 24.52 ms per token, 40.79 tokens per second)\n", + "llama_print_timings: eval time = 15276.67 ms / 125 runs ( 122.21 ms per token, 8.18 tokens per second)\n", + "llama_print_timings: total time = 17192.52 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea', 'reasoning': 'Células caliciformes são fisiologicamente encontradas na superfície da córnea.'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 77.80 ms / 135 runs ( 0.58 ms per token, 1735.31 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 16624.04 ms / 135 runs ( 123.14 ms per token, 8.12 tokens per second)\n", + "llama_print_timings: total time = 17021.67 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea', 'reasoning': 'Células caliciformes são fisiologicamente encontradas na superfície da córnea.'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 72.02 ms / 125 runs ( 0.58 ms per token, 1735.56 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15484.22 ms / 125 runs ( 123.87 ms per token, 8.07 tokens per second)\n", + "llama_print_timings: total time = 15853.77 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea', 'reasoning': 'Células caliciformes são fisiologicamente encontradas na superfície da córnea.'}\n", + "**************************************************\n", + "**************************************************\n", + "Question 2: \n", + "Language: english\n", + "Question: \n", + "Mark the alternative that best correlates the histological characteristics with the respective ocular tissues:\n", + "\n", + "I. Monolayer of cells tightly joined together by junctional complexes.\n", + "II. Parallel and regular striations observed under optical microscopy, perpendicular to the epithelium.\n", + "III. It contains bipolar cells, amacrine cells, horizontal cells and Muller cells.\n", + "IV. It contains magnocellular, parvocellular and coniocellular cells.\n", + "\n", + "A. Photoreceptors.\n", + "B. Retinal pigmented epithelium.\n", + "C. Retinal ganglionic layer.\n", + "D. Inner nuclear layer.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 63.25 ms / 109 runs ( 0.58 ms per token, 1723.37 tokens per second)\n", + "llama_print_timings: prompt eval time = 3954.36 ms / 158 tokens ( 25.03 ms per token, 39.96 tokens per second)\n", + "llama_print_timings: eval time = 13306.72 ms / 108 runs ( 123.21 ms per token, 8.12 tokens per second)\n", + "llama_print_timings: total time = 17582.81 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'B', 'area': 'Retina', 'reasoning': 'The histological characteristics described correlate with the retinal pigmented epithelium (RPE), which is composed of a monolayer of cells tightly joined together by junctional complexes. The RPE is also characterized by parallel and regular striations observed under optical microscopy, perpendicular to the epithelium.'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 93.99 ms / 162 runs ( 0.58 ms per token, 1723.53 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 19938.23 ms / 162 runs ( 123.08 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 20418.79 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Retina', 'reasoning': 'The correct answer is A, Photoreceptors. The histological characteristics described in the question match the features of photoreceptors, specifically the monolayer of cells tightly joined together by junctional complexes and the presence of bipolar cells, amacrine cells, horizontal cells, and Muller cells.'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 94.27 ms / 162 runs ( 0.58 ms per token, 1718.54 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 19984.79 ms / 162 runs ( 123.36 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 20469.27 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Retina', 'reasoning': 'The correct answer is A, Photoreceptors, because the description correlates well with the histological characteristics of photoreceptors, such as a monolayer of cells tightly joined together by junctional complexes, and the presence of bipolar cells, amacrine cells, horizontal cells, and Muller cells.'}\n", + "Language: portuguese\n", + "Question: \n", + "Assinale a alternativa que melhor correlaciona as características histológicas com os respectivos tecidos oculares:\n", + "\n", + "I. Monocamada de células fortemente unidas por complexos juncionais.\n", + "II. Estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio.\n", + "III. Contém células bipolares, células amácrinas, células horizontais e células de Muller.\n", + "IV. Contém células magnocelulares, parvocelulares e coniocelulares.\n", + "\n", + "A. Fotorreceptores.\n", + "B. Epitélio pigmentado da pigmentado da retina.\n", + "C. Camada ganglionar retiniana.\n", + "D. Camada nuclear interna.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 73.76 ms / 124 runs ( 0.59 ms per token, 1681.06 tokens per second)\n", + "llama_print_timings: prompt eval time = 3161.78 ms / 196 tokens ( 16.13 ms per token, 61.99 tokens per second)\n", + "llama_print_timings: eval time = 15136.97 ms / 123 runs ( 123.06 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 18666.94 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.\n", + "\n", + "Area: Retina\n", + "\n", + "Here is the JSON output:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina,\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 74.82 ms / 124 runs ( 0.60 ms per token, 1657.24 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15153.14 ms / 124 runs ( 122.20 ms per token, 8.18 tokens per second)\n", + "llama_print_timings: total time = 15518.25 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Fotorreceptores', 'reasoning': 'As características histológicas descritas (monocamada de células fortemente unidas por complexos juncionais) são mais consistentemente encontradas nos fotorreceptores, especificamente nas células sensoriais da retina.'}\n", + "Test #1: \n", + "Error converting respose to json: Sure, I'd be happy to help! Here's my response in JSON format:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A (Fotorreceptores) because the description provided matches the characteristics of the photoreceptors in the retina. The monocamada de células fortemente unidas por complexos juncionais (Option I) and the estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio (Option II) are both\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 76.84 ms / 124 runs ( 0.62 ms per token, 1613.66 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15217.25 ms / 124 runs ( 122.72 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 15593.91 ms\n", + "Llama.generate: prefix-match hit\n", + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 79.11 ms / 124 runs ( 0.64 ms per token, 1567.40 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15338.32 ms / 124 runs ( 123.70 ms per token, 8.08 tokens per second)\n", + "llama_print_timings: total time = 15725.48 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptors in the retina, specifically the monocamada de células fortemente unidas por complexos juncionais.\n", + "Area: Retina\n", + "\n", + "Here is the resulting JSON format output:\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photorecept\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 72.61 ms / 124 runs ( 0.59 ms per token, 1707.73 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15261.49 ms / 124 runs ( 123.08 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 15622.30 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the fotorreceptors in the retina, specifically the monocamada de células fortemente unidas por complexos juncionais.\n", + "Area: Retina\n", + "\n", + "Here is the JSON output:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the fotorre\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 49.41 ms / 79 runs ( 0.63 ms per token, 1598.77 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 9742.09 ms / 79 runs ( 123.32 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 9977.66 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Retina', 'reasoning': 'The correct answer is A, Fotorreceptores, because the description matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 72.43 ms / 124 runs ( 0.58 ms per token, 1711.97 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15283.41 ms / 124 runs ( 123.25 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 15647.07 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "response: A\n", + "reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.\n", + "area: Retina\n", + "\n", + "Here is the output in JSON format:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 71.98 ms / 124 runs ( 0.58 ms per token, 1722.68 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15379.25 ms / 124 runs ( 124.03 ms per token, 8.06 tokens per second)\n", + "llama_print_timings: total time = 15741.14 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.\n", + "\n", + "Area: Retina\n", + "\n", + "Here is the JSON output:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina,\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 71.66 ms / 124 runs ( 0.58 ms per token, 1730.39 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15235.24 ms / 124 runs ( 122.86 ms per token, 8.14 tokens per second)\n", + "llama_print_timings: total time = 15596.51 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "response: A\n", + "reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.\n", + "area: Retina\n", + "\n", + "Here is the output in JSON format:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 71.88 ms / 124 runs ( 0.58 ms per token, 1725.19 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15222.20 ms / 124 runs ( 122.76 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 15586.03 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description of the histological characteristics matches the features of the photoreceptors in the retina.\n", + "\n", + "Area: Retina\n", + "\n", + "Here is the JSON output:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description of the histological characteristics matches the features of the photoreceptors in the retina.\",\n", + "\"area\": \"Ret\n", + "Generating new response...\n", + "Error converting respose to json: Here is the answer to your medical query:\n", + "\n", + "Response: A\n", + "\n", + "Reasoning: The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina, which are tightly packed and connected by complex junctions.\n", + "\n", + "Area: Retina\n", + "\n", + "Here is the JSON output:\n", + "\n", + "{\n", + "\"response\": \"A\",\n", + "\"reasoning\": \"The correct answer is A, Fotorreceptores, because the description provided matches the characteristics of the photoreceptor cells in the retina,\n", + "Generating new response...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 72.07 ms / 124 runs ( 0.58 ms per token, 1720.55 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15238.33 ms / 124 runs ( 122.89 ms per token, 8.14 tokens per second)\n", + "llama_print_timings: total time = 15602.74 ms\n", + "Llama.generate: prefix-match hit\n", + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 72.09 ms / 124 runs ( 0.58 ms per token, 1720.14 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 15280.38 ms / 124 runs ( 123.23 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 15644.11 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Fotorreceptores', 'reasoning': 'As características histológicas descritas (monocamada de células fortemente unidas por complexos juncionais) são mais consistentemente encontradas em fotorreceptores, especificamente em células bipolares e células amácrinas.'}\n", + "**************************************************\n", + "**************************************************\n", + "Question 3: \n", + "Language: english\n", + "Question: \n", + "Order the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep.\n", + "a) Flat, wing, basal.\n", + "b) wing, basal, flat.\n", + "c) Basal, flat, wing.\n", + "d) wing, flat, basal.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 139.17 ms / 241 runs ( 0.58 ms per token, 1731.68 tokens per second)\n", + "llama_print_timings: prompt eval time = 1847.39 ms / 79 tokens ( 23.38 ms per token, 42.76 tokens per second)\n", + "llama_print_timings: eval time = 29454.96 ms / 240 runs ( 122.73 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 32035.13 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium', 'reasoning': 'The three cell names found in the corneal epithelium, starting with the most superficial, are: basal, flat, and wing. Therefore, the correct order is: basal, flat, wing.'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 139.07 ms / 241 runs ( 0.58 ms per token, 1732.89 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 29812.90 ms / 241 runs ( 123.70 ms per token, 8.08 tokens per second)\n", + "llama_print_timings: total time = 30545.64 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium', 'reasoning': 'The three cell names found in the corneal epithelium, starting with the most superficial, are: basal, flat, and wing. Therefore, the correct order is: basal, flat, wing.'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 140.87 ms / 241 runs ( 0.58 ms per token, 1710.82 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 30373.02 ms / 241 runs ( 126.03 ms per token, 7.93 tokens per second)\n", + "llama_print_timings: total time = 31101.62 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium', 'reasoning': 'The three cell names found in the corneal epithelium, starting with the most superficial, are: basal, flat, and wing. Therefore, the correct order is: basal, flat, wing.'}\n", + "Language: portuguese\n", + "Question: \n", + "Ordene as três denominações celulares encontradas no epitélio da córnea, iniciando pelo mais superficial, seguido do intermediário e do profundo.\n", + "a)Plana, alada, basal.\n", + "b)Alada, basal, plana.\n", + "c)Basal, plana, alada.\n", + "d)Alada, plana, basal.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 99.10 ms / 171 runs ( 0.58 ms per token, 1725.58 tokens per second)\n", + "llama_print_timings: prompt eval time = 2555.42 ms / 96 tokens ( 26.62 ms per token, 37.57 tokens per second)\n", + "llama_print_timings: eval time = 20939.61 ms / 170 runs ( 123.17 ms per token, 8.12 tokens per second)\n", + "llama_print_timings: total time = 23999.22 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium', 'reasoning': 'The three layers of the corneal epithelium are arranged in a specific order, starting from the most superficial layer. The correct order is: basal, plana, alada.'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 53.72 ms / 92 runs ( 0.58 ms per token, 1712.65 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 11271.10 ms / 92 runs ( 122.51 ms per token, 8.16 tokens per second)\n", + "llama_print_timings: total time = 11538.05 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'Cornea', 'reasoning': 'The three layers of the corneal epithelium, listed in order from most superficial to deepest, are: basal, plana, and alada. Therefore, the correct answer is (c) Basal, plana, alada.'}\n", + "Test #2: \n", + "{'response': 'a', 'area': 'córnea', 'reasoning': 'A ordenação correta das três denominações celulares encontradas no epitélio da córnea, iniciando pelo mais superficial, seguido do intermediário e do profundo é: plana, alada, basal.'}\n", + "**************************************************\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 107.40 ms / 178 runs ( 0.60 ms per token, 1657.40 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 21898.52 ms / 178 runs ( 123.03 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 22688.40 ms\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
IDyeartestthemesubthemeportugueseenglishanswerresponse_english_0reasoning_english_0...area_english_2response_portuguese_0reasoning_portuguese_0area_portuguese_0response_portuguese_1reasoning_portuguese_1area_portuguese_1response_portuguese_2reasoning_portuguese_2area_portuguese_2
012022Teórica IAnatomiacorneaEm qual região ocular células caliciformes são...In which ocular region are caliciform cells ph...DaCaliciform cells are physiologically found in ......ocular surfaceaCélulas caliciformes são fisiologicamente enco...CórneaaCélulas caliciformes são fisiologicamente enco...CórneaaCélulas caliciformes são fisiologicamente enco...Córnea
122022Teórica IAnatomiaretinaAssinale a alternativa que melhor correlaciona...Mark the alternative that best correlates the ...BBThe histological characteristics described cor......RetinaAAs características histológicas descritas (mon...FotorreceptoresAThe correct answer is A, Fotorreceptores, beca...RetinaAAs características histológicas descritas (mon...Fotorreceptores
232022Teórica IAnatomiacorneaOrdene as três denominações celulares encontra...Order the three cell names found in the cornea...AcThe three cell names found in the corneal epit......corneal epitheliumcThe three layers of the corneal epithelium are...corneal epitheliumcThe three layers of the corneal epithelium, li...CorneaaA ordenação correta das três denominações celu...córnea
\n", + "

3 rows × 26 columns

\n", + "
" + ], + "text/plain": [ + " ID year test theme subtheme \\\n", + "0 1 2022 Teórica I Anatomia cornea \n", + "1 2 2022 Teórica I Anatomia retina \n", + "2 3 2022 Teórica I Anatomia cornea \n", + "\n", + " portuguese \\\n", + "0 Em qual região ocular células caliciformes são... \n", + "1 Assinale a alternativa que melhor correlaciona... \n", + "2 Ordene as três denominações celulares encontra... \n", + "\n", + " english answer \\\n", + "0 In which ocular region are caliciform cells ph... D \n", + "1 Mark the alternative that best correlates the ... B \n", + "2 Order the three cell names found in the cornea... A \n", + "\n", + " response_english_0 reasoning_english_0 ... \\\n", + "0 a Caliciform cells are physiologically found in ... ... \n", + "1 B The histological characteristics described cor... ... \n", + "2 c The three cell names found in the corneal epit... ... \n", + "\n", + " area_english_2 response_portuguese_0 \\\n", + "0 ocular surface a \n", + "1 Retina A \n", + "2 corneal epithelium c \n", + "\n", + " reasoning_portuguese_0 area_portuguese_0 \\\n", + "0 Células caliciformes são fisiologicamente enco... Córnea \n", + "1 As características histológicas descritas (mon... Fotorreceptores \n", + "2 The three layers of the corneal epithelium are... corneal epithelium \n", + "\n", + " response_portuguese_1 reasoning_portuguese_1 \\\n", + "0 a Células caliciformes são fisiologicamente enco... \n", + "1 A The correct answer is A, Fotorreceptores, beca... \n", + "2 c The three layers of the corneal epithelium, li... \n", + "\n", + " area_portuguese_1 response_portuguese_2 \\\n", + "0 Córnea a \n", + "1 Retina A \n", + "2 Cornea a \n", + "\n", + " reasoning_portuguese_2 area_portuguese_2 \n", + "0 Células caliciformes são fisiologicamente enco... Córnea \n", + "1 As características histológicas descritas (mon... Fotorreceptores \n", + "2 A ordenação correta das três denominações celu... córnea \n", + "\n", + "[3 rows x 26 columns]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = model.llm_language_evaluation(save=False)\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "**************************************************\n", + "Question 1: \n", + "Language: english\n", + "Question: \n", + "In which ocular region are caliciform cells physiologically found?\n", + "a) Cornea.\n", + "b) Corneoscleral limbus.\n", + "c) Gray line.\n", + "d) Semilunar fold.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 48.49 ms / 75 runs ( 0.65 ms per token, 1546.74 tokens per second)\n", + "llama_print_timings: prompt eval time = 3464.68 ms / 172 tokens ( 20.14 ms per token, 49.64 tokens per second)\n", + "llama_print_timings: eval time = 8992.61 ms / 74 runs ( 121.52 ms per token, 8.23 tokens per second)\n", + "llama_print_timings: total time = 12965.81 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'b', 'area': 'Corneoscleral limbus'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 39.65 ms / 61 runs ( 0.65 ms per token, 1538.42 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 7439.21 ms / 61 runs ( 121.95 ms per token, 8.20 tokens per second)\n", + "llama_print_timings: total time = 7851.97 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'b', 'area': 'Corneoscleral limbus'}\n", + "Test #2: \n", + "{'response': 'b', 'area': 'Corneoscleral limbus'}\n", + "Language: portuguese\n", + "Question: \n", + "Em qual região ocular células caliciformes são fisiologicamente encontradas?\n", + "a)Córnea.\n", + "b)Limbo corneoescleral.\n", + "c)Linha cinzenta.\n", + "d)Prega semilunar.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 49.18 ms / 76 runs ( 0.65 ms per token, 1545.28 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 9315.30 ms / 76 runs ( 122.57 ms per token, 8.16 tokens per second)\n", + "llama_print_timings: total time = 9830.58 ms\n", + "Llama.generate: prefix-match hit\n", + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 49.88 ms / 84 runs ( 0.59 ms per token, 1683.97 tokens per second)\n", + "llama_print_timings: prompt eval time = 1239.74 ms / 63 tokens ( 19.68 ms per token, 50.82 tokens per second)\n", + "llama_print_timings: eval time = 10191.38 ms / 83 runs ( 122.79 ms per token, 8.14 tokens per second)\n", + "llama_print_timings: total time = 11690.56 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 35.82 ms / 63 runs ( 0.57 ms per token, 1758.74 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 7708.45 ms / 63 runs ( 122.36 ms per token, 8.17 tokens per second)\n", + "llama_print_timings: total time = 7898.84 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 37.45 ms / 65 runs ( 0.58 ms per token, 1735.55 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 7983.62 ms / 65 runs ( 122.82 ms per token, 8.14 tokens per second)\n", + "llama_print_timings: total time = 8179.34 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'Córnea'}\n", + "**************************************************\n", + "**************************************************\n", + "Question 2: \n", + "Language: english\n", + "Question: \n", + "Mark the alternative that best correlates the histological characteristics with the respective ocular tissues:\n", + "\n", + "I. Monolayer of cells tightly joined together by junctional complexes.\n", + "II. Parallel and regular striations observed under optical microscopy, perpendicular to the epithelium.\n", + "III. It contains bipolar cells, amacrine cells, horizontal cells and Muller cells.\n", + "IV. It contains magnocellular, parvocellular and coniocellular cells.\n", + "\n", + "A. Photoreceptors.\n", + "B. Retinal pigmented epithelium.\n", + "C. Retinal ganglionic layer.\n", + "D. Inner nuclear layer.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 105.49 ms / 182 runs ( 0.58 ms per token, 1725.25 tokens per second)\n", + "llama_print_timings: prompt eval time = 2748.37 ms / 158 tokens ( 17.39 ms per token, 57.49 tokens per second)\n", + "llama_print_timings: eval time = 22315.53 ms / 181 runs ( 123.29 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 25632.78 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'B', 'area': 'Retinal pigmented epithelium'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 105.18 ms / 182 runs ( 0.58 ms per token, 1730.42 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 22549.45 ms / 182 runs ( 123.90 ms per token, 8.07 tokens per second)\n", + "llama_print_timings: total time = 23107.53 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'B', 'area': 'Retinal pigmented epithelium'}\n", + "Test #2: \n", + "{'response': 'B', 'area': 'Retina'}\n", + "Language: portuguese\n", + "Question: \n", + "Assinale a alternativa que melhor correlaciona as características histológicas com os respectivos tecidos oculares:\n", + "\n", + "I. Monocamada de células fortemente unidas por complexos juncionais.\n", + "II. Estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio.\n", + "III. Contém células bipolares, células amácrinas, células horizontais e células de Muller.\n", + "IV. Contém células magnocelulares, parvocelulares e coniocelulares.\n", + "\n", + "A. Fotorreceptores.\n", + "B. Epitélio pigmentado da pigmentado da retina.\n", + "C. Camada ganglionar retiniana.\n", + "D. Camada nuclear interna.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 105.70 ms / 175 runs ( 0.60 ms per token, 1655.64 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 21619.37 ms / 175 runs ( 123.54 ms per token, 8.09 tokens per second)\n", + "llama_print_timings: total time = 22156.88 ms\n", + "Llama.generate: prefix-match hit\n", + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 66.04 ms / 114 runs ( 0.58 ms per token, 1726.33 tokens per second)\n", + "llama_print_timings: prompt eval time = 4107.77 ms / 196 tokens ( 20.96 ms per token, 47.71 tokens per second)\n", + "llama_print_timings: eval time = 13982.21 ms / 113 runs ( 123.74 ms per token, 8.08 tokens per second)\n", + "llama_print_timings: total time = 18427.11 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'A', 'area': 'Fotorreceptores'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 48.01 ms / 83 runs ( 0.58 ms per token, 1728.77 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 10235.22 ms / 83 runs ( 123.32 ms per token, 8.11 tokens per second)\n", + "llama_print_timings: total time = 10479.26 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'B', 'area': 'retina'}\n", + "Test #2: \n", + "{'response': 'B', 'area': 'retina'}\n", + "**************************************************\n", + "**************************************************\n", + "Question 3: \n", + "Language: english\n", + "Question: \n", + "Order the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep.\n", + "a) Flat, wing, basal.\n", + "b) wing, basal, flat.\n", + "c) Basal, flat, wing.\n", + "d) wing, flat, basal.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 75.96 ms / 131 runs ( 0.58 ms per token, 1724.61 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 16275.07 ms / 131 runs ( 124.24 ms per token, 8.05 tokens per second)\n", + "llama_print_timings: total time = 16665.93 ms\n", + "Llama.generate: prefix-match hit\n", + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 76.81 ms / 136 runs ( 0.56 ms per token, 1770.51 tokens per second)\n", + "llama_print_timings: prompt eval time = 1926.40 ms / 79 tokens ( 24.38 ms per token, 41.01 tokens per second)\n", + "llama_print_timings: eval time = 16566.14 ms / 135 runs ( 122.71 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 18898.56 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 76.68 ms / 136 runs ( 0.56 ms per token, 1773.70 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 16732.49 ms / 136 runs ( 123.03 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 17135.93 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium'}\n", + "Test #2: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 81.55 ms / 143 runs ( 0.57 ms per token, 1753.44 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 17539.50 ms / 143 runs ( 122.65 ms per token, 8.15 tokens per second)\n", + "llama_print_timings: total time = 17965.75 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'c', 'area': 'corneal epithelium'}\n", + "Language: portuguese\n", + "Question: \n", + "Ordene as três denominações celulares encontradas no epitélio da córnea, iniciando pelo mais superficial, seguido do intermediário e do profundo.\n", + "a)Plana, alada, basal.\n", + "b)Alada, basal, plana.\n", + "c)Basal, plana, alada.\n", + "d)Alada, plana, basal.\n", + "Test #0: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 64.71 ms / 110 runs ( 0.59 ms per token, 1699.79 tokens per second)\n", + "llama_print_timings: prompt eval time = 2301.54 ms / 96 tokens ( 23.97 ms per token, 41.71 tokens per second)\n", + "llama_print_timings: eval time = 13404.20 ms / 109 runs ( 122.97 ms per token, 8.13 tokens per second)\n", + "llama_print_timings: total time = 16040.90 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'b', 'area': 'superficial'}\n", + "Test #1: \n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 55.89 ms / 98 runs ( 0.57 ms per token, 1753.57 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 11965.78 ms / 98 runs ( 122.10 ms per token, 8.19 tokens per second)\n", + "llama_print_timings: total time = 12253.06 ms\n", + "Llama.generate: prefix-match hit\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'response': 'a', 'area': 'superficial'}\n", + "Test #2: \n", + "{'response': 'a', 'area': 'superficial'}\n", + "**************************************************\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "llama_print_timings: load time = 4030.37 ms\n", + "llama_print_timings: sample time = 52.93 ms / 92 runs ( 0.58 ms per token, 1738.08 tokens per second)\n", + "llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)\n", + "llama_print_timings: eval time = 11394.86 ms / 92 runs ( 123.86 ms per token, 8.07 tokens per second)\n", + "llama_print_timings: total time = 11664.71 ms\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
IDyeartestthemesubthemeportugueseenglishanswerresponse_english_0area_english_0response_english_1area_english_1response_english_2area_english_2response_portuguese_0area_portuguese_0response_portuguese_1area_portuguese_1response_portuguese_2area_portuguese_2
012022Teórica IAnatomiacorneaEm qual região ocular células caliciformes são...In which ocular region are caliciform cells ph...DbCorneoscleral limbusbCorneoscleral limbusbCorneoscleral limbusaCórneaaCórneaaCórnea
122022Teórica IAnatomiaretinaAssinale a alternativa que melhor correlaciona...Mark the alternative that best correlates the ...BBRetinal pigmented epitheliumBRetinal pigmented epitheliumBRetinaAFotorreceptoresBretinaBretina
232022Teórica IAnatomiacorneaOrdene as três denominações celulares encontra...Order the three cell names found in the cornea...Accorneal epitheliumccorneal epitheliumccorneal epitheliumbsuperficialasuperficialasuperficial
\n", + "
" + ], + "text/plain": [ + " ID year test theme subtheme \\\n", + "0 1 2022 Teórica I Anatomia cornea \n", + "1 2 2022 Teórica I Anatomia retina \n", + "2 3 2022 Teórica I Anatomia cornea \n", + "\n", + " portuguese \\\n", + "0 Em qual região ocular células caliciformes são... \n", + "1 Assinale a alternativa que melhor correlaciona... \n", + "2 Ordene as três denominações celulares encontra... \n", + "\n", + " english answer \\\n", + "0 In which ocular region are caliciform cells ph... D \n", + "1 Mark the alternative that best correlates the ... B \n", + "2 Order the three cell names found in the cornea... A \n", + "\n", + " response_english_0 area_english_0 response_english_1 \\\n", + "0 b Corneoscleral limbus b \n", + "1 B Retinal pigmented epithelium B \n", + "2 c corneal epithelium c \n", + "\n", + " area_english_1 response_english_2 area_english_2 \\\n", + "0 Corneoscleral limbus b Corneoscleral limbus \n", + "1 Retinal pigmented epithelium B Retina \n", + "2 corneal epithelium c corneal epithelium \n", + "\n", + " response_portuguese_0 area_portuguese_0 response_portuguese_1 \\\n", + "0 a Córnea a \n", + "1 A Fotorreceptores B \n", + "2 b superficial a \n", + "\n", + " area_portuguese_1 response_portuguese_2 area_portuguese_2 \n", + "0 Córnea a Córnea \n", + "1 retina B retina \n", + "2 superficial a superficial " + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "### Suggestion:\n", + "# When running multiple experiments, it's recommended to change the value of REASONING to False, since running the reasoning multiple times can be time consuming.\n", + "model.change_reasoning(False)\n", + "\n", + "df = model.llm_language_evaluation(save=False)\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [conda env:nlp_bias_vpython=3_8_15]", + "language": "python", + "name": "conda-env-nlp_bias_vpython_3_8_15-py" + }, + "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.8.15" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}