Papers › MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases

MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases

22 Feb 2024arXiv:2402.14905archive 2025-07-28

Zechun Liu, Changsheng Zhao, Forrest Iandola, Chen Lai, Yuandong Tian, Igor Fedorov, Yunyang Xiong, Ernie Chang, Yangyang Shi, Raghuraman Krishnamoorthi, Liangzhen Lai, Vikas Chandra

This paper addresses the growing need for efficient large language models (LLMs) on mobile devices, driven by increasing cloud costs and latency concerns. We focus on designing top-quality LLMs with fewer than a billion parameters, a practical choice for mobile deployment. Contrary to prevailing belief emphasizing the pivotal role of data and parameter quantity in determining model quality, our investigation underscores the significance of model architecture for sub-billion scale LLMs. Leveraging deep and thin architectures, coupled with embedding sharing and grouped-query attention mechanisms, we establish a strong baseline network denoted as MobileLLM, which attains a remarkable 2.7%/4.3% accuracy boost over preceding 125M/350M state-of-the-art models. Additionally, we propose an immediate block-wise weight-sharing approach with no increase in model size and only marginal latency overhead. The resultant models, denoted as MobileLLM-LS, demonstrate a further accuracy enhancement of 0.7%/0.8% than MobileLLM 125M/350M. Moreover, MobileLLM model family shows significant improvements compared to previous sub-billion models on chat benchmarks, and demonstrates close correctness to LLaMA-v2 7B in API calling tasks, highlighting the capability of small models for common on-device use cases.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 28 code samples harvested from 4 repositories linked to this paper: 11 ran (of which 6 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 0 violated, 9 with no contract checked; 1 where Syntology's instrument failed) · 17 unverified. Where Syntology's instrument failed: 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 10 samples from 1 repository, 6 ran (6 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 16 samples from 2 repositories, 5 ran (4 with no instrument failure; 1 where Syntology's instrument failed); community: 2 samples from 1 repository, 0 ran (0 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

facebookresearch/mobilellm officialmentioned in papermentioned on GitHubpytorchSyntology: 10 samples, 6 ran (0 instrument-failed) · 4 unverified report
facebookresearch/LLM-QAT mentioned on GitHubpytorchSyntology: 8 samples, 2 ran (0 instrument-failed) · 6 unverified report
facebookresearch/spinquant mentioned on GitHubpytorchNOASSERTIONSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SpinQuant: LLM quantization with learned rotations (arXiv:2405.16406; that paper's own run record: 10 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 1 honoured, 0 violated, 4 with no contract checked; 5 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
jingyaogong/minimind mentioned on GitHubpytorchSyntology: 8 samples, 3 ran (1 instrument-failed) · 5 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

28 samples harvested: 11 ran (of which 6 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 0 violated, 9 with no contract checked; 1 where Syntology's instrument failed) · 17 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran; the contract check could not run
9ran
17unverified

Licence: 20 of the 28 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 4 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

facebookresearch/mobilellm official repository 10 samples, 6 ran (0 instrument-failed) · 4 unverified
LlamaDynamicNTKScalingRotaryEmbedding in 6 papers utils/modeling_llama.py ran fingerprinted licence not identified · pointer only · a70d6d3c2afe50fe · report fixture: signature x:Tensor/3/float, position_ids:Tensor/2/int · returned tuple · level recorded 2026-09-24
LlamaLinearScalingRotaryEmbedding in 6 papers utils/modeling_llama.py ran fingerprinted licence not identified · pointer only · 0b85db0b5fb36aa3 · report fixture: signature x:Tensor/3/float, position_ids:Tensor/2/int · returned tuple · level recorded 2026-09-24
LlamaMLP in 13 papers utils/modeling_llama.py ran · metamorphic tier: deterministic fingerprinted licence not identified · pointer only · fd1eec3e84da40f6 · report fixture: returned LlamaMLP · level recorded 2026-09-22
LlamaPreTrainedModel utils/modeling_llama.py ran · metamorphic tier: deterministic licence not identified · pointer only · c9b44d1ee2b9d567 · report fixture: returned LlamaPreTrainedModel · level recorded 2026-09-22
LlamaRotaryEmbedding in 13 papers utils/modeling_llama.py ran · metamorphic tier: deterministic fingerprinted licence not identified · pointer only · 29fb31107100b259 · report fixture: returned LlamaRotaryEmbedding · level recorded 2026-09-22
LlamaSdpaAttention utils/modeling_llama.py ran licence not identified · pointer only · 56c331e4f0ffb350 · report fixture: signature hidden_states:Tensor/3/float, attention_mask:NoneType/0/?, position_ids:Tensor/2/int, past_key_value:NoneType/0/?, output_attentions:bool/0/bool, use_cache:bool/0/bool, cache_position:NoneType/0/? · returned tuple · level recorded 2026-09-24
LlamaAttention in 15 papers utils/modeling_llama.py unverified licence not identified · pointer only · f7eec176aae368de · report
LlamaDecoderLayer in 11 papers utils/modeling_llama.py unverified licence not identified · pointer only · 287760d8764c9f55 · report
LlamaFlashAttention2 utils/modeling_llama.py unverified licence not identified · pointer only · 9311b50f80e60c54 · report
LlamaModel in 9 papers utils/modeling_llama.py unverified licence not identified · pointer only · 6586f04f76b3fad7 · report
facebookresearch/LLM-QAT community (archive-listed) 8 samples, 2 ran (0 instrument-failed) · 6 unverified
LlamaConfig in 6 papers models/modeling_llama_quant.py ran licence not identified · pointer only · eae5ddb4e89f48a1 · report fixture: returned LlamaConfig · level recorded 2026-09-22
LlamaRMSNorm in 9 papers models/modeling_llama_quant.py ran licence not identified · pointer only · b601acb1c084205e · report fixture: returned LlamaRMSNorm · level recorded 2026-09-22
LlamaAttention in 15 papers models/modeling_llama_quant.py unverified licence not identified · pointer only · ae14385b5684f28e · report
LlamaDecoderLayer in 11 papers models/modeling_llama_quant.py unverified licence not identified · pointer only · 4d865933cc1c7185 · report
LlamaForCausalLM models/modeling_llama_quant.py unverified licence not identified · pointer only · 941348872c1175c4 · report
LlamaMLP in 13 papers models/modeling_llama_quant.py unverified licence not identified · pointer only · 96f0ec4ad32ef95e · report
LlamaModel in 9 papers models/modeling_llama_quant.py unverified licence not identified · pointer only · c9a1b892ddcc160b · report
QuantizeLinear in 5 papers models/modeling_llama_quant.py unverified licence not identified · pointer only · 3013c6ea70f1983f · report
jingyaogong/minimind community (archive-listed) 8 samples, 3 ran (1 instrument-failed) · 5 unverified
RMSNorm in 61 papers model/model_minimind.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · a8a84e7ddb0551b0 · report fixture: returned RMSNorm · level recorded 2026-09-22
precompute_freqs_cis in 112 papers model/model_minimind.py ran · honoured contract Apache-2.0 (permissive) · 9c1c3b7f0fe82a6d · report fixture: signature dim:int/0/int, end:int/0/int, rope_base:float/0/float, rope_scaling:dict/0/? · returned tuple · level recorded 2026-09-22
repeat_kv in 244 papers
census: 15 implementations from 60 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 4, kind float, dtype float32
model/model_minimind.py ran; the contract check could not run (RAISES) fingerprinted Apache-2.0 (permissive) · 226c2c7378c2826e · report fixture: signature x:Tensor/4/float, n_rep:int/0/int · returned Tensor · level recorded 2026-09-22
MiniMindBlock model/model_minimind.py unverified Apache-2.0 (permissive) · a34a56cc2de22f8f · report
MiniMindForCausalLM model/model_minimind.py unverified Apache-2.0 (permissive) · 59ce4efe16d7b6e4 · report
MiniMindModel model/model_minimind.py unverified Apache-2.0 (permissive) · 6c359011117cb016 · report
facebookresearch/MobileLLM-R1 community 2 samples, 0 ran · 2 unverified
get_folder_paths pretrain/pretrain.py unverified licence not identified · pointer only · 9a433eced0086de3 · report
get_logger in 383 papers pretrain/pretrain.py unverified licence not identified · pointer only · e3820b27e772b468 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

3 assemblies on this paper: 3 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

3 sibling assemblies for MobileLLM (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for MobileLLM (graph method: MobileLLM). 15 bricks; individually on a fixture: 11 ran (of which 4 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 4 where Syntology's instrument failed) · 4 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. LlamaModel entry · level 0 · unverified · 6586f04f76b3fad7
  2. LlamaDecoderLayer model · level 0 · unverified · 287760d8764c9f55
  3. LlamaPreTrainedModel helper · level 1 · ran · c9b44d1ee2b9d567
  4. LlamaRMSNorm model · level 1 · ran · 50ff7976d78544ac
  5. LlamaMLP model · level 1 · ran · fd1eec3e84da40f6
  6. LlamaAttention model · level 0 · unverified · f7eec176aae368de
  7. LlamaFlashAttention2 model · level 0 · unverified · 9311b50f80e60c54
  8. LlamaRotaryEmbedding model · level 1 · ran · 29fb31107100b259
  9. LlamaSdpaAttention model · level 1 · ran · 56c331e4f0ffb350
  10. _get_unpad_data helper · level 1 · ran · our draft was wrong · 180b7fb4f14752ec
  11. apply_rotary_pos_emb helper · level 1 · ran · our draft was wrong · 583539efd6fd01fb
  12. repeat_kv helper · level 2 · ran; the contract check could not run · 3c76e52815c5401d
  13. rotate_half helper · level 1 · ran · our draft was wrong · e03d53ba9d4f9ae5
  14. LlamaDynamicNTKScalingRotaryEmbedding model · level 1 · ran · a70d6d3c2afe50fe
  15. LlamaLinearScalingRotaryEmbedding model · level 1 · ran · 0b85db0b5fb36aa3

harvested Assembly for MobileLLM (graph method: MobileLLM). 11 bricks; individually on a fixture: 6 ran (of which 4 constructed an object rather than computing a result; 5 with no instrument failure: 1 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. MiniMindForCausalLM entry · level 0 · unverified · 59ce4efe16d7b6e4
  2. MiniMindConfig model · level 1 · ran · b2a516613396ed08
  3. MiniMindModel model · level 0 · unverified · 6c359011117cb016
  4. MOEFeedForward model · level 1 · ran · ca104baa2bcf757c
  5. MiniMindBlock model · level 0 · unverified · a34a56cc2de22f8f
  6. RMSNorm model · level 1 · ran · a8a84e7ddb0551b0
  7. precompute_freqs_cis helper · level 1 · ran · honoured contract · 9c1c3b7f0fe82a6d
  8. FeedForward model · level 1 · ran · 549cdd919dd3f999
  9. Attention model · level 0 · unverified · 21b27f7007d54dbc
  10. apply_rotary_pos_emb helper · level 0 · unverified · 415c32c683875908
  11. repeat_kv helper · level 1 · ran; the contract check could not run (RAISES) · 226c2c7378c2826e

harvested Assembly for MobileLLM (graph method: MobileLLM). 15 bricks; individually on a fixture: 9 ran (of which 5 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. LlamaForCausalLM entry · level 0 · unverified · 941348872c1175c4
  2. LlamaModel model · level 0 · unverified · c9a1b892ddcc160b
  3. LlamaConfig helper · level 1 · ran · eae5ddb4e89f48a1
  4. LlamaDecoderLayer model · level 0 · unverified · 4d865933cc1c7185
  5. LlamaRMSNorm model · level 1 · ran · b601acb1c084205e
  6. _expand_mask helper · level 1 · ran · our draft was wrong · 24b08fbedd93aff0
  7. _make_causal_mask helper · level 1 · ran; the contract check could not run · c5c590da5a7c2a3f
  8. LlamaAttention model · level 0 · unverified · ae14385b5684f28e
  9. LlamaMLP model · level 0 · unverified · 96f0ec4ad32ef95e
  10. LlamaRotaryEmbedding model · level 1 · ran · 5f256ecadc2081af
  11. QuantizeLinear helper · level 0 · unverified · 3013c6ea70f1983f
  12. SymQuantizer helper · level 1 · ran · 1a1205f283561273
  13. apply_rotary_pos_emb helper · level 1 · ran; the contract check could not run · 9a65a30d006fc96e
  14. AsymQuantizer helper · level 1 · ran · 50a961390acac748
  15. rotate_half helper · level 1 · ran · our draft was wrong · e03d53ba9d4f9ae5

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2402.14905") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AttentionDense ConnectionsFeedforward NetworkFocusGrouped-query attentionSoftmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections