PreprintCited by 36Topic ModelingPrivacy-Preserving Technologies in DataNatural Language Processing Techniques

Distributed Inference and Fine-tuning of Large Language Models Over The Internet

Open access
Borzunov, Alexander, Ryabinin, Max, Chumachenko, Artem, Baranchuk, Dmitry, Dettmers, Tim, Belkada, Younes, Samygin, Pavel, Raffel, Colin·2023·arXiv

Abstract

Large language models (LLMs) are useful in many NLP tasks and become more capable with size, with the best open-source models having over 50 billion parameters. However, using these 50B+ models requires high-end hardware, making them inaccessible to most researchers. In this work, we investigate methods for cost-efficient inference and fine-tuning of LLMs, comparing local and distributed strategies. We observe that a large enough model (50B+) can run efficiently even on geodistributed devices in a consumer-grade network. This could allow running LLM efficiently by pooling together idle compute resources of multiple research groups and volunteers. We address two open problems: (1) how to perform inference and fine-tuning reliably if any device can disconnect abruptly and (2) how to partition LLMs between devices with uneven hardware, joining and leaving at will. In order to do that, we develop special fault-tolerant inference algorithms and load-balancing protocols that automatically assign devices to maximize the total system throughput. We showcase these algorithms in Petals - a decentralized system that runs Llama 2 (70B) and BLOOM (176B) over the Internet up to 10x faster than offloading for interactive generation. We evaluate the performance of our system in simulated conditions and a real-world setup spanning two continents.

AI snapshot

Written from the paper’s full text.

TL;DR

The paper develops fault-tolerant distributed inference and parameter-efficient fine-tuning algorithms for 50B+ LLMs running across unreliable, geo-distributed consumer devices. It implements them in PETALS and shows Llama 2 (70B) and BLOOM (176B) can run over the Internet up to 10× faster than offloading for interactive generation.

Key findings

  • PETALS runs Llama 2 (70B) and BLOOM (176B) over the Internet up to 10× faster than offloading for interactive generation, and ≥10× faster in realistic network conditions.
  • For BLOOM (176B) on 3× A100 (80 GB), sequential inference reached 1.71 steps/s at 1 Gbit/s and <5 ms RTT versus 0.0495 steps/s for offloading; on 10× RTX 3090 it reached 1.17 steps/s versus 0.0427 steps/s for offloading.
  • In a real-world setup with 14 heterogeneous servers across Europe and North America, BLOOM reached 0.83 steps/s sequential inference, versus 0.18 steps/s for the theoretical-best offloading baseline.
  • The fault-tolerant algorithm handled failures better than baselines: for BLOOM (7.1B) at 1024 tokens and failure rate 1e-2, it achieved 2.17 steps/s, while cache-less inference achieved 0.89 steps/s and caching with restarts did not finish within 1 hour.
  • Full load balancing maintained connectivity and stayed within 10–15% of the upper-bound throughput most of the time in simulations with 206 virtual instances.

Methods

  • The paper formulates fault-tolerant distributed autoregressive inference using dual attention caches: server-side caches hold past keys/values, while client-side caches hold past inputs so another server can restore state after a failure. It also develops decentralized load balancing that assigns contiguous transformer blocks to servers to maximize total system throughput.
  • Experiments cover BLOOM (7.1B) with simulated failures, Llama 2 (70B) and BLOOM (176B) under controlled bandwidth/latency, and BLOOM in a real-world setup with 14 servers using 2×RTX 3060, 4×2080Ti, 2×3090, 2×A4000, and 4×A5000 GPUs across Europe and North America.
  • Main analyses benchmark sequential inference (steps/s) and parallel forward passes (tokens/s), comparing the distributed system against parameter offloading, local pipeline parallelism with NVLink, and theoretical-best offloading.

Limitations

  • The paper states privacy is a key limitation: servers hosting the first model blocks may use their inputs to recover client data, so sensitive data should use trusted servers or an isolated network. It also notes possible supply/demand imbalance because clients need not run servers, and security risks from faulty servers returning incorrect outputs.
  • The paper states the greedy load-balancing algorithm is not proven to find the exact optimal assignment; computational experiments found it usually achieves 90–100% of the optimal throughput.
  • The text makes evident that the real-world setup is slower than A100 benchmarks due to slower hardware, and that fault tolerance assumes every block is hosted on several servers, an assumption examined in the next section.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2312.08361

Cites

0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Claims the paper makes

2 of 10 cited sources checked · 1 supported · 0 flagged · accuracy not yet measured

  • Findingcitation

    If none of the servers fail, the fault-tolerant algorithm recovers O(n • t) communication, similarly to Aminabadi et al. (2022).

    “If none of the servers fail, we recover O(n • t) communication, similarly to Aminabadi et al. (2022).”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites Aminabadi et al. (2022) source

      The PCC section discusses GPU all-to-all communication latency, giving bounds of O(p/L) and O(p/L) + O(L). Searches for fault tolerance, server failures, and O(n • t) communication found no passage addressing the claimed failure-free case. (LLM, conf=0.76)

      Experimental — accuracy not yet measured
    • The authors state this as an assumption: Every block is hosted on several servers.
  • Findingown data

    Our system significantly outperforms offloading even when each GPU node runs its own client doing single-batch inference at the same time.

    “Crucially, our system significantly outperforms offloading even when each GPU node runs its own client doing single-batch inference at the same time.”
    Quote in the paperSubstantial claim
  • Findingnone given

    Inference is more challenging than fine-tuning for cost-efficient setups.

    “Counter-intuitively, we found that inference is more challenging than fine-tuning for cost-efficient setups.”
    Quote in the paperSubstantial claim
  • Findingown data

    With realistic network speeds, the distributed algorithms perform autoregressive generation ≥10× faster than local offloading.

    “With realistic network speeds, our distributed algorithms perform autoregressive generation ≥10× faster than local offloading.”
    Quote in the paperSubstantial claim
  • Findingnone given

    Fine-tuning forward passes for large batches are affected by both bandwidth and latency.

    “In turn, fine-tuning forward passes for large batches are affected by both bandwidth and latency.”
    Quote in the paperSubstantial claim
  • Classified as probably not a substantial claim. 7
  • May combine two claims. 21
  • The quote only partly states this claim. 1
  • Classified as probably not a substantial claim.

    Premisecitation

    Language model quality tends to improve as model scale increases.

    “Their quality tends to improve as we increase model scale (Radford et al., 2019;Kaplan et al., 2020).”
    Quote in the paperSubstantial claim1 of 2 sources checked
    • cites Radford et al., 2019

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Kaplan et al., 2020
  • May combine two claims.

    Findingreasoning

    Cache-less inference can be competitive for short sequences (128 tokens), but slows down considerably on 1024 tokens.

    “Finally, the cache-less inference can be competitive for short sequences (128 tokens), but slows down considerably on 1024 tokens, which agrees with our intuition from 3.1.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    For inference, performance does not depend much on bandwidth or sequence length but degrades with higher latency.

    “For inference, performance does not depend much on bandwidth or sequence length but degrades with higher latency.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning

    Training an n-layer model on a sequence of t tokens needs O(n) communication rounds, while generating the same sequence needs O(n • t) rounds.

    “In case of model parallelism, training an n-layerfoot_2 model on a sequence of t tokens needs O(n) communication rounds, while generating the same sequence needs O(n • t) rounds, making it more susceptible to network latency.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    The offloading baseline is about an order of magnitude slower than our system for inference, both in practice and in the theoretical-best setup assuming an infinite GPU performance.

    “We can see that the offloading baseline is about an order of magnitude slower than our system for inference, both in practice and in the theoretical-best setup assuming an infinite GPU performance.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingnone given

    Caching with restarts is most efficient for inference without failures, with our algorithm being somewhat slower due to less mature implementation.

    “Caching with restarts is most efficient for inference without failures, with our algorithm being somewhat slower due to less mature implementation.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Unlike baselines, our algorithm provides reasonable performance in all tested conditions, especially for higher failure rates.

    “Unlike baselines, our algorithm provides reasonable performance in all tested conditions, especially for higher failure rates common for communicating over the Internet, using spot/preemptible instances or unreliable hardware).”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    Quantization has about 5% of overhead with batch size 1 (20 tokens), but becomes negligible for larger batches.

    “In terms of inference time, Table 5 demonstrates that quantization has about 5% of overhead with batch size 1 (20 tokens), but becomes negligible for larger batches.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingreasoning

    Moving client-side computations to GPU does not visibly improve performance in the sequence classification setup because the client does not perform any heavy operations.

    “Notably, we observe that moving client-side computations to GPU does not visibly improve performance, since the client does not perform any heavy operations in this setup”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Increasing prompt length and decreasing batch size make training slower.

    “Increasing prompt length and decreasing batch size also make training slower.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    The full load balancing maintains connectivity throughout the experiment and achieves throughput close to the upper bound, staying within the 10-15% range most of the time.

    “The full load balancing maintains connectivity throughout the experiment and achieves throughput close to the upper bound (staying within the 10-15% range most of the time).”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning

    The algorithm needs to send O(t) data (in one round) for each failed server and compute only the stages held by the failed servers.

    “When servers fail, the algorithm needs to send O(t) data (in one round) for each failed server and compute only the stages held by the failed servers.”
    Quote in the paperSubstantial claim
    • The authors state this as an assumption: Every block is hosted on several servers.
  • May combine two claims.

    Findingreasoning

    Running naïvely would require 44 RTX 3070 GPUs and 44 communication rounds.

    “However, the GPU memory can only hold a small fraction of model layers: running naïvely would require 44 RTX 3070 GPUs and 44 communication rounds.”
    Quote in the paperSubstantial claim
  • The quote only partly states this claim.

    Findingown data

    8-bit quantization has little effect on LLM quality for major benchmarks.

    “As shown in Table 4, this method has little effect on LLM quality for major benchmarks.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Higher thresholds p perform slightly worse during peak times but require only relatively infrequent block replacements, unlike the case with p = 1%.

    “Higher thresholds p perform slightly worse during peak times but require only relatively infrequent block replacements, unlike the case with p = 1%.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Premisecitation

    Dynamic blockwise quantization of hidden states before pipeline-parallel communication halves the bandwidth requirements without any noticeable effect on generation quality.

    “To send less data between subsequent pipeline stages, we apply dynamic blockwise quantization (Dettmers et al., 2022b) to the hidden states before pipeline-parallel communication, which halves the bandwidth requirements without any noticeable effect on generation quality (Ryabinin et al., 2023).”
    Quote in the paperSubstantial claim0 of 2 sources checked
    • cites Dettmers et al., 2022b

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Ryabinin et al., 2023

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • May combine two claims.

    Premisecitation

    Parameter-efficient fine-tuning methods are often competitive with full model fine-tuning and even outperform it in low-data regimes.

    “Despite their lower memory requirements, parameter-efficient approaches are often competitive with full model fine-tuning (Hu et al., 2021;Liu et al., 2021a;Yong & Nikoulina, 2022) and even outperform it in low-data regimes (Liu et al., 2022a).”
    Quote in the paperNot a substantial claim0 of 3 sources checked
    • cites Hu et al., 2021

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Liu et al., 2021a

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Yong & Nikoulina, 2022 source

      Not checked in the free run.

  • May combine two claims.

    Premisecitation

    8-bit mixed matrix decomposition roughly halves the memory footprint compared to 16-bit weights with negligible effect on the model quality.

    “This decomposition separates hidden states and weights into two portions: about 0.1% of 16-bit outlier and 99.9% of 8-bit regular values, which roughly halves the memory footprint with negligible effect on the model quality (see evaluations in Appendix A).”
    Quote in the paperSubstantial claim0 of 1 sources checked
    • cites Dettmers et al., 2022a

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • Classified as probably not a substantial claim.

    Study design and conductnone given

    In experiments, the same optimizations are applied to baseline systems for a fair comparison.

    “In experiments, we apply the same optimizations to baseline systems for a fair comparison.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S4 (based).

    Premisenone given

    The overall throughput is the minimum of throughputs among model blocks.

    “we choose to cover the minimums first because the overall throughput is the minimum of throughputs among model blocks”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S4 (based).

    Interpretationnone given

    The system runs persistently with the help of volunteers.

    “The system runs persistently with the help of volunteers.”
    Quote in the paperNot a substantial claim
  • Classified as probably not a substantial claim.

    Interpretationreasoning

    The fully decentralized nature of these protocols allows participants to add or remove their devices at any point, making optimal use of GPU idle time.

    “The fully decentralized nature of these protocols allows participants to add or remove their devices at any point, making optimal use of GPU idle time.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Interpretationreasoning

    Using the assignment leading to the upper bound is not possible in practice because it requires each server to load a different set of layers every minute and solving a computationally expensive optimization problem.

    “Note that using the assignment leading to the upper bound is not possible in practice since it requires each server to load a different set of layers every minute, on top of solving the computationally expensive optimization problem.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Interpretationreasoning

    Offloading 176B parameters takes at least 5.5 seconds, giving an upper bound of about 0.18 tokens/s for inference speed.

    “As such, offloading 176B parameters takes at least: 176 GB • 8 256 Gbit/s = 5.5 seconds This gives the upper bound of 1/5.5 ≈ 0.18 tokens/s for the inference speed.”
    Quote in the paperNot a substantial claim
    • The authors state this as an assumption: Offloading latency is zero in the upper bound estimation.
  • Probably not a substantial claim: may not pass S4 (based).

    Interpretationreasoning

    Some servers in practice may be faulty and return incorrect outputs instead of the actual results of forward and backward passes.

    “In practice, some of them may turn out to be faulty and return incorrect outputs instead of the actual results of forward and backward passes.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based).

    Interpretationnone given

    A key limitation of our approach is that servers hosting the first model blocks may use their inputs to recover client data.

    “A key limitation of our approach is that servers hosting the first model blocks may use their inputs to recover client data.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Interpretationreasoning

    The greedy heuristic allows servers to quickly close the gaps if a substantial share (up to 100%) of servers holding certain blocks leave, but avoids excess block replacements otherwise.

    “To conclude, this greedy heuristic allows servers to quickly close the gaps if a substantial share (up to 100%) of servers holding certain blocks leave, but avoids excess block replacements otherwise.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Interpretationreasoning

    The validator approach still leaves a chance of receiving wrong outputs, but allows to eventually expose and penalize faulty servers.

    “While this approach still leaves a chance of receiving wrong outputs, it allows to eventually expose and penalize the faulty servers.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Interpretationreasoning

    The client performs only a small share of GPU computations in the forward and backward passes, and a particular model head and a loss function do not have decisive influence on the performance.

    “Indeed, the client performs only a small share of GPU computations in the forward and backward passes, and a particular model head and a loss function do not have decisive influence on the performance.”
    Quote in the paperNot a substantial claim
29 of 29
  • The authors state this as an assumption.

    Every block is hosted on several servers.

    “For simplicity, we assume that every block is hosted on several servers and examine this assumption in the next section.”
  • The authors state this as an assumption.

    Each server holds a segment of consecutive transformer blocks to minimize inference latency.

    “We assume that each server holds a segment of consecutive transformer blocks to minimize inference latency.”
  • The authors state this as an assumption.

    Each server belongs to a different person, and multiple people (possibly all) are interested in running inference or fine-tuning at the same time.

    “We assume that each server belongs to a different person, and multiple people (possibly, all of them) are interested in running inference or fine-tuning at the same time.”
  • The paper relies on this without support.

    Using 50B+ models requires high-end hardware, making them inaccessible to most researchers.

    “However, using these 50B+ models requires high-end hardware, making them inaccessible to most researchers.”
  • The paper relies on this without support.

    OPT-175B and BLOOM-176B need over 350 GB accelerator memory for inference and even more for fine-tuning.

    “For example, OPT-175B and BLOOM-176B need over 350 GB accelerator memory for inference and even more for fine-tuning.”
  • The paper relies on this without support.

    Existing LM algorithms are not designed to run inference with unreliable devices or high-latency networks.

    “However, existing LM algorithms are not designed to run inference with unreliable devices or highlatency networks.”
  • The authors state this as an assumption.

    Servers in the system are run by many independent parties.

    “We assume that servers in our system are run by many independent parties.”
  • The authors state this as an assumption.

    Offloading latency is zero in the upper bound estimation.

    “We assume an offloading latency of zero in the upper bound estimation.”
  • The authors state this as an assumption.

    The throughput values used in the block assignment experiments are realistic to the setup.

    “given that the values of throughput are realistic to our setup”
9 of 9

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

  • The stated test sequence length conflicts with Table 1

    Minor

    The methods text says the comparison generates a sequence of length 512, but Table 1 reports results for 128- and 1024-token sequences.

  • Beam-search example assigns a cache to the wrong position

    Minor

    Under the stated indexing rule, [2, 2, 1, 3, 2] uses the second previous sequence for new positions 1, 2, and 5-not positions 1, 3, and 5.

2 of 2

Cites

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 11

  1. BigScience, Microsoft, and NVIDIA. The fork of Megatron-LM and Megatron-DeepSpeed by BigScience. https://github.com/bigscience-workshop/Megatron-DeepSpeed, 2022.
  2. Dettmers, T., Lewis, M., Shleifer, S., and Zettlemoyer, L. 8-bit optimizers via block-wise quantization. International Conference on Learning Representations (ICLR), 2022b.
  3. Houlsby, N., Giurgiu, A., Jastrzebski, S., Morrone, B., De Laroussilhe, Q., Gesmundo, A., Attariyan, M., and Gelly, S. Parameter-efficient transfer learning for nlp. In International Conference on Machine Learning, pp. 2790-2799. PMLR, 2019.
  4. Huang, Y., Cheng, Y., Bapna, A., Firat, O., Chen, D., Chen, M., Lee, H., Ngiam, J., Le, Q. V., Wu, Y., et al. Gpipe: Efficient training of giant neural networks using pipeline parallelism. In Advances in Neural Information Processing Systems, pp. 103-112, 2019.
  5. Jia, Z., Zaharia, M., and Aiken, A. Beyond data and model parallelism for deep neural networks. In Talwalkar, A., Smith, V., and Zaharia, M. (eds.), Proceedings of Machine Learning and Systems, volume 1, pp. 1-13, 2019. URL https://proceedings.mlsys.org/paper/2019/ file/c74d97b01eae257e44aa9d5bade97baf-Paper.pdf.
  6. Krizhevsky, A., Sutskever, I., and Hinton, G. E. Imagenet classification with deep convolutional neural networks. In Pereira, F., Burges, C. J. C., Bottou, L., and Weinberger, K. Q. (eds.), Advances in Neural Information Processing Systems 25, pp. 1097-1105.
  7. Liu, H., Tam, D., Muqeeth, M., Mohta, J., Huang, T., Bansal, M., and Raffel, C. Few-shot parameter- efficient fine-tuning is better and cheaper than in-context learning, 2022b. URL https://arxiv. org/abs/2205.05638.
  8. Ryabinin, M., Dettmers, T., Diskin, M., and Borzunov, A. SWARM Parallelism: Training Large Models Can Be Surprisingly Communication-Efficient. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 29416- 29440. PMLR, 23-29 Jul 2023. URL https://proceedings.mlr.press/v202/ryabinin23a. html.
  9. Sung, Y.-L., Nair, V., and Raffel, C. Training neural networks with fixed sparse masks. Advances in Neural Information Processing Systems, 2021.
  10. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 30, pp. 5998-6008.
  11. Curran Associates, Inc., 2017. URL http://papers.nips.cc/ paper/7181-attention-is-all-you-need.pdf.

Cited by

Sorted by citations

Authors
Borzunov, A., Ryabinin, M., Chumachenko, A., Baranchuk, D., Dettmers, T., Belkada, Y., Samygin, P., & Raffel, C.
Venue
arXiv
Publisher
arXiv
Published
2023
Pages
12312-12331
ISSN
1049-5258 (ISSN-L)
OpenAlex
W7133215307
Cited by
35
References
0
Citations by year
2026: 18 · 2025: 6 · 2024: 11
FWCI
6.21
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion, other-oa)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Privacy-Preserving Technologies in Data
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
Keywords
distributed inference, large language models, fine-tuning, internet-based training, distributed computing

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Claims read by deepseek-v4.1-flash under definition version 3 (extract-v3) on 2026-10-31.

Classified by jev-1.13-20260917 (gold-guideline-v0.2) on 2026-10-31.

Cited sources are checked by gpt-6-sol.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review