Run LFM3 on a VPS with Ollama or llama.cpp
Ollama v0.40.13 supports LFM3 on Linux VPSs. Pull lfm3:1.7b, record its digest, set context, compare llama.cpp, and measure tokens per second yourself.
Can you run LFM3 on a VPS today?
To run LFM3 on a VPS with Ollama, you pull the tag lfm3:1.7b and run it like any other model. As of 29 October 2026, Ollama's v0.40.13 release notes say LFM3 models now run on Linux and Windows as well as Apple silicon. On a Linux VPS, use v0.40.13 or newer and test the Ollama route first. The fallback is the llama.cpp GGUF build that Liquid AI publishes for CPUs.
This guide covers both routes. It uses the explicit Ollama size tag and records its digest, then shows how to check whether your Ollama version loads it on a CPU-only server. If it does not, the guide sets up llama.cpp instead. It then covers the context window, how to measure speed on your own hardware, and the agent use that Liquid AI designed the model for. It quotes no speed figures. A number measured on someone else's machine tells you nothing about your VPS.
What LFM3-1.7B is, according to Liquid AI
LFM3-1.7B is a small text model from Liquid AI. Ollama's library page calls it "a tri-hybrid model for local agents and specialized applications". The model card says it is "designed for local agents, tool calling, structured outputs, and domain-specific fine-tuning". Those are the vendor's claims. Test them on your own tasks before you rely on them.
The published specs, from Ollama's library page:
- 1.73B parameters.
- 24 layers: 13 gated short convolutions, 5 sliding-window attention layers and 6 global attention layers.
- A 128,000-token vocabulary.
- A 256K-token context window, counted as input plus output.
- The LFM Open License v1.0. Read the license text yourself before any commercial use. This guide does not summarise it.
Ollama tags the model with the tools and thinking capabilities. Ollama's page and the Hugging Face card both carry the same warning, word for word:
It is not recommended for agentic coding or complex multi-step reasoning due to its small size.
Ollama's page adds one more line of advice: "Use retrieval or search for knowledge-heavy tasks." A 1.7B model holds little world knowledge, so put the facts in the prompt. Do not ask the model to remember them.
Pin the tag: lfm3:1.7b and its digest
Use the size tag, not latest, but remember that both tags are mutable. On 29 October 2026 the Ollama tags page lists lfm3:1.7b at 1.1GB to 1.7GB across its backends, with a 256K context and the digest df5fd9016d22. Today lfm3:latest points to the same digest. Either tag can move to a new build without warning. Recording the tag and digest tells you when that happens; pulling the tag does not pin its contents.
One detail on that page matters for a VPS. The default lfm3:1.7b tag now includes both mlx and llamacpp backends. Its llama.cpp model is Q4_K_M and is listed at 1.1GB. The separate lfm3:1.7b-nvfp4 tag is labelled MLX and retains the digest 2012d88e202f. MLX is Apple's machine learning framework for Apple silicon. The default tag is no longer an Apple-only build.
The library page says that "at 4-bit precision, it takes about 1 GB of memory", while the default tag lists downloads from 1.1GB to 1.7GB depending on the backend. Do not plan your RAM from either number. Measure it on the server with ollama ps, as shown below. To see how the weights, the context and the operating system share your RAM, read how big an LLM fits in your RAM.
Install Ollama and check which version you have
Ollama's Linux install is one script. You can download https://ollama.com/install.sh and read it before you run it. That is good practice for any script you pipe into a shell.
curl -fsSL https://ollama.com/install.sh | sh
ollama -v
sudo systemctl status ollamasystemctl status should show the service as active (running).
Which Ollama version does LFM3 need? For Linux and Windows, use v0.40.13 or newer. That release explicitly adds LFM3 support on both platforms. If ollama -v prints an older version, update first by running the install script again. The Ollama releases page lists subsequent updates.
By default Ollama listens on 127.0.0.1:11434, so only the VPS itself can reach the API. Keep it that way. How the Ollama API and port 11434 work covers safe ways to reach it from your laptop.
Pull and run lfm3:1.7b on a CPU-only VPS
ollama pull lfm3:1.7b
ollama run lfm3:1.7b "Reply with one word: ready"By default Ollama keeps a model loaded for five minutes. Within that time, check what loaded:
ollama psA healthy result lists lfm3:1.7b. Record the ID column for the loaded build; pulling this mutable tag does not preserve the old 2012d88e202f digest. The PROCESSOR column should read 100% CPU, which means the model is loaded entirely in system memory. That is correct on a VPS with no GPU. The SIZE column shows how much memory the loaded model takes. That is your RAM figure, measured on your own server.
If the pull or the run fails on Linux, read the service log before you change anything:
journalctl -e -u ollamaWe have not recorded the exact error that the current Linux build prints for this tag, so we will not guess at it here. If the log points at an unsupported model or architecture, check that the running Ollama service is v0.40.13 or newer and that you pulled the current lfm3:1.7b model. Linux itself is no longer an unsupported platform for LFM3. If the model still fails to load, use the llama.cpp route below while you investigate the logged error.
Set num_ctx: 256K is a ceiling, not a default
The 256K context is the most the model can handle. Ollama does not give you that much by default, and a small VPS cannot afford it. A larger context makes Ollama reserve more memory for the KV cache (the key and value tensors the model keeps for every token in the window). Ollama's docs say it plainly: "Setting a larger context length will increase the amount of memory required to run a model."
Ollama's FAQ says the default window is 4096 tokens. The context-length page gives a rule based on GPU memory: under 24 GiB of VRAM (video memory) you get 4k. A CPU-only VPS has no VRAM, so expect 4096. Confirm it in the CONTEXT column of ollama ps. Do not trust either page alone.
To change the window for one session, set it inside ollama run:
ollama run lfm3:1.7b
>>> /set parameter num_ctx 8192To change the default for every request, set OLLAMA_CONTEXT_LENGTH on the service:
sudo systemctl edit ollama[Service]
Environment="OLLAMA_CONTEXT_LENGTH=8192"sudo systemctl restart ollamaOver the API, pass "options": {"num_ctx": 8192} in the request body.
Pick the smallest window your task needs. Load the model and read SIZE and CONTEXT from ollama ps. Then double the window and read them again. That shows you what each extra block of context costs on your server. Ollama's context length and num_ctx explains the setting in depth, including clients that send their own value.
How to measure tokens per second yourself
ollama run takes a --verbose flag. Ollama's source describes it as "Show timings for response". After each reply it prints a block of timings:
ollama run lfm3:1.7b --verbose "List four uses for a cron job, one line each."Two lines matter most. prompt eval rate is how fast the model reads your prompt, in tokens per second. eval rate is how fast it writes the answer, in tokens per second. On a CPU these two numbers are very different. Reading a prompt processes many tokens in one batch, but writing produces one token at a time. load duration tells you whether the model was already in memory. A long load on the first run is normal, so ignore that run.
Run the same prompt three or four times and note the eval rate each time. Use a prompt that looks like your real work, because a short answer and a long one do not load the server the same way. If other workloads share the VPS, measure at a quiet time and again at a busy one. Measuring tokens per second on a local LLM gives a repeatable method for Ollama and llama.cpp.
The Linux fallback: the LFM3 GGUF in llama.cpp
Liquid AI publishes a GGUF build at LiquidAI/LFM3-1.7B-GGUF on Hugging Face. GGUF is the model file format that llama.cpp reads. The card says LFM3 is "Supported in llama.cpp b11960 (v0.8.0) and newer", and it lists quantisations from Q4_0 up to BF16. This route does not depend on Ollama's platform support. Use it on a Linux VPS if you prefer llama.cpp or need a fallback.
Build llama-server from the pinned tag. These are the same build steps our LFM2.5 guide uses, with the newer tag:
sudo apt update
sudo apt install -y build-essential cmake git curl jq libssl-dev
git clone --branch v0.8.0 --depth 1 https://github.com/ggml-org/llama.cpp.git ~/llama.cpp
cd ~/llama.cpp
cmake -B build
cmake --build build --config Release -j "$(nproc)" --target llama-server
ls -l build/bin/llama-serverStart the server with the Q4_K_M file, an 8K context and the sampling values from Liquid AI's card:
~/llama.cpp/build/bin/llama-server -hf LiquidAI/LFM3-1.7B-GGUF:Q4_K_M --host 127.0.0.1 --port 8080 -c 8192 --temp 0.1 --top-k 50 --repeat-penalty 1.1The -hf flag downloads the file from Hugging Face, so the first start takes longer. From a second SSH session, check that the server is ready:
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080/health200 means the model is loaded and the server accepts requests. Pinning a tag matters more than usual here, because LFM3 support in llama.cpp is new. Pinning llama.cpp releases on a server shows how to upgrade on purpose instead of by accident. Ollama vs llama.cpp covers what you give up when you leave Ollama.
You can also use Hugging Face's Ollama GGUF route: ollama run hf.co/LiquidAI/LFM3-1.7B-GGUF:Q4_K_M. That command loads the GGUF through Ollama instead of the library tag. Use Ollama v0.40.13 or newer for Linux LFM3 support, and read journalctl -e -u ollama if it fails.
Tool calling and structured output with LFM3
Liquid AI aims the model at structured output and tool calls, so test those first. For chat, tool use and agents, the model card recommends temperature 0.1, top_k 50 and a repetition penalty of 1.1. The Ollama tag already ships temperature 0.1, top_k 50 and repeat_penalty 1.1 in its parameters, so you do not need to set them. For maths and science tasks the card switches to temperature 1.0, top_p 0.95 and top_k 20.
Ollama's /api/chat endpoint takes a JSON schema in the format field and makes the reply follow it. Install jq if you skipped the llama.cpp section, then run:
curl -s http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{
"model": "lfm3:1.7b",
"messages": [{"role": "user", "content": "Extract the server facts: web01 runs Ubuntu 24.04 in Frankfurt with 4 GB of RAM."}],
"stream": false,
"options": {"num_ctx": 8192},
"format": {
"type": "object",
"properties": {
"hostname": {"type": "string"},
"os": {"type": "string"},
"city": {"type": "string"},
"ram_gb": {"type": "integer"}
},
"required": ["hostname", "os", "city", "ram_gb"]
}
}' | jq -r .message.contentA good result is one JSON object with all four keys filled in from the sentence. The schema controls the shape of the reply. It does not make the values correct, so check them against the input. Run twenty real examples from your own data before you trust the model in a pipeline, and count how many come back wrong.
Put LFM3 behind Hermes Agent or OpenClaw with ollama launch
The lfm3 page lists ollama launch commands for four tools. Two of them are coding agents. The model card warns against agentic coding, so this guide skips those two and uses the general agents.
ollama launch hermes --model lfm3If Hermes Agent is not installed, Ollama prompts you to install it. It then points Hermes at Ollama's local OpenAI-compatible endpoint, http://127.0.0.1:11434/v1, and sets the model as the primary one. A local model needs no API key. Ollama's Hermes page gives no context-window advice. If you set Hermes up by hand and leave the context length blank, Hermes detects it on its own. For a long-running setup with a systemd service and a messaging gateway, follow self-hosting Hermes Agent on a VPS.
ollama launch openclaw --model lfm3If OpenClaw is missing, Ollama offers to install it through npm. The first launch shows a security notice about tool access. --config changes the model without starting the gateway. --yes pulls the model and skips the prompts, and it requires --model.
Ollama's OpenClaw page adds a note that matters on a small VPS: "It is recommended to use a context window of at least 64k tokens if using local models." That is sixteen times the 4096 default. On a CPU-only server it costs real memory, and every long prompt takes longer to read. Set OLLAMA_CONTEXT_LENGTH=65536 as shown above. Then check ollama ps and free -h before you leave it running. Hermes Agent vs OpenClaw compares the two agents in more depth.
Both launch commands use the Ollama library model. On a Linux VPS they work only if the pull and run test above succeeded. If you moved to llama.cpp, point the agent at http://127.0.0.1:8080/v1 through its own provider settings instead.
Does lfm3-audio run on Linux CPU?
Ollama v0.40.13 adds Linux and Windows support for the LFM3 family, including text-to-speech in lfm3-audio. lfm3-audio is in the Ollama library as LFM3-Audio-2B. It takes text or audio as input. It produces text, 24 kHz speech, or the two interleaved, in 18 languages. You start it with ollama run lfm3-audio. On 29 October 2026, its latest and 2b tags share the digest 3cc080be117a, while the separate MLX 2b-nvfp4 tag has the digest ecfcfb300186.
Use v0.40.13 or newer, then run ollama pull lfm3-audio and ollama run lfm3-audio on your VPS, and read journalctl -e -u ollama if it fails. Linux support is now documented; CPU speed and memory use still need measuring on your own server before you plan a speech feature around it.
LFM3-1.7B or LFM2.5-24B-A2B?
Our guide to running LFM2.5-24B-A2B on a CPU-only VPS covers Liquid AI's larger model. The two guides use different runtimes: that guide runs llama.cpp's llama-server pinned to v0.7.0, not Ollama. LFM2.5-24B-A2B is a mixture-of-experts model with 24B parameters in total and 2.45B active per token. Its Q4_K_M file is 14.5 GB. That guide recommends 24 GB of RAM or more and calls 16 GB too tight. LFM3-1.7B's default Ollama tag lists downloads from 1.1GB to 1.7GB, with its Linux llama.cpp Q4_K_M variant at 1.1GB, so it fits on a much smaller plan.
What follows is our judgement, not a measured result. LFM3-1.7B is enough when the task is narrow and the answer is in the prompt. Good examples are pulling fields out of text into a schema, routing a request to the right tool, sorting tickets into a fixed set of labels, and writing short replies from a template. It is also the better choice when the VPS runs other services and you can spare only a few gigabytes.
It is not enough when the task needs multi-step reasoning or broad knowledge. The card says so directly for agentic coding and multi-step reasoning, and for knowledge it recommends retrieval or search. For those jobs, test the 24B-A2B model if your plan has the RAM. In both cases, measure your own eval rate on your own prompts, and score the answers yourself before you decide.
FAQ
Does LFM3 run on a Linux VPS with Ollama?
Yes. As of 29 October 2026, Ollama's v0.40.13 release notes explicitly add LFM3 support on Linux and Windows. Run ollama pull lfm3:1.7b and ollama run lfm3:1.7b with v0.40.13 or newer, and read journalctl -e -u ollama if it fails. If it does not run, use Liquid AI's GGUF build in llama.cpp. Its model card says llama.cpp v0.8.0 and newer support it.
Which Ollama version do I need for lfm3:1.7b?
Use Ollama v0.40.13 or newer on Linux and Windows. That release adds LFM3 support on both platforms. Check your version with ollama -v, and update if it is older.
How much context should I give LFM3 on a small VPS?
Start with the smallest window your task needs, such as 8192 tokens, not the 256K maximum. A larger window makes Ollama reserve more memory. Set it with /set parameter num_ctx inside ollama run, with OLLAMA_CONTEXT_LENGTH on the service, or with num_ctx in an API request. Then confirm the value in the CONTEXT column of ollama ps. OpenClaw's Ollama page recommends at least 64k for local models, which costs much more memory.
Can I use LFM3-1.7B as a coding agent?
Liquid AI advises against it. The model card says: "It is not recommended for agentic coding or complex multi-step reasoning due to its small size." Use it for tool calls, structured output and other narrow tasks. Give it facts through retrieval or search instead of relying on what it knows.