[GH-ISSUE #9382] Ollama at random hangs llama3.1:8b requests indefinitely #6122

Closed
opened 2026-04-12 17:27:32 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @iganev on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9382

What is the issue?

Recently I noticed Ollama seemingly at random hanging on inference requests using llama3.1:8b and 8192 num_ctx, but I think this is also observable with the default num_ctx of 2048.

My setup is running in docker using 2x4090 GPUs.

When the glitch occurs, the runner process gets stuck at 100% CPU usage and hangs indefinitely until the container is restarted. The system indicates it as a zombie process when this happens.

Currently running 0.5.12, but this behaviour has been observed with the past few versions too.

I enabled debugging to provide you with some useful logs, however the issue does not appear when debugging is enabled. I suppose its a quantum effect that requires an observer to behave as expected... could be race condition of some sort, not sure..

When debugging is stopped all I see in the logs are requests, that just stop at some point...

Relevant log output

2025/02/26 21:37:33 routes.go:1205: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:true OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:2562047h47m16.854775807s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:1024 OLLAMA_MODELS:/root/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:2 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
time=2025-02-26T21:37:33.709Z level=INFO source=images.go:432 msg="total blobs: 91"
time=2025-02-26T21:37:33.711Z level=INFO source=images.go:439 msg="total unused blobs removed: 0"
time=2025-02-26T21:37:33.711Z level=INFO source=routes.go:1256 msg="Listening on [::]:11434 (version 0.5.12)"
time=2025-02-26T21:37:33.711Z level=DEBUG source=sched.go:106 msg="starting llm scheduler"
time=2025-02-26T21:37:33.711Z level=INFO source=gpu.go:217 msg="looking for compatible GPUs"
time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:98 msg="searching for GPU discovery libraries for NVIDIA"
time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=libcuda.so*
time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[/usr/lib/ollama/libcuda.so* /usr/local/nvidia/lib/libcuda.so* /usr/local/nvidia/lib64/libcuda.so* /usr/local/cuda*/targets/*/lib/libcuda.so* /usr/lib/*-linux-gnu/nvidia/current/libcuda.so* /usr/lib/*-linux-gnu/libcuda.so* /usr/lib/wsl/lib/libcuda.so* /usr/lib/wsl/drivers/*/libcuda.so* /opt/cuda/lib*/libcuda.so* /usr/local/cuda/lib*/libcuda.so* /usr/lib*/libcuda.so* /usr/local/lib*/libcuda.so*]"
time=2025-02-26T21:37:33.716Z level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths=[/usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08]
initializing /usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08
dlsym: cuInit - 0x7aadfc87cbc0
dlsym: cuDriverGetVersion - 0x7aadfc87cbe0
dlsym: cuDeviceGetCount - 0x7aadfc87cc20
dlsym: cuDeviceGet - 0x7aadfc87cc00
dlsym: cuDeviceGetAttribute - 0x7aadfc87cd00
dlsym: cuDeviceGetUuid - 0x7aadfc87cc60
dlsym: cuDeviceGetName - 0x7aadfc87cc40
dlsym: cuCtxCreate_v3 - 0x7aadfc87cee0
dlsym: cuMemGetInfo_v2 - 0x7aadfc886e20
dlsym: cuCtxDestroy - 0x7aadfc8e1850
calling cuInit
calling cuDriverGetVersion
raw version 0x2f08
CUDA driver version: 12.4
calling cuDeviceGetCount
device count 2
time=2025-02-26T21:37:34.608Z level=DEBUG source=gpu.go:125 msg="detected GPUs" count=2 library=/usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08
[GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] CUDA totalMem 24210 mb
[GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] CUDA freeMem 23819 mb
[GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] Compute Capability 8.9
[GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] CUDA totalMem 24210 mb
[GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] CUDA freeMem 23819 mb
[GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] Compute Capability 8.9
time=2025-02-26T21:37:34.739Z level=DEBUG source=amd_linux.go:419 msg="amdgpu driver not detected /sys/module/amdgpu"
releasing cuda driver library
time=2025-02-26T21:37:34.739Z level=INFO source=types.go:130 msg="inference compute" id=GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50 library=cuda variant=v12 compute=8.9 driver=12.4 name="NVIDIA GeForce RTX 4090" total="23.6 GiB" available="23.3 GiB"
time=2025-02-26T21:37:34.739Z level=INFO source=types.go:130 msg="inference compute" id=GPU-6da9f13b-9b65-b30a-fd59-910f358a7824 library=cuda variant=v12 compute=8.9 driver=12.4 name="NVIDIA GeForce RTX 4090" total="23.6 GiB" available="23.3 GiB"

OS

Docker

GPU

Nvidia

CPU

Intel

Ollama version

0.5.12

Originally created by @iganev on GitHub (Feb 27, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9382 ### What is the issue? Recently I noticed Ollama seemingly at random hanging on inference requests using `llama3.1:8b` and `8192` `num_ctx`, but I think this is also observable with the default `num_ctx` of `2048`. My setup is running in docker using 2x4090 GPUs. When the glitch occurs, the runner process gets stuck at 100% CPU usage and hangs indefinitely until the container is restarted. The system indicates it as a zombie process when this happens. Currently running 0.5.12, but this behaviour has been observed with the past few versions too. I enabled debugging to provide you with some useful logs, however the issue does not appear when debugging is enabled. I suppose its a quantum effect that requires an observer to behave as expected... could be race condition of some sort, not sure.. When debugging is stopped all I see in the logs are requests, that just stop at some point... ### Relevant log output ```shell 2025/02/26 21:37:33 routes.go:1205: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:true OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:2562047h47m16.854775807s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:1024 OLLAMA_MODELS:/root/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:2 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-02-26T21:37:33.709Z level=INFO source=images.go:432 msg="total blobs: 91" time=2025-02-26T21:37:33.711Z level=INFO source=images.go:439 msg="total unused blobs removed: 0" time=2025-02-26T21:37:33.711Z level=INFO source=routes.go:1256 msg="Listening on [::]:11434 (version 0.5.12)" time=2025-02-26T21:37:33.711Z level=DEBUG source=sched.go:106 msg="starting llm scheduler" time=2025-02-26T21:37:33.711Z level=INFO source=gpu.go:217 msg="looking for compatible GPUs" time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:98 msg="searching for GPU discovery libraries for NVIDIA" time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:501 msg="Searching for GPU library" name=libcuda.so* time=2025-02-26T21:37:33.715Z level=DEBUG source=gpu.go:525 msg="gpu library search" globs="[/usr/lib/ollama/libcuda.so* /usr/local/nvidia/lib/libcuda.so* /usr/local/nvidia/lib64/libcuda.so* /usr/local/cuda*/targets/*/lib/libcuda.so* /usr/lib/*-linux-gnu/nvidia/current/libcuda.so* /usr/lib/*-linux-gnu/libcuda.so* /usr/lib/wsl/lib/libcuda.so* /usr/lib/wsl/drivers/*/libcuda.so* /opt/cuda/lib*/libcuda.so* /usr/local/cuda/lib*/libcuda.so* /usr/lib*/libcuda.so* /usr/local/lib*/libcuda.so*]" time=2025-02-26T21:37:33.716Z level=DEBUG source=gpu.go:558 msg="discovered GPU libraries" paths=[/usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08] initializing /usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08 dlsym: cuInit - 0x7aadfc87cbc0 dlsym: cuDriverGetVersion - 0x7aadfc87cbe0 dlsym: cuDeviceGetCount - 0x7aadfc87cc20 dlsym: cuDeviceGet - 0x7aadfc87cc00 dlsym: cuDeviceGetAttribute - 0x7aadfc87cd00 dlsym: cuDeviceGetUuid - 0x7aadfc87cc60 dlsym: cuDeviceGetName - 0x7aadfc87cc40 dlsym: cuCtxCreate_v3 - 0x7aadfc87cee0 dlsym: cuMemGetInfo_v2 - 0x7aadfc886e20 dlsym: cuCtxDestroy - 0x7aadfc8e1850 calling cuInit calling cuDriverGetVersion raw version 0x2f08 CUDA driver version: 12.4 calling cuDeviceGetCount device count 2 time=2025-02-26T21:37:34.608Z level=DEBUG source=gpu.go:125 msg="detected GPUs" count=2 library=/usr/lib/x86_64-linux-gnu/libcuda.so.550.127.08 [GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] CUDA totalMem 24210 mb [GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] CUDA freeMem 23819 mb [GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50] Compute Capability 8.9 [GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] CUDA totalMem 24210 mb [GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] CUDA freeMem 23819 mb [GPU-6da9f13b-9b65-b30a-fd59-910f358a7824] Compute Capability 8.9 time=2025-02-26T21:37:34.739Z level=DEBUG source=amd_linux.go:419 msg="amdgpu driver not detected /sys/module/amdgpu" releasing cuda driver library time=2025-02-26T21:37:34.739Z level=INFO source=types.go:130 msg="inference compute" id=GPU-d419dbd5-adab-6e8b-e46b-4e45491c3e50 library=cuda variant=v12 compute=8.9 driver=12.4 name="NVIDIA GeForce RTX 4090" total="23.6 GiB" available="23.3 GiB" time=2025-02-26T21:37:34.739Z level=INFO source=types.go:130 msg="inference compute" id=GPU-6da9f13b-9b65-b30a-fd59-910f358a7824 library=cuda variant=v12 compute=8.9 driver=12.4 name="NVIDIA GeForce RTX 4090" total="23.6 GiB" available="23.3 GiB" ``` ### OS Docker ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.12
GiteaMirror added the bug label 2026-04-12 17:27:32 -05:00
Author
Owner

@iganev commented on GitHub (Feb 27, 2025):

Ok it glitched with debug logging enabled. But it took quite a while, for some reason. Something's up with the fancy context shifting strategy...

time=2025-02-27T00:20:05.540Z level=WARN source=types.go:512 msg="invalid option provided" option=num_gqa
time=2025-02-27T00:20:05.540Z level=WARN source=types.go:512 msg="invalid option provided" option=tfs_z
time=2025-02-27T00:20:05.540Z level=DEBUG source=sched.go:576 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29
time=2025-02-27T00:20:05.549Z level=DEBUG source=routes.go:1480 msg="chat request" images=0 prompt="<|start_header_id|>system<|end_header_id|>\n\nYou are a very helpful assistant that creates detailed and fact-based summaries of course materials. You will be given course material contents. Your goal is to generate a well-formulated summary that captures key aspects of the content. Your responses are in third person and contain only information available in the provided course material content. Do not introduce your responses, but instead only respond by a summary.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWrite a detailed summary of the course material of about 500 words that cover the key points and important aspects of the text in markdown format.\n\nCourse content:\nhis or her capacity as a public officer. Second, the public \nofficer must have been aware hoth that his or her condt1ct was unlawful and that it was likely \nto harm the plaintiff. What distingui£hcs one form of mi. fcus,mce in a public office (rum 1he \nother is 1he mrmaor in which the plainuff proves each ingredient of the ton. ln Category .\nB, \n1he pfaintiff most prove tht: 1wo ingredients of thu toT1 independently of one another. In \nCMcgory A, the fact that the public oCficcr has acted for I.he cxprc~,; purpose uf hnmling the \nplaintiff l suflicitnt 10 satisry en h ingrcoicnt or the 1011, owing to the fact that a public-\nofficer docs no1 hove 1he authority 10 e1<ercise his or her powers for on improper pu1posc, \nsuch us dc')ibcnucly harming n 1m:mbcr of tht public. ln each instance, the 10n involves \ndeliberate disregard of official duty coupled with knowledge that the misconduct is likely tu \ninjure the plnlnllff. \nAs a matter of policy, I do nol believe that it is necessary to place any further restrictions on \nthe arnbil of the tort. The requirement that the defendanl must have been aware that his or her \n240 See., for example, Powder Mounroin Resorts Lid. v. British Columbia, [2001] B.C.J. No. 2172, \n94 B.C.L.R. (3d) 14, 2001 BCCA 619; Granite Power Corp. v. Ontario, supro, n. 161; Alberta \n/Minister of \nPublic Works. Supply and Services) v. Nilsson, 12002] A.J. No. 1474, 220 D.L.R. \n(4th) 474, 2002 ABCA 283. Sec also, Three Rivers District Council v. Bank of \nEngland (No. 3), \n[2000) 2 W.L.R. 1220 (H.L.); Northern Territory af \nAJmrnli<J v. Mengel ( \n1995), I 29 A.L.R. I \nlH,C.); Garrell v. Allomey-Gentral, [l \n997) 2 N.Z.L.R. 332. \n241 Sr1pra, n. 66. See also Rodner. \"The Odhavji Decision: Old Ghosts and New Confusion in \nCanadian Couns\" (2005), 42 Alta. L. Rev. 1061. \n242 Od/JtJvji fatale, ibid., al paras. 55-60, for an interesting discussion of \"proximity\". \n134\nGovernmental Liability \n709 \nconduct was unlnwful reflects the wcll-esiahlishcd principle that misfeasance in a public \noffice requires an clement of 'bad faith' or 'ui~hon~ty' \n.243 \nThe reference to \"bad faith\" is provocative. Recall that in Anns, as in Home \nOffice v. Dorset Yacht Co. before it, the House of Lords indicated that a public \nauthority would lose its immunity for policy decisions if the plaintiff could \nprove that lhc action taken \"was nol wilhin lhe limits of a discretion bona fide \ncxercised\".244 Arguably, this is the best explana1ion for 1he Supreme Court's \ndecision in Kam/oops (Ciry) v Nielsen.245 It would be helpful for I\n.he Supreme \nCourt of Canada to consider this line of authority simultaneously with that of \nRoncarelli-Odhavji. Are they different or effectively identical? Perhaps the \nplaintiff can eliminate immunity in negligence without having to prove that the \npublic authority knew its action would harm the particular plaintiff (effectively a \nless demanding proximity test than in the intentional tort). But, does it make \nsense to have two different causes of action each of which is directed against \npublic authorities and based on bad faith? Does it make sense that it will be \nmuch easier to succeed in negligence than in the intentional tort? \nIt will also be helpful to clarify precisely how lhe necessary t.:lements of bad \nfaith and likelihood of harm are to be established. Odhavji appears to contem-\nplate a very demanding standard of deliberate wrongdoing. lacohucci J. held: \nThe statement of claim also alleges that the defendant officers and the Chief 'knew or ought \nto have known' that the alleged misconduct would cause the plaintiffs to suffer physically, \np£ychologically and emotionally. Although the allegation that the defondan1s knew that a \nfailure to cooperate with the investigation would injure the plaintiffs satisfies the requirement \nthat the alleged misconduct was likely to injure the plaintiffs, misfeasance in a public office \nis an intentional tort that requires subjective awareness that harm to the plaintiff is a likely \nconsequence of the alleged misconduct. At the very least, according to a number of cases. the \ndefendant must have been subjectively reckless or wilfully blind as to the possihility that \nharm was a likely consequence of the alleged misco11duct: see for example [Three Rivers, \nsupra, n. 240; Powder Mountai11 Resorrs, supra, n. 240; and Alberta (Minister of Public \nWorks, Supply and Services), .rnpra, n. 240]. This, again, is not a sufficient basis on which to \nstrike the pleading. It is clear, however, that the phrase 'or ought to have known' must be \nstruck from the statement of claim.246 \nHowever, as noted above, the Supreme Court appears to have adopted a more \nrelaxed standard in Finney v. Barreau du Quebec.241 Clearly, there is a need for \na cause of action that sanctions the deliberate abuse of power by public authori-\nties, and the action defined in Odhavji appears to meet that need. However, as \nsoon as \"bad faith\" is reduced to \"gross negligence\", experience with the gross \n243 Ibid., a1 parns. 22-23, 28. \n244 Anns, .\nt11pra, n. II, at 511, All E.R. Sec also Home Office v. Dorset Yacht Co. (1970). 2 All E.R. \n294, 01 332 (H.L.). \n245 Supra, n. 80. \n246 Odlwvji E.rwre, supra, n. 66, at para. 38 (emphasi~ in original). \n247 Supra, n. 35; sec also LC. v. British Columbia (Mi,1istry of Children and Families), supra, \nn. 127. \n135\n710 \nCanadian Tort Law \nnegligence standard in other branches of negligence law suggests the risk of the \nintentional tort collapsing into basic negligence. \nG. Conclusion \nSince the middle of the last century, the amhit of negligence liability for \nstatutory public authorities has ebbed and flowed. At times, the legislatures and \ncourts have adopted new principles and rules to expand or contract the ambit of \nliability. At other times, the principles have remained the same, but their \ninterpretation has varied dramatically from one period to another, and even from \ncase-to-case. The interpretation of the scope of immunity for policy decisions is \na case in point. Underlying this lack of certainty is a fundamental disagreement \namongst judges and scholars ab~ut what ought to be the appropriate scope of \nliability. \nA plaintiff wishing to bring a negligence act.ion against a public authority \nmust first determine whether the claim falls within a ca1cgory of case in which a \nduty has been previously recognized, or an analogous case. Thus far, the court \nhas given a very narrow definition of the categories it will recognize in public \nau1hori.ty litigation. If there is a pre-cxi ting recognition of duty, lhe court \nfollows the precedent. lf not, the court must consjder whether to recognize a \nnew duly of care following the two steps arising from the decision in Cooper v. \nHobart: 248 \n1. (a) Was there foreseeable harm to a foreseeable plaintiff? \n(b) Was there sufficient proximity be1wct!n lhe plaintiff and the public au-\nthority defendant? What precisely con titutes sufficient proximity re-\nmains to be developed. lt may be easier to establish proximity in a \npersonal injury case than in a case claiming the failure to have obtained \nan economic benefit. Proximity is a critical issue because the absence \nof proximity justifies dismissing the claim on a preliminary motion. \n2. \nEven if there exists sufficieni proximity, nrc there other reasons to deny \na duty of care? Typically, in public authority li1igation the specific con-\ncern is whether the act complained of is immune from negligence li-\nability because it was a bona fide discretim1ary policy decision. \nAlthough it may be done, increasingly courts are reluctant to resolve \nthe matter of \nimmunity on a preliminary motion. \nAssuming these hurdles are overcome, a duty of care will be recognized. It \nthen remains to satisfy the other elements of the negligence action. Special \nconsiderations may apply at the standard of care stage. \nThere is also an action available in intentional tort for deliberate abuse of \nauthority which may be relied upon more in lhe future. It remains to be deter-\nmined whether this is related to the loss of negligence immunity for bad faith \nexercise of discretion, and, if so, how. \n248 Supra, n. 1 I. \n136\nr, \n' \n• \n• \n,. \n' \n• \n' \n' \n•· \n' \n• \n• \n' \n• \n• \nA Manual \n. \nof Style .\nfor . \nContract \nDrafting \nSecond Edition \nKenneth A. Adams \n, \nI \nSccCianor \nSINESS LAW \n• . \n~Jo,llw...,._uwp \n.IB\\ \nDmnd°lllg Ubelty \nl'lmuing lustlce \n137\neselect it, \nthey will \nBut if you \nocument, \n:s of text \nyou take \n11 remain \n·ormat As \nuce curly \n've typed \nmd curly \npograph-\n. contract \n!ID to get \n·acts that \nt mixing \ni:k of the \n~wer will \n·r, poten-\nrly, given \nnal writ-\nuotation \n:ion that \nirks into \ntr quota-\ns option \nstraight \nunction, \nLd what\" \nor single \nC \nH \nA \np \nT \nE \nR 16 \nDRAFTING AS WRITING \n16.1 \nContract prose may be limited and stylized, but clear and \nefficient drafting nevertheless requires a decent grasp of \ngeneral principles of good writing. This chapter considers \nthose that are most relevant to the contract drafter \n. \nDON'T MAKE SENTENCES TOO LONG \n16.2 \n16.3 \n16.4 \nIn general, long sentences are harder to read than shorter \nones. Although contract sentences will usually be longer-\noften much \nlonger-than the 20 to 25 words recommended \nfor general legal writing, you should whittle down those \nsentences that are unnecessarily long. \n• \nA sentence is too long if it strings together clauses that \ncould stand on their own as separate sentences, or if it \nhas one or more unwieldy exceptions, qualifications, or \nconditions grafted on. If you can break such a sentence \ndown into its constituent components and express, clearly \nand economically, how the components relate to each \nother, the sentence will be more readable. \nBelow is a 143-word sentence; below that is the same \nsentence, restructured as three sentences (149 words total). \nAlthough it's a few words longer, the \"after\" version takes \nmuch less of a toll on the reader than the \"before\" version. \nThe first shaded portion in the \"before\" version constitutes \nthe first sentence of the \"after\" version. The second shaded \nportion in the \"before\" version is an awkwardly positioned, \npassive-voice nonrestrictive clause; it forms the basis for \nthe active-voice third sentence of the \"after\" version. The \nunshaded portion of the \"before\" version constitutes, with \nthe addition of a brief introductory clause, the second \nsentence of the \"after\" version; it, like the first shaded \nportion, describes a consequence of default, but it can be \nturned into a separate sentence. \n359 \n138\n360 \n• \nA MANUAL OF STYLE FOR CONTRACT DRAFTING \nBefore If a Default described in section _\nS(f) occyrs with \nrespect to. \nthe Borrower,,the Lenders'.,o):,ligation· \nto make \nLoans andi the\n0\n.LC Issuer's obligatjon\n~to_\ni _\nssue~\nFadlity LCs \nwill -a\n_\nut9C!i'_\nap~l!y , t;/mi,ri\n.,\nai~ ---a[\"l\n_\na ~t~~;~ g!L\nga~o'ns > \nwil! \nimm.e_\ndiateli bec9ro,e-''d_\nue1-withouf '.aj v'el~!?.tkf\n-a~on \non the pa1t,9f_!t!_~,.ad.nt\nL~~~~.,4tj§.,l.\n'0;Js'\n! Htr°\n,,.91 \na~Y: ~en,_\nd~ and the Borrower will become unconditionally \nobligated, without any further notice or act, to pay to the \nAdministrative Agent an amount in immediately available \nfunds, w.t:il<;b_\nf~r1,c!~,-~u~tl:>.\n~!!:t~Je]!L~h.e..l:~~!!ID'.Jf\n,,.\nf9!!<l.ter!l.! \nA1:c91J!11,_ \nequal to the difference of (1) the LC Obligations \nthen outstanding minus (2) the amount then on deposit in \nthe Facility LC Collateral Account that is free and clear of all \nrights and claims of third parties and has not been applied \nagainst the Obligations (that difference, the \"Collateral \nShortfall Amount\"). \nAfter If a Default described in section 8{f) occurs with \nrespect to the Borrower, the Lenders' obligation to make \nLoans and the LC Issuer's obligation to issue Facility LCs will \nterminate and the Obligations will immediately become \ndue without any election or action on the<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
time=2025-02-27T00:20:05.558Z level=DEBUG source=cache.go:104 msg="loading cache slot" id=0 cache=3716 prompt=3328 used=116 remaining=3212
time=2025-02-27T00:20:46.862Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:21:23.707Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:22:00.079Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:22:36.430Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:23:12.722Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:23:49.034Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:24:25.369Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:25:01.860Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:25:38.221Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:26:14.763Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:26:51.262Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:27:27.621Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:28:04.009Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:28:40.585Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:29:17.527Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:29:54.452Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:30:30.898Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:31:07.216Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:31:43.563Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:32:20.256Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:32:57.201Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:33:34.125Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:34:10.997Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:34:47.873Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:35:24.461Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:36:00.917Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:36:37.875Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:37:14.791Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:37:51.730Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:38:28.648Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:39:05.522Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093
time=2025-02-27T00:39:42.413Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093

... and so on ...

<!-- gh-comment-id:2686524322 --> @iganev commented on GitHub (Feb 27, 2025): Ok it glitched **with** debug logging enabled. But it took quite a while, for some reason. Something's up with the fancy context shifting strategy... ``` time=2025-02-27T00:20:05.540Z level=WARN source=types.go:512 msg="invalid option provided" option=num_gqa time=2025-02-27T00:20:05.540Z level=WARN source=types.go:512 msg="invalid option provided" option=tfs_z time=2025-02-27T00:20:05.540Z level=DEBUG source=sched.go:576 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29 time=2025-02-27T00:20:05.549Z level=DEBUG source=routes.go:1480 msg="chat request" images=0 prompt="<|start_header_id|>system<|end_header_id|>\n\nYou are a very helpful assistant that creates detailed and fact-based summaries of course materials. You will be given course material contents. Your goal is to generate a well-formulated summary that captures key aspects of the content. Your responses are in third person and contain only information available in the provided course material content. Do not introduce your responses, but instead only respond by a summary.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWrite a detailed summary of the course material of about 500 words that cover the key points and important aspects of the text in markdown format.\n\nCourse content:\nhis or her capacity as a public officer. Second, the public \nofficer must have been aware hoth that his or her condt1ct was unlawful and that it was likely \nto harm the plaintiff. What distingui£hcs one form of mi. fcus,mce in a public office (rum 1he \nother is 1he mrmaor in which the plainuff proves each ingredient of the ton. ln Category .\nB, \n1he pfaintiff most prove tht: 1wo ingredients of thu toT1 independently of one another. In \nCMcgory A, the fact that the public oCficcr has acted for I.he cxprc~,; purpose uf hnmling the \nplaintiff l suflicitnt 10 satisry en h ingrcoicnt or the 1011, owing to the fact that a public-\nofficer docs no1 hove 1he authority 10 e1<ercise his or her powers for on improper pu1posc, \nsuch us dc')ibcnucly harming n 1m:mbcr of tht public. ln each instance, the 10n involves \ndeliberate disregard of official duty coupled with knowledge that the misconduct is likely tu \ninjure the plnlnllff. \nAs a matter of policy, I do nol believe that it is necessary to place any further restrictions on \nthe arnbil of the tort. The requirement that the defendanl must have been aware that his or her \n240 See., for example, Powder Mounroin Resorts Lid. v. British Columbia, [2001] B.C.J. No. 2172, \n94 B.C.L.R. (3d) 14, 2001 BCCA 619; Granite Power Corp. v. Ontario, supro, n. 161; Alberta \n/Minister of \nPublic Works. Supply and Services) v. Nilsson, 12002] A.J. No. 1474, 220 D.L.R. \n(4th) 474, 2002 ABCA 283. Sec also, Three Rivers District Council v. Bank of \nEngland (No. 3), \n[2000) 2 W.L.R. 1220 (H.L.); Northern Territory af \nAJmrnli<J v. Mengel ( \n1995), I 29 A.L.R. I \nlH,C.); Garrell v. Allomey-Gentral, [l \n997) 2 N.Z.L.R. 332. \n241 Sr1pra, n. 66. See also Rodner. \"The Odhavji Decision: Old Ghosts and New Confusion in \nCanadian Couns\" (2005), 42 Alta. L. Rev. 1061. \n242 Od/JtJvji fatale, ibid., al paras. 55-60, for an interesting discussion of \"proximity\". \n134\nGovernmental Liability \n709 \nconduct was unlnwful reflects the wcll-esiahlishcd principle that misfeasance in a public \noffice requires an clement of 'bad faith' or 'ui~hon~ty' \n.243 \nThe reference to \"bad faith\" is provocative. Recall that in Anns, as in Home \nOffice v. Dorset Yacht Co. before it, the House of Lords indicated that a public \nauthority would lose its immunity for policy decisions if the plaintiff could \nprove that lhc action taken \"was nol wilhin lhe limits of a discretion bona fide \ncxercised\".244 Arguably, this is the best explana1ion for 1he Supreme Court's \ndecision in Kam/oops (Ciry) v Nielsen.245 It would be helpful for I\n.he Supreme \nCourt of Canada to consider this line of authority simultaneously with that of \nRoncarelli-Odhavji. Are they different or effectively identical? Perhaps the \nplaintiff can eliminate immunity in negligence without having to prove that the \npublic authority knew its action would harm the particular plaintiff (effectively a \nless demanding proximity test than in the intentional tort). But, does it make \nsense to have two different causes of action each of which is directed against \npublic authorities and based on bad faith? Does it make sense that it will be \nmuch easier to succeed in negligence than in the intentional tort? \nIt will also be helpful to clarify precisely how lhe necessary t.:lements of bad \nfaith and likelihood of harm are to be established. Odhavji appears to contem-\nplate a very demanding standard of deliberate wrongdoing. lacohucci J. held: \nThe statement of claim also alleges that the defendant officers and the Chief 'knew or ought \nto have known' that the alleged misconduct would cause the plaintiffs to suffer physically, \np£ychologically and emotionally. Although the allegation that the defondan1s knew that a \nfailure to cooperate with the investigation would injure the plaintiffs satisfies the requirement \nthat the alleged misconduct was likely to injure the plaintiffs, misfeasance in a public office \nis an intentional tort that requires subjective awareness that harm to the plaintiff is a likely \nconsequence of the alleged misconduct. At the very least, according to a number of cases. the \ndefendant must have been subjectively reckless or wilfully blind as to the possihility that \nharm was a likely consequence of the alleged misco11duct: see for example [Three Rivers, \nsupra, n. 240; Powder Mountai11 Resorrs, supra, n. 240; and Alberta (Minister of Public \nWorks, Supply and Services), .rnpra, n. 240]. This, again, is not a sufficient basis on which to \nstrike the pleading. It is clear, however, that the phrase 'or ought to have known' must be \nstruck from the statement of claim.246 \nHowever, as noted above, the Supreme Court appears to have adopted a more \nrelaxed standard in Finney v. Barreau du Quebec.241 Clearly, there is a need for \na cause of action that sanctions the deliberate abuse of power by public authori-\nties, and the action defined in Odhavji appears to meet that need. However, as \nsoon as \"bad faith\" is reduced to \"gross negligence\", experience with the gross \n243 Ibid., a1 parns. 22-23, 28. \n244 Anns, .\nt11pra, n. II, at 511, All E.R. Sec also Home Office v. Dorset Yacht Co. (1970). 2 All E.R. \n294, 01 332 (H.L.). \n245 Supra, n. 80. \n246 Odlwvji E.rwre, supra, n. 66, at para. 38 (emphasi~ in original). \n247 Supra, n. 35; sec also LC. v. British Columbia (Mi,1istry of Children and Families), supra, \nn. 127. \n135\n710 \nCanadian Tort Law \nnegligence standard in other branches of negligence law suggests the risk of the \nintentional tort collapsing into basic negligence. \nG. Conclusion \nSince the middle of the last century, the amhit of negligence liability for \nstatutory public authorities has ebbed and flowed. At times, the legislatures and \ncourts have adopted new principles and rules to expand or contract the ambit of \nliability. At other times, the principles have remained the same, but their \ninterpretation has varied dramatically from one period to another, and even from \ncase-to-case. The interpretation of the scope of immunity for policy decisions is \na case in point. Underlying this lack of certainty is a fundamental disagreement \namongst judges and scholars ab~ut what ought to be the appropriate scope of \nliability. \nA plaintiff wishing to bring a negligence act.ion against a public authority \nmust first determine whether the claim falls within a ca1cgory of case in which a \nduty has been previously recognized, or an analogous case. Thus far, the court \nhas given a very narrow definition of the categories it will recognize in public \nau1hori.ty litigation. If there is a pre-cxi ting recognition of duty, lhe court \nfollows the precedent. lf not, the court must consjder whether to recognize a \nnew duly of care following the two steps arising from the decision in Cooper v. \nHobart: 248 \n1. (a) Was there foreseeable harm to a foreseeable plaintiff? \n(b) Was there sufficient proximity be1wct!n lhe plaintiff and the public au-\nthority defendant? What precisely con titutes sufficient proximity re-\nmains to be developed. lt may be easier to establish proximity in a \npersonal injury case than in a case claiming the failure to have obtained \nan economic benefit. Proximity is a critical issue because the absence \nof proximity justifies dismissing the claim on a preliminary motion. \n2. \nEven if there exists sufficieni proximity, nrc there other reasons to deny \na duty of care? Typically, in public authority li1igation the specific con-\ncern is whether the act complained of is immune from negligence li-\nability because it was a bona fide discretim1ary policy decision. \nAlthough it may be done, increasingly courts are reluctant to resolve \nthe matter of \nimmunity on a preliminary motion. \nAssuming these hurdles are overcome, a duty of care will be recognized. It \nthen remains to satisfy the other elements of the negligence action. Special \nconsiderations may apply at the standard of care stage. \nThere is also an action available in intentional tort for deliberate abuse of \nauthority which may be relied upon more in lhe future. It remains to be deter-\nmined whether this is related to the loss of negligence immunity for bad faith \nexercise of discretion, and, if so, how. \n248 Supra, n. 1 I. \n136\nr, \n' \n• \n• \n,. \n' \n• \n' \n' \n•· \n' \n• \n• \n' \n• \n• \nA Manual \n. \nof Style .\nfor . \nContract \nDrafting \nSecond Edition \nKenneth A. Adams \n, \nI \nSccCianor \nSINESS LAW \n• . \n~Jo,llw...,._uwp \n.IB\\ \nDmnd°lllg Ubelty \nl'lmuing lustlce \n137\neselect it, \nthey will \nBut if you \nocument, \n:s of text \nyou take \n11 remain \n·ormat As \nuce curly \n've typed \nmd curly \npograph-\n. contract \n!ID to get \n·acts that \nt mixing \ni:k of the \n~wer will \n·r, poten-\nrly, given \nnal writ-\nuotation \n:ion that \nirks into \ntr quota-\ns option \nstraight \nunction, \nLd what\" \nor single \nC \nH \nA \np \nT \nE \nR 16 \nDRAFTING AS WRITING \n16.1 \nContract prose may be limited and stylized, but clear and \nefficient drafting nevertheless requires a decent grasp of \ngeneral principles of good writing. This chapter considers \nthose that are most relevant to the contract drafter \n. \nDON'T MAKE SENTENCES TOO LONG \n16.2 \n16.3 \n16.4 \nIn general, long sentences are harder to read than shorter \nones. Although contract sentences will usually be longer-\noften much \nlonger-than the 20 to 25 words recommended \nfor general legal writing, you should whittle down those \nsentences that are unnecessarily long. \n• \nA sentence is too long if it strings together clauses that \ncould stand on their own as separate sentences, or if it \nhas one or more unwieldy exceptions, qualifications, or \nconditions grafted on. If you can break such a sentence \ndown into its constituent components and express, clearly \nand economically, how the components relate to each \nother, the sentence will be more readable. \nBelow is a 143-word sentence; below that is the same \nsentence, restructured as three sentences (149 words total). \nAlthough it's a few words longer, the \"after\" version takes \nmuch less of a toll on the reader than the \"before\" version. \nThe first shaded portion in the \"before\" version constitutes \nthe first sentence of the \"after\" version. The second shaded \nportion in the \"before\" version is an awkwardly positioned, \npassive-voice nonrestrictive clause; it forms the basis for \nthe active-voice third sentence of the \"after\" version. The \nunshaded portion of the \"before\" version constitutes, with \nthe addition of a brief introductory clause, the second \nsentence of the \"after\" version; it, like the first shaded \nportion, describes a consequence of default, but it can be \nturned into a separate sentence. \n359 \n138\n360 \n• \nA MANUAL OF STYLE FOR CONTRACT DRAFTING \nBefore If a Default described in section _\nS(f) occyrs with \nrespect to. \nthe Borrower,,the Lenders'.,o):,ligation· \nto make \nLoans andi the\n0\n.LC Issuer's obligatjon\n~to_\ni _\nssue~\nFadlity LCs \nwill -a\n_\nut9C!i'_\nap~l!y , t;/mi,ri\n.,\nai~ ---a[\"l\n_\na ~t~~;~ g!L\nga~o'ns > \nwil! \nimm.e_\ndiateli bec9ro,e-''d_\nue1-withouf '.aj v'el~!?.tkf\n-a~on \non the pa1t,9f_!t!_~,.ad.nt\nL~~~~.,4tj§.,l.\n'0;Js'\n! Htr°\n,,.91 \na~Y: ~en,_\nd~ and the Borrower will become unconditionally \nobligated, without any further notice or act, to pay to the \nAdministrative Agent an amount in immediately available \nfunds, w.t:il<;b_\nf~r1,c!~,-~u~tl:>.\n~!!:t~Je]!L~h.e..l:~~!!ID'.Jf\n,,.\nf9!!<l.ter!l.! \nA1:c91J!11,_ \nequal to the difference of (1) the LC Obligations \nthen outstanding minus (2) the amount then on deposit in \nthe Facility LC Collateral Account that is free and clear of all \nrights and claims of third parties and has not been applied \nagainst the Obligations (that difference, the \"Collateral \nShortfall Amount\"). \nAfter If a Default described in section 8{f) occurs with \nrespect to the Borrower, the Lenders' obligation to make \nLoans and the LC Issuer's obligation to issue Facility LCs will \nterminate and the Obligations will immediately become \ndue without any election or action on the<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" time=2025-02-27T00:20:05.558Z level=DEBUG source=cache.go:104 msg="loading cache slot" id=0 cache=3716 prompt=3328 used=116 remaining=3212 time=2025-02-27T00:20:46.862Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:21:23.707Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:22:00.079Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:22:36.430Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:23:12.722Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:23:49.034Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:24:25.369Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:25:01.860Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:25:38.221Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:26:14.763Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:26:51.262Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:27:27.621Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:28:04.009Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:28:40.585Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:29:17.527Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:29:54.452Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:30:30.898Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:31:07.216Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:31:43.563Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:32:20.256Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:32:57.201Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:33:34.125Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:34:10.997Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:34:47.873Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:35:24.461Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:36:00.917Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:36:37.875Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:37:14.791Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:37:51.730Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:38:28.648Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:39:05.522Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 time=2025-02-27T00:39:42.413Z level=DEBUG source=cache.go:231 msg="context limit hit - shifting" id=0 limit=8192 input=8192 keep=5 discard=4093 ... and so on ... ```
Author
Owner

@rick-github commented on GitHub (Feb 27, 2025):

The model has lost coherence and is rambling. Set num_predict to make it exit this state.

https://github.com/ollama/ollama/issues/9070#issuecomment-2656951572

<!-- gh-comment-id:2686539693 --> @rick-github commented on GitHub (Feb 27, 2025): The model has lost coherence and is rambling. Set `num_predict` to make it exit this state. https://github.com/ollama/ollama/issues/9070#issuecomment-2656951572
Author
Owner

@iganev commented on GitHub (Feb 27, 2025):

Testing. Will report back, but sure seems like this is it. Thank you!

<!-- gh-comment-id:2686565120 --> @iganev commented on GitHub (Feb 27, 2025): Testing. Will report back, but sure seems like this is it. Thank you!
Author
Owner

@iganev commented on GitHub (Feb 27, 2025):

That seems to have solved the issue. I will be closing this for the time being. Thank you!

<!-- gh-comment-id:2688188694 --> @iganev commented on GitHub (Feb 27, 2025): That seems to have solved the issue. I will be closing this for the time being. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6122