Skip to content

Commit

Permalink
retain the warning about large context size
Browse files Browse the repository at this point in the history
  • Loading branch information
amakropoulos committed Sep 26, 2024
1 parent cbb521a commit a0624e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Runtime/LLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ public void SetModel(string path)

maxContextLength = modelEntry.contextLength;
if (contextSize > maxContextLength) contextSize = maxContextLength;
if (contextSize == 0 && modelEntry.contextLength > 32768)
{
LLMUnitySetup.LogWarning($"The model {path} has very large context size ({maxContextLength}), consider setting it to a smaller value (<=32768) to avoid filling up the RAM");
}
}
#if UNITY_EDITOR
if (!EditorApplication.isPlaying) EditorUtility.SetDirty(this);
Expand Down

0 comments on commit a0624e6

Please sign in to comment.