[{"data":1,"prerenderedAt":1529},["ShallowReactive",2],{"blog-post-lfm3-ollama-tool-calling-agent-setup":3,"related-posts-lfm3-ollama-tool-calling-agent-setup":1504},{"id":4,"title":5,"author":6,"body":11,"category":1481,"date":1482,"description":1483,"extension":1484,"featured":1485,"hideToc":1485,"image":1486,"imageAlt":1487,"imageHeight":1487,"imageWidth":1487,"itemList":1487,"lang":1487,"meta":1488,"navigation":1489,"noindex":1485,"path":1490,"readingTime":1491,"redirected":1485,"relatedSlugs":1487,"seo":1492,"seoTitle":1493,"stem":1494,"subtitle":1487,"tags":1495,"updatedDate":1482,"__hash__":1503},"blog/blog/lfm3-ollama-tool-calling-agent-setup.md","LFM3 on Ollama: Setup, Tool Calling and Agent Fixes",{"name":7,"role":8,"avatar":9,"bio":10},"Shabnam Katoch","Growth Head","/img/avatars/shabnam-profile.jpeg","Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.",{"type":12,"value":13,"toc":1459},"minimark",[14,18,30,33,45,48,53,56,59,66,170,179,182,185,188,192,199,202,209,212,275,285,293,299,310,328,337,341,344,448,455,462,468,526,533,536,542,545,548,571,575,585,663,666,672,691,697,700,713,718,725,732,735,744,748,754,760,765,771,777,787,791,808,811,834,840,848,854,875,885,889,900,923,927,932,941,947,959,963,971,977,1116,1119,1122,1128,1132,1135,1155,1158,1337,1340,1343,1351,1354,1362,1381,1385,1389,1395,1399,1411,1415,1431,1435,1438,1442,1445,1449,1455],[15,16,17],"p",{},"Which LFM3 tag to pull, how much memory it needs, and what to do when your agent sees no tool calls.",[15,19,20,21,25,26,29],{},"LFM3 on Ollama works, tool calling included. Update to Ollama v0.40.13 or later, run ",[22,23,24],"code",{},"ollama pull lfm3",", and you get Liquid AI's 1.7B text model: a 1.1 GB download with a 256K context window. In our test on v0.40.14, Ollama turned LFM3's XML tool calls into normal ",[22,27,28],{},"tool_calls"," JSON, so agents saw them.",[15,31,32],{},"Picture this. It's 2 AM, your local agent has a fresh 1.7B model loaded, and you ask for the weather in Paris.",[15,34,35,36,39,40,44],{},"The reply comes back empty. No tool call, no error, just a blank ",[22,37,38],{},"content"," field and a model that clearly ",[41,42,43],"em",{},"tried",".",[15,46,47],{},"We got that exact reply on 3 November 2026 by feeding LFM3 its tools the wrong way. So we installed it, broke it on purpose and fixed it.",[49,50,52],"h2",{"id":51},"what-is-lfm3-and-why-should-an-agent-builder-care","What is LFM3, and why should an agent builder care?",[15,54,55],{},"LFM3 is Liquid AI's family of small open-weight models, announced on 27 October 2026. All six branch from LFM3-1.7B-Base, pre-trained on 22T tokens: text, vision, audio and omni models, plus two decision models.",[15,57,58],{},"When people say \"LFM3\", they usually mean the text model, LFM3-1.7B. Its model card says it was post-trained for agent frameworks such as Hermes Agent, Pi and OpenClaw.",[15,60,61,62,65],{},"That's what got our attention. Most small models merely accept a ",[22,63,64],{},"tools"," array. This one was trained for the job.",[67,68,69,91],"table",{},[70,71,72],"thead",{},[73,74,75,79,82,85,88],"tr",{},[76,77,78],"th",{},"Model",[76,80,81],{},"Parameters",[76,83,84],{},"Context (model card)",[76,86,87],{},"Inputs",[76,89,90],{},"Ollama name",[92,93,94,114,133,152],"tbody",{},[73,95,96,100,103,106,109],{},[97,98,99],"td",{},"LFM3-1.7B",[97,101,102],{},"1.73B",[97,104,105],{},"256K",[97,107,108],{},"Text",[97,110,111],{},[22,112,113],{},"lfm3",[73,115,116,119,122,125,128],{},[97,117,118],{},"LFM3-VL-2B",[97,120,121],{},"1.92B",[97,123,124],{},"128K",[97,126,127],{},"Text, images, video",[97,129,130],{},[22,131,132],{},"lfm3-vl",[73,134,135,138,141,144,147],{},[97,136,137],{},"LFM3-Audio-2B",[97,139,140],{},"2B",[97,142,143],{},"32K",[97,145,146],{},"Text, audio",[97,148,149],{},[22,150,151],{},"lfm3-audio",[73,153,154,157,160,162,165],{},[97,155,156],{},"LFM3-Omni-2B",[97,158,159],{},"2.17B",[97,161,143],{},[97,163,164],{},"Text, images, video, audio",[97,166,167],{},[22,168,169],{},"lfm3-omni",[15,171,172,173,175,176,178],{},"One catch: on 3 November, the Input column on Ollama's tag lists showed no audio for ",[22,174,151],{}," or ",[22,177,169],{},", so test audio first.",[15,180,181],{},"Liquid AI is also honest about the ceiling: the text model is \"not recommended for agentic coding or complex multi-step reasoning due to its small size.\"",[15,183,184],{},"Under the hood, the text model has 24 layers: 13 gated short convolutions, 5 sliding-window attention layers and 6 global attention layers.",[15,186,187],{},"The licence, LFM Open License v1.0, allows commercial use while your company's annual revenue stays under $10 million.",[49,189,191],{"id":190},"running-lfm3-on-ollama-takes-four-commands-and-one-version-check","Running LFM3 on Ollama takes four commands (and one version check)",[15,193,194,195,198],{},"Ollama added LFM3 in v0.40.12 (tagged 27 October) and fixed its GGUF builds in v0.40.13 (28 October), per the tagged commits in Ollama's GitHub repository. On Linux and Windows, v0.40.13 is the real minimum: ",[22,196,197],{},"ollama show lfm3"," prints \"requires 0.40.13\".",[15,200,201],{},"Liquid AI's GGUF card lists v0.40.12 for macOS. We tested on v0.40.14 (2 November); v0.40.15 has since shipped.",[15,203,204],{},[205,206],"img",{"alt":207,"src":208},"Four steps to run LFM3 on Ollama: check version, update, pull lfm3, confirm renderer and parser lines","/img/blog/lfm3-ollama-tool-calling-agent-setup-four-commands.jpg",[15,210,211],{},"Check your version, update (on Linux the install script upgrades too), then pull:",[213,214,219],"pre",{"className":215,"code":216,"language":217,"meta":218,"style":218},"language-bash shiki shiki-themes github-light","ollama --version\ncurl -fsSL https://ollama.com/install.sh | sh\nollama pull lfm3\nollama show lfm3\n","bash","",[22,220,221,234,254,265],{"__ignoreMap":218},[222,223,226,230],"span",{"class":224,"line":225},"line",1,[222,227,229],{"class":228},"s7eDp","ollama",[222,231,233],{"class":232},"sYu0t"," --version\n",[222,235,237,240,243,247,251],{"class":224,"line":236},2,[222,238,239],{"class":228},"curl",[222,241,242],{"class":232}," -fsSL",[222,244,246],{"class":245},"sYBdl"," https://ollama.com/install.sh",[222,248,250],{"class":249},"sD7c4"," |",[222,252,253],{"class":228}," sh\n",[222,255,257,259,262],{"class":224,"line":256},3,[222,258,229],{"class":228},[222,260,261],{"class":245}," pull",[222,263,264],{"class":245}," lfm3\n",[222,266,268,270,273],{"class":224,"line":267},4,[222,269,229],{"class":228},[222,271,272],{"class":245}," show",[222,274,264],{"class":245},[15,276,277,278,280,281,284],{},"On our Linux machine, ",[22,279,113],{}," resolved to the 1.1 GB Q4_K_M build, and ",[22,282,283],{},"ollama show"," printed (trimmed):",[213,286,291],{"className":287,"code":289,"language":290,"meta":218},[288],"language-text","    requires            0.40.13\n    renderer            lfm3\n    parser              lfm3\n  Capabilities\n    completion\n    tools\n    thinking\n","text",[22,292,289],{"__ignoreMap":218},[15,294,295,296,298],{},"This is where most people get it wrong. They see ",[22,297,64],{}," under Capabilities and move on.",[15,300,301,302,305,306,309],{},"The lines that matter are ",[22,303,304],{},"renderer lfm3"," and ",[22,307,308],{},"parser lfm3",": Ollama's own LFM3 code formats prompts and reads output, and that code is why tool calling works. Then send a first prompt:",[213,311,313],{"className":215,"code":312,"language":217,"meta":218,"style":218},"ollama run lfm3 \"Summarise what a heat pump does in two sentences.\"\n",[22,314,315],{"__ignoreMap":218},[222,316,317,319,322,325],{"class":224,"line":225},[222,318,229],{"class":228},[222,320,321],{"class":245}," run",[222,323,324],{"class":245}," lfm3",[222,326,327],{"class":245}," \"Summarise what a heat pump does in two sentences.\"\n",[15,329,330,331,336],{},"Still choosing a local runner? Our ",[332,333,335],"a",{"href":334},"/blog/ollama-vs-lm-studio","Ollama vs LM Studio comparison"," covers the trade-offs.",[49,338,340],{"id":339},"how-much-memory-lfm3-needs-from-4k-to-the-full-256k","How much memory LFM3 needs, from 4K to the full 256K",[15,342,343],{},"Liquid AI says the text model \"takes about 1 GB of memory\" at 4-bit. Download sizes from Ollama's tag list:",[67,345,346,359],{},[70,347,348],{},[73,349,350,353,356],{},[76,351,352],{},"Tag",[76,354,355],{},"Format",[76,357,358],{},"Download",[92,360,361,377,390,403,416,429],{},[73,362,363,371,374],{},[97,364,365,367,368],{},[22,366,113],{}," / ",[22,369,370],{},"lfm3:1.7b",[97,372,373],{},"Default, resolves per platform",[97,375,376],{},"1.1 GB to 1.7 GB",[73,378,379,384,387],{},[97,380,381],{},[22,382,383],{},"lfm3:1.7b-qad-q4_0",[97,385,386],{},"GGUF 4-bit, quantization-aware distillation",[97,388,389],{},"1.0 GB",[73,391,392,397,400],{},[97,393,394],{},[22,395,396],{},"lfm3:1.7b-q4_K_M",[97,398,399],{},"GGUF 4-bit",[97,401,402],{},"1.1 GB",[73,404,405,410,413],{},[97,406,407],{},[22,408,409],{},"lfm3:1.7b-q8_0",[97,411,412],{},"GGUF 8-bit",[97,414,415],{},"1.8 GB",[73,417,418,423,426],{},[97,419,420],{},[22,421,422],{},"lfm3:1.7b-bf16",[97,424,425],{},"GGUF full precision",[97,427,428],{},"3.5 GB",[73,430,431,442,445],{},[97,432,433,367,436,367,439],{},[22,434,435],{},"nvfp4",[22,437,438],{},"mxfp8",[22,440,441],{},"mlx-bf16",[97,443,444],{},"MLX, Apple Silicon",[97,446,447],{},"1.7 / 2.1 / 3.5 GB",[15,449,450,451,454],{},"The ",[22,452,453],{},"qad-q4_0"," build, per Liquid AI's GGUF card, \"was trained to recover the accuracy lost to Q4_0 quantization.\" On a small device, try that one first.",[15,456,457,458,461],{},"Context costs memory too. We loaded the default Q4_K_M build at five context sizes and read ",[22,459,460],{},"ollama ps"," (Linux, CPU only).",[15,463,464],{},[205,465],{"alt":466,"src":467},"LFM3 memory use on Ollama by context size, from 1.4 GB at 4K to 2.7 GB at 256K","/img/blog/lfm3-ollama-tool-calling-agent-setup-memory-by-context.jpg",[67,469,470,484],{},[70,471,472],{},[73,473,474,481],{},[76,475,476,477,480],{},"Context (",[22,478,479],{},"num_ctx",")",[76,482,483],{},"Memory in use",[92,485,486,494,502,510,518],{},[73,487,488,491],{},[97,489,490],{},"4,096 (Ollama default under 24 GiB VRAM)",[97,492,493],{},"1.4 GB",[73,495,496,499],{},[97,497,498],{},"32,768",[97,500,501],{},"1.5 GB",[73,503,504,507],{},[97,505,506],{},"65,536",[97,508,509],{},"1.9 GB",[73,511,512,515],{},[97,513,514],{},"131,072",[97,516,517],{},"2.2 GB",[73,519,520,523],{},[97,521,522],{},"262,144 (full 256K)",[97,524,525],{},"2.7 GB",[15,527,528,529],{},"Here's the weird part. ",[530,531,532],"strong",{},"The full 256K window fit in under 3 GB.",[15,534,535],{},"That lines up with Liquid AI's design. Only the 6 global attention layers see the whole context, and the sliding-window layers use a 256-token window.",[537,538,539],"blockquote",{},[15,540,541],{},"On LFM3, context is cheap. Going from Ollama's 4K default to the full 256K cost us 1.3 GB, not a new GPU.",[15,543,544],{},"On our 2-vCPU machine with no GPU, generation ran at roughly 9 to 10 tokens per second. Treat that as a floor, not a benchmark.",[15,546,547],{},"Agents need far more than the 4K default. Ollama's docs recommend at least 64,000 tokens for agents and coding tools:",[213,549,551],{"className":215,"code":550,"language":217,"meta":218,"style":218},"OLLAMA_CONTEXT_LENGTH=65536 ollama serve\n",[22,552,553],{"__ignoreMap":218},[222,554,555,559,562,565,568],{"class":224,"line":225},[222,556,558],{"class":557},"sgsFI","OLLAMA_CONTEXT_LENGTH",[222,560,561],{"class":249},"=",[222,563,564],{"class":245},"65536",[222,566,567],{"class":228}," ollama",[222,569,570],{"class":245}," serve\n",[49,572,574],{"id":573},"does-lfm3-on-ollama-actually-call-tools-we-tested-it","Does LFM3 on Ollama actually call tools? We tested it",[15,576,577,578,580,581,584],{},"Yes. On v0.40.14 with the default ",[22,579,113],{}," tag, the native ",[22,582,583],{},"/api/chat"," endpoint returned a proper structured tool call. Here is the exact request:",[213,586,588],{"className":215,"code":587,"language":217,"meta":218,"style":218},"curl -s http://localhost:11434/api/chat -d '{\n  \"model\": \"lfm3\",\n  \"stream\": false,\n  \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Paris right now?\"}],\n  \"tools\": [{\"type\": \"function\", \"function\": {\n    \"name\": \"get_weather\",\n    \"description\": \"Get the current weather for a city\",\n    \"parameters\": {\"type\": \"object\",\n      \"properties\": {\"city\": {\"type\": \"string\", \"description\": \"City name\"}},\n      \"required\": [\"city\"]}}}]\n}'\n",[22,589,590,606,611,616,621,627,633,639,645,651,657],{"__ignoreMap":218},[222,591,592,594,597,600,603],{"class":224,"line":225},[222,593,239],{"class":228},[222,595,596],{"class":232}," -s",[222,598,599],{"class":245}," http://localhost:11434/api/chat",[222,601,602],{"class":232}," -d",[222,604,605],{"class":245}," '{\n",[222,607,608],{"class":224,"line":236},[222,609,610],{"class":245},"  \"model\": \"lfm3\",\n",[222,612,613],{"class":224,"line":256},[222,614,615],{"class":245},"  \"stream\": false,\n",[222,617,618],{"class":224,"line":267},[222,619,620],{"class":245},"  \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Paris right now?\"}],\n",[222,622,624],{"class":224,"line":623},5,[222,625,626],{"class":245},"  \"tools\": [{\"type\": \"function\", \"function\": {\n",[222,628,630],{"class":224,"line":629},6,[222,631,632],{"class":245},"    \"name\": \"get_weather\",\n",[222,634,636],{"class":224,"line":635},7,[222,637,638],{"class":245},"    \"description\": \"Get the current weather for a city\",\n",[222,640,642],{"class":224,"line":641},8,[222,643,644],{"class":245},"    \"parameters\": {\"type\": \"object\",\n",[222,646,648],{"class":224,"line":647},9,[222,649,650],{"class":245},"      \"properties\": {\"city\": {\"type\": \"string\", \"description\": \"City name\"}},\n",[222,652,654],{"class":224,"line":653},10,[222,655,656],{"class":245},"      \"required\": [\"city\"]}}}]\n",[222,658,660],{"class":224,"line":659},11,[222,661,662],{"class":245},"}'\n",[15,664,665],{},"The response, with the thinking text removed:",[213,667,670],{"className":668,"code":669,"language":290,"meta":218},[288],"\"message\": {\n  \"role\": \"assistant\",\n  \"content\": \"\",\n  \"tool_calls\": [{\"id\": \"call_vmg700ho\",\n    \"function\": {\"index\": 0, \"name\": \"get_weather\", \"arguments\": {\"city\": \"Paris\"}}}]\n}\n",[22,671,669],{"__ignoreMap":218},[15,673,674,675,678,679,682,683,686,687,44],{},"After a ",[22,676,677],{},"tool"," message with the weather, LFM3 replied: \"The current weather in Paris is 14°C with light rain.\" The ",[22,680,681],{},"/v1/chat/completions"," endpoint also returned the call, with ",[22,684,685],{},"finish_reason: \"tool_calls\"",". For how other local models compare, see our list of ",[332,688,690],{"href":689},"/blog/ollama-models-tool-calling-support","Ollama models with tool calling support",[15,692,693],{},[205,694],{"alt":695,"src":696},"How LFM3 tool calls reach your agent on Ollama: tools field, XML output, lfm3 parser, tool_calls JSON","/img/blog/lfm3-ollama-tool-calling-agent-setup-tool-call-flow.jpg",[15,698,699],{},"Now the part that trips people up. LFM3 itself does not write JSON.",[15,701,702,703,706,707,709,710,712],{},"Its model card shows calls in XML, ",[22,704,705],{},"\u003Ctool_call>\u003Cfunction=get_weather>\u003Cparameter=city>Paris\u003C/parameter>\u003C/function>\u003C/tool_call>",", and Ollama's ",[22,708,113],{}," parser converts that into ",[22,711,28],{},". Without that parser, the XML has nowhere to go, and that is the root of most \"no tool calls\" reports.",[537,714,715],{},[15,716,717],{},"The model is rarely the problem. The translator between the model and your agent is. Check the parser before you blame the weights.",[15,719,720,721,724],{},"One speed tip: thinking is on by default. With ",[22,722,723],{},"\"think\": false",", LFM3 made the same call with 18 generated tokens instead of 83, in 3.3 seconds instead of 12.5 on our machine.",[15,726,727,728,731],{},"So ",[530,729,730],{},"turn thinking off for simple tool routing."," Liquid AI warns that disabling it \"can be inconsistent, especially for reasoning-heavy tasks,\" so keep it on for harder steps.",[15,733,734],{},"That's the happy path. The next section covers four ways it can break, and every one is plumbing you would own.",[15,736,737,738],{},"Want the agent without the local setup? BetterClaw runs it always-on with BYOK across 28+ providers. ",[332,739,743],{"href":740,"rel":741},"https://app.betterclaw.io/sign-in",[742],"nofollow","Start your agent in 60 seconds",[49,745,747],{"id":746},"when-lfm3-does-not-support-tools-the-errors-and-their-fixes","When LFM3 \"does not support tools\": the errors and their fixes",[15,749,750],{},[205,751],{"alt":752,"src":753},"LFM3 tool call errors on Ollama and their fixes: version, jinja flag, does not support tools, XML as text","/img/blog/lfm3-ollama-tool-calling-agent-setup-errors-fixes.jpg",[15,755,756,757,759],{},"Every failure we hit came from one of three breaks: Ollama too old, no LFM3 parser, or tools missing from the ",[22,758,64],{}," field.",[761,762,764],"h3",{"id":763},"model-requires-ollama-version-v04013-or-newer","\"model requires ollama version v0.40.13 or newer\"",[15,766,767,768,770],{},"Word for word, from ",[22,769,24],{}," on v0.40.11:",[213,772,775],{"className":773,"code":774,"language":290,"meta":218},[288],"Error: model requires ollama version v0.40.13 or newer (current version is v0.40.11)\n",[22,776,774],{"__ignoreMap":218},[15,778,779,782,783,786],{},[530,780,781],{},"Fix:"," update Ollama (install script on Linux, desktop app on macOS and Windows), check ",[22,784,785],{},"ollama --version",", then pull again.",[761,788,790],{"id":789},"tools-param-requires-jinja-flag","\"tools param requires --jinja flag\"",[15,792,793,794,797,798,800,801,803,804,807],{},"This one shows up when you import the GGUF from Hugging Face instead of using the library tag. After ",[22,795,796],{},"ollama pull hf.co/LiquidAI/LFM3-1.7B-GGUF:Q4_K_M"," on v0.40.14, ",[22,799,283],{}," listed ",[22,802,64],{},", but the template source was ",[22,805,806],{},"gguf_chat_template"," with no renderer or parser.",[15,809,810],{},"Every request with tools failed:",[213,812,816],{"className":813,"code":814,"language":815,"meta":218,"style":218},"language-json shiki shiki-themes github-light","{\"error\":\"tools param requires --jinja flag\"}\n","json",[22,817,818],{"__ignoreMap":218},[222,819,820,823,826,829,831],{"class":224,"line":225},[222,821,822],{"class":557},"{",[222,824,825],{"class":232},"\"error\"",[222,827,828],{"class":557},":",[222,830,790],{"class":245},[222,832,833],{"class":557},"}\n",[15,835,836,837],{},"Requests without tools came back empty. ",[41,838,839],{},"So the model \"supports tools\" and rejects every tool request. Lovely.",[15,841,842,844,845,847],{},[530,843,781],{}," use ",[22,846,24],{},", or wrap the Hugging Face file in a Modelfile with Ollama's LFM3 renderer and parser, plus Liquid AI's recommended sampling:",[213,849,852],{"className":850,"code":851,"language":290,"meta":218},[288],"FROM hf.co/LiquidAI/LFM3-1.7B-GGUF:Q4_K_M\nRENDERER lfm3\nPARSER lfm3\nPARAMETER temperature 0.1\nPARAMETER top_k 50\nPARAMETER repeat_penalty 1.1\n",[22,853,851],{"__ignoreMap":218},[213,855,857],{"className":215,"code":856,"language":217,"meta":218,"style":218},"ollama create lfm3-hf -f Modelfile\n",[22,858,859],{"__ignoreMap":218},[222,860,861,863,866,869,872],{"class":224,"line":225},[222,862,229],{"class":228},[222,864,865],{"class":245}," create",[222,867,868],{"class":245}," lfm3-hf",[222,870,871],{"class":232}," -f",[222,873,874],{"class":245}," Modelfile\n",[15,876,877,878,881,882,884],{},"After that, ",[22,879,880],{},"ollama show lfm3-hf"," listed both lines, and the weather request returned a clean ",[22,883,28],{}," entry.",[761,886,888],{"id":887},"registryollamaailibrarylfm3-does-not-support-tools","\"registry.ollama.ai/library/lfm3 does not support tools\"",[15,890,891,892,894,895,899],{},"Ollama returns this when the model's capabilities, read from its template, lack ",[22,893,64],{},". No LFM3 build triggered it on v0.40.14, so if you see it, something on your machine is stale. Our ",[332,896,898],{"href":897},"/tools/agent-error-decoder/ollama-does-not-support-tools","Agent Error Decoder entry for \"Ollama does not support tools\""," runs the same check for other models.",[15,901,902,904,905,907,908,910,911,175,913,915,916,919,920,922],{},[530,903,781],{}," run ",[22,906,283],{}," on the exact model name your agent uses. If ",[22,909,64],{},", ",[22,912,304],{},[22,914,308],{}," is missing, it's an old copy or a third-party upload: ",[22,917,918],{},"ollama rm"," it, then pull ",[22,921,113],{}," again or use the Modelfile above.",[761,924,926],{"id":925},"tool-calls-come-back-as-text-or-the-reply-is-empty","Tool calls come back as text, or the reply is empty",[15,928,929,930,759],{},"This is the 2 AM blank reply from the top of this post. It happens when the agent lists its tools in the system prompt instead of the ",[22,931,64],{},[15,933,934,935,937,938,940],{},"In our test, ",[22,936,583],{}," returned empty ",[22,939,38],{},", and the raw output showed a malformed XML call:",[213,942,945],{"className":943,"code":944,"language":290,"meta":218},[288],"\u003Ctool_call>\n\u003Cfunction=get_weather(city: string)}\n\u003C/parameter>\n\u003C/function>\n\u003C/tool_call>\n",[22,946,944],{"__ignoreMap":218},[15,948,949,951,952,954,955,958],{},[530,950,781],{}," pass tool schemas in the ",[22,953,64],{}," field on every request, as the LFM3 model card instructs. In OpenClaw, use Ollama's native URL, because OpenClaw's docs warn that the ",[22,956,957],{},"/v1"," URL \"breaks tool calling and models can emit raw tool-call JSON as plain text.\"",[49,960,962],{"id":961},"lfm3-vs-qwen-35-4b-vs-gemma-4-e4b-which-small-model-should-run-your-agent","LFM3 vs Qwen 3.5 4B vs Gemma 4 E4B: which small model should run your agent?",[15,964,965,966,970],{},"Liquid AI's own benchmark table compares LFM3-1.7B with both. These are vendor runs (vLLM, BF16), not independent results, so read them as a claim to test. If you are weighing the other two on their own, our ",[332,967,969],{"href":968},"/blog/gemma-4-vs-qwen-3-5","Gemma 4 vs Qwen 3.5 breakdown"," goes deeper.",[15,972,973],{},[205,974],{"alt":975,"src":976},"LFM3 vs Qwen 3.5 4B vs Gemma 4 E4B benchmark bars for BFCL V4, tau3-bench, LiveClaw, MCP-Atlas and GPQA Diamond","/img/blog/lfm3-ollama-tool-calling-agent-setup-small-model-benchmarks.jpg",[67,978,979,994],{},[70,980,981],{},[73,982,983,985,988,991],{},[76,984],{},[76,986,987],{},"LFM3 1.7B",[76,989,990],{},"Qwen 3.5 4B",[76,992,993],{},"Gemma 4 E4B",[92,995,996,1010,1023,1034,1046,1060,1074,1088,1102],{},[73,997,998,1001,1004,1007],{},[97,999,1000],{},"Parameters (per Liquid AI)",[97,1002,1003],{},"1.7B",[97,1005,1006],{},"4.7B",[97,1008,1009],{},"8B",[73,1011,1012,1015,1017,1020],{},[97,1013,1014],{},"Ollama default tag",[97,1016,376],{},[97,1018,1019],{},"3.3 GB to 4.0 GB",[97,1021,1022],{},"6.6 GB to 9.5 GB",[73,1024,1025,1028,1030,1032],{},[97,1026,1027],{},"Context on Ollama",[97,1029,105],{},[97,1031,105],{},[97,1033,124],{},[73,1035,1036,1039,1041,1044],{},[97,1037,1038],{},"Inputs on Ollama",[97,1040,108],{},[97,1042,1043],{},"Text, image",[97,1045,1043],{},[73,1047,1048,1051,1054,1057],{},[97,1049,1050],{},"BFCL V4 (tool use)",[97,1052,1053],{},"71.39",[97,1055,1056],{},"55.12",[97,1058,1059],{},"48.25",[73,1061,1062,1065,1068,1071],{},[97,1063,1064],{},"τ³-bench average",[97,1066,1067],{},"68.01",[97,1069,1070],{},"65.98",[97,1072,1073],{},"33.53",[73,1075,1076,1079,1082,1085],{},[97,1077,1078],{},"MCP-Atlas",[97,1080,1081],{},"32.57",[97,1083,1084],{},"41.37",[97,1086,1087],{},"6.19",[73,1089,1090,1093,1096,1099],{},[97,1091,1092],{},"LiveClaw (OpenClaw tasks)",[97,1094,1095],{},"45.60",[97,1097,1098],{},"19.94",[97,1100,1101],{},"20.36",[73,1103,1104,1107,1110,1113],{},[97,1105,1106],{},"GPQA Diamond (knowledge)",[97,1108,1109],{},"63.37",[97,1111,1112],{},"75.76",[97,1114,1115],{},"57.88",[15,1117,1118],{},"Stay with me here, because the numbers split cleanly. LFM3 leads on BFCL V4, τ³-bench and LiveClaw at a third of Qwen's download size. Qwen 3.5 4B leads on MCP-Atlas and knowledge, and both rivals read images.",[15,1120,1121],{},"Gemma 4 E4B is the hardest sell: the biggest download here and the lowest scores on BFCL V4, τ³-bench and MCP-Atlas.",[15,1123,1124,1125],{},"Our pick: ",[530,1126,1127],{},"LFM3 as a fast local tool caller, Qwen 3.5 4B when the agent needs world knowledge or vision.",[49,1129,1131],{"id":1130},"wiring-lfm3-into-an-openclaw-agent","Wiring LFM3 into an OpenClaw agent",[15,1133,1134],{},"The quickest OpenClaw route is the launcher on Ollama's LFM3 page:",[213,1136,1138],{"className":215,"code":1137,"language":217,"meta":218,"style":218},"ollama launch openclaw --model lfm3\n",[22,1139,1140],{"__ignoreMap":218},[222,1141,1142,1144,1147,1150,1153],{"class":224,"line":225},[222,1143,229],{"class":228},[222,1145,1146],{"class":245}," launch",[222,1148,1149],{"class":245}," openclaw",[222,1151,1152],{"class":232}," --model",[222,1154,264],{"class":245},[15,1156,1157],{},"To configure OpenClaw by hand, use the native Ollama provider. This is the \"small local model\" recipe from OpenClaw's docs with LFM3 swapped in:",[213,1159,1163],{"className":1160,"code":1161,"language":1162,"meta":218,"style":218},"language-json5 shiki shiki-themes github-light","{\n  agents: { entries: { local: { model: { primary: \"ollama/lfm3\" } } } },\n  models: { providers: { ollama: {\n    baseUrl: \"http://127.0.0.1:11434\", // no /v1\n    apiKey: \"ollama-local\",\n    api: \"ollama\",\n    models: [{ id: \"lfm3\", name: \"lfm3\", input: [\"text\"],\n      contextTokens: 32768, params: { num_ctx: 32768 } }],\n  } } },\n}\n","json5",[22,1164,1165,1170,1205,1222,1238,1251,1263,1302,1328,1333],{"__ignoreMap":218},[222,1166,1167],{"class":224,"line":225},[222,1168,1169],{"class":557},"{\n",[222,1171,1172,1175,1178,1181,1183,1186,1188,1191,1193,1196,1199,1202],{"class":224,"line":236},[222,1173,1174],{"class":245},"  agents",[222,1176,1177],{"class":557},": { ",[222,1179,1180],{"class":245},"entries",[222,1182,1177],{"class":557},[222,1184,1185],{"class":245},"local",[222,1187,1177],{"class":557},[222,1189,1190],{"class":245},"model",[222,1192,1177],{"class":557},[222,1194,1195],{"class":245},"primary",[222,1197,1198],{"class":557},": ",[222,1200,1201],{"class":245},"\"ollama/lfm3\"",[222,1203,1204],{"class":557}," } } } },\n",[222,1206,1207,1210,1212,1215,1217,1219],{"class":224,"line":256},[222,1208,1209],{"class":245},"  models",[222,1211,1177],{"class":557},[222,1213,1214],{"class":245},"providers",[222,1216,1177],{"class":557},[222,1218,229],{"class":245},[222,1220,1221],{"class":557},": {\n",[222,1223,1224,1227,1229,1232,1234],{"class":224,"line":267},[222,1225,1226],{"class":245},"    baseUrl",[222,1228,1198],{"class":557},[222,1230,1231],{"class":245},"\"http://127.0.0.1:11434\"",[222,1233,910],{"class":557},[222,1235,1237],{"class":1236},"sAwPA","// no /v1\n",[222,1239,1240,1243,1245,1248],{"class":224,"line":623},[222,1241,1242],{"class":245},"    apiKey",[222,1244,1198],{"class":557},[222,1246,1247],{"class":245},"\"ollama-local\"",[222,1249,1250],{"class":557},",\n",[222,1252,1253,1256,1258,1261],{"class":224,"line":629},[222,1254,1255],{"class":245},"    api",[222,1257,1198],{"class":557},[222,1259,1260],{"class":245},"\"ollama\"",[222,1262,1250],{"class":557},[222,1264,1265,1268,1271,1274,1276,1279,1281,1284,1286,1288,1290,1293,1296,1299],{"class":224,"line":635},[222,1266,1267],{"class":245},"    models",[222,1269,1270],{"class":557},": [{ ",[222,1272,1273],{"class":245},"id",[222,1275,1198],{"class":557},[222,1277,1278],{"class":245},"\"lfm3\"",[222,1280,910],{"class":557},[222,1282,1283],{"class":245},"name",[222,1285,1198],{"class":557},[222,1287,1278],{"class":245},[222,1289,910],{"class":557},[222,1291,1292],{"class":245},"input",[222,1294,1295],{"class":557},": [",[222,1297,1298],{"class":245},"\"text\"",[222,1300,1301],{"class":557},"],\n",[222,1303,1304,1307,1309,1312,1314,1317,1319,1321,1323,1325],{"class":224,"line":641},[222,1305,1306],{"class":245},"      contextTokens",[222,1308,1198],{"class":557},[222,1310,1311],{"class":232},"32768",[222,1313,910],{"class":557},[222,1315,1316],{"class":245},"params",[222,1318,1177],{"class":557},[222,1320,479],{"class":245},[222,1322,1198],{"class":557},[222,1324,1311],{"class":232},[222,1326,1327],{"class":557}," } }],\n",[222,1329,1330],{"class":224,"line":647},[222,1331,1332],{"class":557},"  } } },\n",[222,1334,1335],{"class":224,"line":653},[222,1336,833],{"class":557},[15,1338,1339],{},"OpenClaw's setup uses a 32,768-token context for local models, while Ollama's OpenClaw guide recommends 64K or more. At 1.9 GB for 65,536 in our test, LFM3 can afford it, so raise both values when the agent reads long files.",[15,1341,1342],{},"Then split the work. Keep LFM3 for tool calls, routing and extraction, and send coding and long reasoning to a bigger model, as Liquid AI's card advises.",[15,1344,1345,1346,1350],{},"Would you rather skip the laptop? BetterClaw's BYOK route takes your own API key for 28+ providers with zero markup. For the local side, our ",[332,1347,1349],{"href":1348},"/blog/openclaw-ollama-guide","OpenClaw and Ollama guide"," covers the rest of the setup.",[15,1352,1353],{},"Here's what stuck with us after a day of breaking LFM3. In every failure we hit, the fix was in the setup, not the weights: a version pin, a missing parser, a tool list in the wrong field.",[537,1355,1356],{},[15,1357,1358,1359,1361],{},"Small models are now good enough that the plumbing is the hard part. Learn to read ",[22,1360,283],{}," the way you read a stack trace, and a 1 GB model will do real work for you.",[1363,1364,1366,1371,1374],"callout",{"type":1365},"cta",[15,1367,1368],{},[530,1369,1370],{},"Ready to skip the plumbing and keep the agent?",[15,1372,1373],{},"LFM3 is a sharp little tool caller. But a local agent is only as reliable as the machine it runs on, and that machine sleeps.",[15,1375,1376,1377],{},"BetterClaw keeps your agent always on, with 500+ connectors. Plans start at $19 for Starter, $49 for Pro ($39 billed annually) and $149 for Business, with custom Enterprise plans, and your first workspace starts with a 7-day free trial. ",[332,1378,1380],{"href":1379},"/pricing","See plans and pricing",[49,1382,1384],{"id":1383},"frequently-asked-questions","Frequently Asked Questions",[761,1386,1388],{"id":1387},"what-is-lfm3","What is LFM3?",[15,1390,1391,1392,1394],{},"LFM3 is Liquid AI's family of small open-weight models, announced 27 October 2026. The text model, LFM3-1.7B, has a 256K context window, was post-trained for agents such as OpenClaw, and is the ",[22,1393,113],{}," tag on Ollama.",[761,1396,1398],{"id":1397},"does-lfm3-support-tool-calling-in-ollama","Does LFM3 support tool calling in Ollama?",[15,1400,1401,1402,1404,1405,1407,1408,1410],{},"Yes. In our test on Ollama v0.40.14, the ",[22,1403,113],{}," tag returned structured ",[22,1406,28],{},". LFM3 writes calls in XML, and Ollama's ",[22,1409,113],{}," parser converts them.",[761,1412,1414],{"id":1413},"why-does-ollama-say-lfm3-does-not-support-tools-and-how-do-i-fix-it","Why does Ollama say LFM3 does not support tools, and how do I fix it?",[15,1416,1417,1418,1420,1421,1423,1424,305,1427,1430],{},"Your copy lacks the ",[22,1419,64],{}," capability or the LFM3 parser, usually from an old pull or a third-party upload. Update to v0.40.13 or later and pull ",[22,1422,113],{}," again, or add ",[22,1425,1426],{},"RENDERER lfm3",[22,1428,1429],{},"PARSER lfm3"," to a Modelfile.",[761,1432,1434],{"id":1433},"is-lfm3-better-than-qwen-35-4b","Is LFM3 better than Qwen 3.5 4B?",[15,1436,1437],{},"For tool calling, Liquid AI's numbers say yes: 71.39 on BFCL V4 against 55.12, at a third of the download size. Qwen 3.5 4B wins on knowledge and reads images. These are vendor benchmarks, so test both.",[761,1439,1441],{"id":1440},"how-much-ram-does-lfm3-need-and-what-does-it-cost-to-run","How much RAM does LFM3 need, and what does it cost to run?",[15,1443,1444],{},"In our test the default 1.1 GB build used 1.4 GB at Ollama's 4K default and 2.7 GB at the full 256K. The licence allows commercial use while annual revenue stays under $10 million.",[761,1446,1448],{"id":1447},"is-lfm3-reliable-enough-for-a-real-agent","Is LFM3 reliable enough for a real agent?",[15,1450,1451,1452,1454],{},"For tool calls, routing and extraction, yes, once Ollama's ",[22,1453,113],{}," parser is in place. Liquid AI does not recommend it for agentic coding or complex multi-step reasoning, so send those steps to a bigger model.",[1456,1457,1458],"style",{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":218,"searchDepth":236,"depth":236,"links":1460},[1461,1462,1463,1464,1465,1471,1472,1473],{"id":51,"depth":236,"text":52},{"id":190,"depth":236,"text":191},{"id":339,"depth":236,"text":340},{"id":573,"depth":236,"text":574},{"id":746,"depth":236,"text":747,"children":1466},[1467,1468,1469,1470],{"id":763,"depth":256,"text":764},{"id":789,"depth":256,"text":790},{"id":887,"depth":256,"text":888},{"id":925,"depth":256,"text":926},{"id":961,"depth":236,"text":962},{"id":1130,"depth":236,"text":1131},{"id":1383,"depth":236,"text":1384,"children":1474},[1475,1476,1477,1478,1479,1480],{"id":1387,"depth":256,"text":1388},{"id":1397,"depth":256,"text":1398},{"id":1413,"depth":256,"text":1414},{"id":1433,"depth":256,"text":1434},{"id":1440,"depth":256,"text":1441},{"id":1447,"depth":256,"text":1448},"Guides","2026-11-06","Run LFM3 on Ollama from Liquid AI: which tag to pull, how much memory it needs, whether tool calling works, and the fix when tool calls come back as text.","md",false,"/img/blog/lfm3-ollama-tool-calling-agent-setup.jpg",null,{},true,"/blog/lfm3-ollama-tool-calling-agent-setup","13 min read",{"title":5,"description":1483},"LFM3 on Ollama: Setup, Tool Calling and Agent Fixes (2026)","blog/lfm3-ollama-tool-calling-agent-setup",[1496,1497,1498,1499,1500,1501,1502],"lfm3 ollama","lfm3 tool calling","liquid ai lfm3","lfm3 1.7b","ollama lfm3 agent","lfm3 does not support tools","lfm3 ram requirements","MoBsqGaKkTgQbce--37Mg8ibeKLLXG_7NfJikfU8-Zs",[1505,1512,1522],{"stem":1506,"title":1507,"description":1508,"date":1509,"image":1510,"category":1481,"redirected":1485,"author":1511,"readingTime":1491},"blog/deepseek-v4-1-flash-agents","DeepSeek V4.1 Flash 1017 for AI Agents: Price, Hardware and Local vs Ollama Cloud vs API","DeepSeek V4.1 Flash 1017 costs $0.30/$1.20 per 1M tokens at peak, half off-peak. Local vs Ollama Cloud vs API, hardware needs and agent setup.","2026-11-05","/img/blog/deepseek-v4-1-flash-agents.jpg",{"name":7,"role":8,"avatar":9,"bio":10},{"stem":1513,"title":1514,"description":1515,"date":1516,"image":1517,"category":1518,"redirected":1485,"author":1519,"readingTime":1521},"blog/dgx-station-precio-alternativas","Precio de NVIDIA DGX Station (GB300) en 2026: cuánto cuesta y 6 alternativas más baratas","Precio de NVIDIA DGX Station: cada anuncio del GB300 de $92,887 a $159,283, el modelo para Windows, el costo mensual y 6 alternativas más baratas.","2026-11-04","/img/blog/dgx-station-precio-alternativas.jpg","Comparison",{"name":7,"role":8,"avatar":9,"url":1520,"bio":10},"https://www.betterclaw.io/about","12 min de lectura",{"stem":1523,"title":1524,"description":1525,"date":1516,"image":1526,"category":1518,"redirected":1485,"author":1527,"readingTime":1528},"blog/dgx-station-preco-alternativas","Preço do NVIDIA DGX Station (GB300) em 2026: quanto custa e 6 alternativas mais baratas","Preço do NVIDIA DGX Station: todas as ofertas GB300 de $92,887 a $159,283, o modelo Windows, o custo mensal e 6 alternativas mais baratas.","/img/blog/dgx-station-preco-alternativas.jpg",{"name":7,"role":8,"avatar":9,"url":1520,"bio":10},"12 min de leitura",1793972870162]