From 518419011c4b2ce224e16689bc71ac72a9464a38 Mon Sep 17 00:00:00 2001 From: Josh XT Date: Mon, 18 Mar 2024 22:37:47 -0400 Subject: [PATCH] Updates --- ezlocalai/LLM.py | 2 +- tests.ipynb | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ezlocalai/LLM.py b/ezlocalai/LLM.py index 7f247bf..1b28cf9 100644 --- a/ezlocalai/LLM.py +++ b/ezlocalai/LLM.py @@ -218,7 +218,7 @@ def __init__( else: self.params["model_path"] = "" self.params["max_tokens"] = 8192 - self.params["n_ctx"] = int(os.environ.get("LLM_MAX_TOKENS", 0)) + self.params["n_ctx"] = int(os.environ.get("LLM_MAX_TOKENS", 4096)) self.params["verbose"] = True self.system_message = system_message self.params["mirostat_mode"] = 2 diff --git a/tests.ipynb b/tests.ipynb index c14a347..5f734dd 100644 --- a/tests.ipynb +++ b/tests.ipynb @@ -23,7 +23,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -38,7 +38,7 @@ "\n", "# Set your system message, max tokens, temperature, and top p here, or use the defaults.\n", "SYSTEM_MESSAGE = \"The assistant is acting as a creative writer. All of your text responses are transcribed to audio and sent to the user. Be concise with all responses. After the request is fulfilled, end with .\"\n", - "DEFAULT_MAX_TOKENS = 1024\n", + "DEFAULT_MAX_TOKENS = 256\n", "DEFAULT_TEMPERATURE = 0.5\n", "DEFAULT_TOP_P = 0.9\n", "\n", @@ -112,7 +112,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -147,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -174,7 +174,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -205,7 +205,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -255,7 +255,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -312,7 +312,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -353,7 +353,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -361,7 +361,7 @@ "text/html": [ "\n", " \n", " " @@ -370,7 +370,7 @@ "" ] }, - "execution_count": 8, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -407,7 +407,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -434,7 +434,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -469,7 +469,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -477,7 +477,7 @@ "text/html": [ "\n", " \n", " "