---
title: "Deep Learning over the Internet: Training Language Models Collaboratively"
description: "DeDLOC is a collaborative distributed training method that lets volunteers with heterogeneous GPUs and home Internet connections jointly pretrain language models."
url: "https://swe.quest/articles/deep-learning-over-the-internet-training-language-models-collaboratively-ae8a89a2717272e4"
canonical: "https://huggingface.co/blog/collaborative-training"
source: "Hugging Face"
published: "2021-07-15"
difficulty: "hard"
kind: "Research"
reading_minutes: 14
tags: ["model-training","distributed-systems","llms"]
---

# Deep Learning over the Internet: Training Language Models Collaboratively

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2021-07-15, 14 min read, Research. Original: [https://huggingface.co/blog/collaborative-training](https://huggingface.co/blog/collaborative-training)

## Summary

DeDLOC is a collaborative distributed training method that lets volunteers with heterogeneous GPUs and home Internet connections jointly pretrain language models. It accumulates one very large batch across all peers before each optimizer step, which tolerates peers joining and leaving, and uses an adaptive All-Reduce that splits gradient aggregation by each peer's bandwidth and reachability (firewalled nodes only send). Applied to sahajBERT, an ALBERT-large Bengali model trained by 40 volunteers plus 16 preemptible T4 instances over 234 cumulative days, it reached near state-of-the-art downstream quality. The write-up also covers the Bengali-specific tokenizer pipeline and streaming datasets so peers can start training immediately.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- data-parallel training ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- gradient accumulation
- All-Reduce
- Transformer pretraining

## Keywords

DeDLOC, Hivemind, sahajBERT, ALBERT, All-Reduce, OSCAR, Hugging Face Datasets

## Related posts

- [Distributed Training: Train BART/T5 for Summarization using 🤗 Transformers and Amazon SageMaker](https://swe.quest/articles/distributed-training-train-bart-t5-for-summarization-using-transformers-and-3537d2d4192f64f6.md): Hugging Face · 2021-04-08 · Medium · 9 min read · Model training, Cloud platforms, LLMs, Python
  BART-large-CNN can be fine-tuned for dialogue summarization on the SAMSum dataset with distributed data-parallel training on Amazon SageMaker, using the Hugging Face estimator and the Transformers Deep Learning Containers.
- [Ulysses Sequence Parallelism: Training with Million-Token Contexts](https://swe.quest/articles/ulysses-sequence-parallelism-training-with-million-token-contexts-a21775c0b516e85a.md): Hugging Face · 2026-03-09 · Hard · 13 min read · Model training, LLMs, Distributed systems, Hardware
  Ulysses Sequence Parallelism, part of Snowflake's Arctic Long Sequence Training protocol, enables training on contexts of hundreds of thousands to millions of tokens.
- [Async GRPO with LoRA across HF Jobs: a bucket, a proxy, and no NCCL](https://swe.quest/articles/async-grpo-with-lora-across-hf-jobs-a-bucket-a-proxy-and-no-nccl-a625fff69adbae9a.md): Hugging Face · 2026-09-10 · Hard · 29 min read · Model training, Inference & serving, Caching, Load balancing, LLMs
  TRL v1.14's AsyncGRPOTrainer can train a LoRA adapter and sync only that adapter to vLLM, which lets the trainer and inference replicas run as separate Hugging Face Jobs on separate machines without NCCL.
- [Swarms, Flocks, Gangs: How to build, train, and evaluate multi-agent systems](https://swe.quest/articles/swarms-flocks-gangs-how-to-build-train-and-evaluate-multi-agent-systems-94ba4fbca4851b84.md): Hugging Face · 2026-11-26 · Hard · 13 min read · AI agents, Model training, LLMs, Evaluation
  Four agents sharing one Qwen3-0.6B policy learn to pool private numbers and submit a sorted list, trained with GRPO-style group-normalized team rewards that penalize token use.
- [Pre-Train BERT with Hugging Face Transformers and Habana Gaudi](https://swe.quest/articles/pre-train-bert-with-hugging-face-transformers-and-habana-gaudi-81eabeeaee082cc4.md): Hugging Face · 2022-08-22 · Medium · 10 min read · Model training, LLMs, Hardware, Cost optimization, Python
  BERT-base can be pre-trained from scratch with masked-language modeling on an AWS DL1 instance (Habana Gaudi), using Hugging Face Transformers, Datasets and Optimum Habana.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
