Pre-training and Deploying Small Language Models for Edge Devices

liquid_ai · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Small language model training and edge deployment

Liquid AI needed to build language models that could run on phones, cars, and other edge devices where memory, latency, privacy, and connectivity constraints make normal large-model deployment patterns impractical.

Constraints:

Architecture

Liquid AI treats edge models as a separate production architecture rather than scaled-down large models. The stack combines an LFM2 hybrid architecture with short-convolution blocks and grouped-query attention, real-device profiling on CPU and mobile hardware, extended pretraining on 28 trillion tokens, task-specific SFT, preference alignment, reinforcement learning with verifiable rewards, and deployment patterns that add tools or recursive language-model environments to compensate for low knowledge capacity and short context.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  target-edge-hardware["Target edge hardware"] --> on-device-profiling-loop["On-device profiling loop"]
  on-device-profiling-loop["On-device profiling loop"] --> target-edge-hardware["Target edge hardware"]
  on-device-profiling-loop["On-device profiling loop"] --> lfm2-edge-model["LFM2 edge model"]
  lfm2-edge-model["LFM2 edge model"] --> on-device-profiling-loop["On-device profiling loop"]
  lfm2-edge-model["LFM2 edge model"] --> pretraining-corpus["Pretraining corpus"]
  pretraining-corpus["Pretraining corpus"] --> lfm2-edge-model["LFM2 edge model"]
  lfm2-edge-model["LFM2 edge model"] --> post-training-pipeline["Post-training pipeline"]
  post-training-pipeline["Post-training pipeline"] --> lfm2-edge-model["LFM2 edge model"]
  post-training-pipeline["Post-training pipeline"] --> doom-loop-mitigation["Doom-loop mitigation"]
  doom-loop-mitigation["Doom-loop mitigation"] --> post-training-pipeline["Post-training pipeline"]
  lfm2-edge-model["LFM2 edge model"] --> tool-access-layer["Tool access layer"]
  tool-access-layer["Tool access layer"] --> lfm2-edge-model["LFM2 edge model"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Target edge hardware Phones, cars, CPUs, and mobile devices that impose memory and latency constraints and provide the real profiling target. On-device profiling loop, LFM2 edge model
On-device profiling loop Empirical benchmark loop that tests candidate operators on target CPUs and phones before architecture choices are finalized. Target edge hardware, LFM2 edge model
LFM2 edge model Hybrid small language model architecture using short convolutions and grouped-query attention with a smaller embedding footprint. On-device profiling loop, Pretraining corpus, Post-training pipeline, Tool access layer
Pretraining corpus Large token budget used to train the 350M-class model far beyond older compute-optimal estimates. LFM2 edge model
Post-training pipeline Task-specific SFT, preference alignment, and reinforcement learning stages that tune the model for data extraction, tool use, and reliability. LFM2 edge model, Doom-loop mitigation
Doom-loop mitigation Preference-alignment and RL techniques that reject repetitive rollouts and penalize n-gram repetition. Post-training pipeline
Tool access layer External web search, Python, or recursive language-model environment used to compensate for low knowledge capacity and context limits. LFM2 edge model

Data flow

A target edge use case starts with hardware constraints such as phone or in-car deployment. Liquid profiles candidate model operators on those devices, chooses an efficient architecture with short convolutions and a smaller embedding share, pretrains the small model on a very large token budget, narrows SFT around the intended tasks, then uses preference alignment and RL to remove doom-loop behavior. At deployment time, the small model runs locally for low latency or privacy-sensitive workloads and can call tools such as web search or Python-backed recursive environments when its memorized knowledge or context window is insufficient.

3 supporting quotes
“we did on device profiling. So instead of doing more like theoretical work we decided to say like okay, let's try to really implement it on the target hardware.”transcript, stated
“the LFM 2.5 training recipe is quite similar to what you can find find elsewhere in terms of stages. We have pre and mid-training 28 trillion tokens.”transcript, stated
“If you have a tiny model, but it's able to Google everything that you um throw at it in terms of like knowledge questions, you're going to have like much much better performance”transcript, stated

Why this architecture

Liquid chose an edge-specific architecture because small models are not merely reduced large models: their memory footprint, task focus, latency needs, and doom-loop failure modes require dedicated architecture profiling, narrow training, and external tool support.

3 supporting quotes
“small models are not just scaled on versions of bigger models. They also have their unique challenges and we will see about how we do it in this presentation.”transcript, stated
“we wanted the model to be very very good at data extraction and at tool use. And the rest if it's not the best model at encode it doesn't matter.”transcript, stated
“small models running locally are always going to be better. And another one is is privacy. If you're in a regulated environment, um if you work in finance or health care”transcript, stated

Models used: LFM 2.5 350M · LFM 2.5 1.2B thinking model · LFM2 architecture · LLM jury · Qwen 3.5 0.8B · Gemma 3 270M

Scale

Alternatives considered (roads not taken)

Treat edge models as scaled-down versions of bigger models

Rejected because: Liquid argues that edge models have unique memory, latency, task-focus, and failure-mode constraints that require a specialized stack.

“small models are not just scaled on versions of bigger models. They also have their unique challenges and we will see about how we do it in this presentation.”transcript, stated

Keep large teacher vocabularies and embedding-heavy student models

Rejected because: Large embedding layers consume memory without adding the same reasoning or knowledge capacity as effective parameters.

“the effective parameters, the parameters that are really used for reasoning, for knowledge capacity and all that stuff are not the embedding parameters. They're the rest.”transcript, stated

Choose architecture operators from theory alone

Rejected because: Liquid found the useful operators by implementing and profiling them on the actual CPU and mobile hardware targets.

“instead of doing more like theoretical work we decided to say like okay, let's try to really implement it on the target hardware.”transcript, stated

Use broad supervised fine-tuning for general chat behavior

Rejected because: The presenter says small-model SFT works best when it is narrow and focused on the production task.

“for supervised fine-tuning is better if you actually quite narrow and you focus on some task.”transcript, stated

Rely on SFT alone to remove doom looping

Rejected because: The measured doom-loop ratio barely moved after SFT, while preference alignment and RL substantially reduced it.

“after SFT, it it barely moves. Like SFT is not the right stage to fix this.”transcript, stated

Patterns

latency-optimization (deployment)

Liquid optimized architecture operators for edge inference by profiling short-convolution and attention alternatives directly on target hardware.

“So instead of doing more like theoretical work we decided to say like okay, let's try to really implement it on the target hardware.”transcript, stated
“The short convs are a lot faster than all the alternatives. So you can see here compared to sliding window attention from Gemma 3”transcript, stated

fine-tuning-adaptation (model-adaptation)

The post-training stack uses narrow SFT, preference alignment, and reinforcement learning around the specific edge tasks the model will perform.

“for supervised fine-tuning is better if you actually quite narrow and you focus on some task.”transcript, stated
“We have pre and mid-training 28 trillion tokens. We have supervised fine-tuning, preference alignment and reinforcement learning.”transcript, stated

tool-use-orchestration (agent-architecture)

The deployment strategy equips small models with tools such as web search so they can compensate for limited memorized knowledge.

“a nice way to solve this issue is just providing like web search tools to the model.”transcript, stated
“What they truly need is really good reasoning capabilities to make sure that they are able to use these tools in a reliable manner.”transcript, stated

eval-driven-development (quality)

The training process uses benchmarks, doom-loop ratios, LLM jury scoring, and RL reward signals to decide whether training stages are actually improving production behavior.

“you can see that the LFM 2.5 model is significantly better than the the previous version LFM 2 350M on a lot of different benchmarks.”transcript, stated
“we give everything to a LLM jury to score all the um rollouts. We pick the best one, the one with the highest score as the chosen answer”transcript, stated

context-engineering (context-management)

The case treats long-context limits as a deployment-environment design problem, proposing recursive language-model environments and Python shortcuts instead of relying only on the base model.

“small models are also not very good at long context capabilities. But it's okay, because if you have like a recursive um language model environment, then you can use Python”transcript, stated

data-quality-loop (model-adaptation)

RL failures are used as feedback to add missing cold-start examples to the SFT mixture before retrying the later training stage.

“reinforcement learning something doesn't train very well. It's probably because you are missing some uh cold start SFT data.”transcript, stated
“you can try to start again uh from the supervised fine-tuning uh stage, add your data, and then see if it improves anything.”transcript, stated

Tradeoffs

Optimize small models for targeted edge tasks rather than general-purpose chat.

Chose Narrow task specialization for data extraction, tool use, and similar edge capabilities over A broad general-purpose chatbot objective.

Rationale: Small models have limited knowledge capacity, so task focus lets them be excellent at specific production uses instead of average across everything.

“they are usually not general purpose chatbots like ChatGPT. They are a lot more narrow in terms of focus and they can do something like summarization to use very very well.”transcript, stated
“target some capabilities and not try to be like average on everything.”transcript, stated

Train far beyond older compute-optimal guidance for a 350M model.

Chose 28 trillion-token pretraining for LFM 2.5 350M over Stopping near Chinchilla-style compute optimality.

Rationale: Liquid observed continued improvement with more pretraining tokens and small models are cheap enough to make extended training practical.

“If you're familiar with Chinchilla scaling laws that might sound a bit weird because we're supposed to be compute optimal at like I don't know like maybe 1 billion”transcript, stated
“we see that the performance still grows when you scale the number of pre-training tokens.”transcript, stated

Use real-device profiling to choose model operators.

Chose Gated short convolution blocks identified through target-hardware profiling over Architecture selection based on theoretical appeal or inherited large-model blocks.

Rationale: The production objective was latency and memory on actual edge hardware, where short convolutions measured faster than alternatives.

“we wanted to see how it performs in real life to be able to optimize the architecture, find the right operators here.”transcript, stated
“The short convs are a lot faster than all the alternatives.”transcript, stated

Use tools and recursive environments to compensate for small-model limits.

Chose Agentic deployment with web search, reliable tool use, and Python-backed recursive environments over Expecting the local model to memorize facts and handle long context unaided.

Rationale: External tools and environment design let edge models handle knowledge and context limits while preserving local latency and privacy benefits.

“a nice way to solve this issue is just providing like web search tools to the model.”transcript, stated
“But it's okay, because if you have like a recursive um language model environment, then you can use Python”transcript, stated

Deploy small local models when edge constraints dominate.

Chose Local small models for no-internet, latency-sensitive, and privacy-regulated workflows over Remote large-model calls for every workload.

Rationale: In-car, latency-sensitive, finance, and healthcare contexts make local execution more suitable than depending on remote large models.

“you will try to use the small models when you don't have uh internet connection, for example. So, in-car deployment is a good example of that”transcript, stated
“latency is also a big one. If you have a workload that is very latency sensitive, uh small models running locally are always going to be better.”transcript, stated

Gotchas (what bit them)

Embedding-heavy distilled models waste scarce edge memory.

Root cause: Small student models inherited huge teacher vocabularies, so a large share of their parameters sat in embeddings rather than effective reasoning capacity.

Resolution: Liquid reduced embedding share in LFM2 so more of the same memory footprint contributes to effective parameters.

“they have teacher models with a huge vocabulary sizes and this is why we have these super big embedding layers.”transcript, stated
“the effective parameters, the parameters that are really used for reasoning, for knowledge capacity and all that stuff are not the embedding parameters.”transcript, stated

Architectural choices that look good theoretically may not be fastest on real edge devices.

Root cause: The production bottleneck is actual target hardware throughput and memory behavior, not just model-family design.

Resolution: Liquid implemented and profiled operators on CPUs and phones before choosing gated short convolution blocks.

“we decided to say like okay, let's try to really implement it on the target hardware. So we had two target hardware here and we wanted to see how it performs in real life”transcript, stated
“you can see here on the 2 CPU, the AMD Ryzen Max Plus 395 and the Samsung Galaxy S25 Ultra.”transcript, stated

Small reasoning models can repeat indefinitely on tasks beyond their capability.

Root cause: Doom looping is especially likely when small model size, reasoning mode, and complex tasks coincide.

Resolution: Preference alignment rejects bad repetitive rollouts, and RL with verifiable rewards plus n-gram penalties further suppresses the behavior.

“it's particularly a problem if you have small models, if you have reasoning models, and if you have complex task.”transcript, stated
“if we have some doom loop here, the response for the doom loop will be rejected. So, we will train the model during preference alignment to not doom loop.”transcript, stated

SFT alone did not remove doom-loop behavior.

Root cause: The failure mode was not adequately represented or corrected by supervised examples alone.

Resolution: Liquid used DPO and reinforcement learning stages where measured doom-loop ratios dropped sharply.

“after SFT, it it barely moves. Like SFT is not the right stage to fix this.”transcript, stated
“Um after DPO, so that was our first solution, um it really reduces quite a lot, and you can see that after reinforcement learning, the problem is almost nonexistent.”transcript, stated

Knowledge and context limitations become hallucination risks if the model is used as a closed book.

Root cause: Memory-bound small models store less knowledge and have weaker long-context capacity than large models.

Resolution: The deployment strategy adds external tools and recursive environments so the model can retrieve facts and offload state.

“If you're memory bound, it means that you have low knowledge capacity. If you have no low knowledge capacity, it means that you're going to hallucinate a lot.”transcript, stated
“if you have like a recursive um language model environment, then you can use Python and and like basically take a shortcut uh to to solve this issue.”transcript, stated

Evaluation

Liquid evaluates the models through production-relevant benchmarks for knowledge, instruction following, data extraction, and tool use; real-device profiling on CPUs and mobile hardware; and doom-loop ratios across training stages.

Metrics: GPQA Diamond knowledge benchmark · IFEval instruction-following benchmark · Case report data-extraction benchmark · BFCL and Tau2Bench tool-use benchmarks · Throughput and memory on AMD Ryzen Max Plus 395 and Samsung Galaxy S25 Ultra · Doom-loop ratio after pretraining, SFT, DPO, and RL

4 supporting quotes
“you have knowledge with GPQA diamond. You have instruction following with IF bench. You have case report bench which is data extraction.”transcript, stated
“also a lot of tool use with BFCL and and Dow 2 bench.”transcript, stated
“if we look in practice and we profile the inference of these models you can see here on the 2 CPU, the AMD Ryzen Max Plus 395 and the Samsung Galaxy S25 Ultra.”transcript, stated
“that allowed us to uh really reduce the doom loop ratio.”transcript, stated

Outcomes

The case spans models from 350M to 24B parameters, a 350M model trained on 28T tokens, profiling on AMD Ryzen Max Plus 395 and Samsung Galaxy S25 Ultra, and doom-loop comparisons involving LFM 2.5 1.2B and Qwen 3.5 0.8B.

4 supporting quotes
“the short conv really allow LFM 2 architecture to be a lot faster and also use less memory.”transcript, stated
“you can see that the LFM 2.5 model is significantly better than the the previous version LFM 2 350M on a lot of different benchmarks.”transcript, stated
“Um after DPO, so that was our first solution, um it really reduces quite a lot, and you can see that after reinforcement learning, the problem is almost nonexistent.”transcript, stated
“if you combine them with agentic tools, they tend to perform really really well, and this is something that is currently underexplored.”transcript, stated