Skip to main content
QUICK REVIEW

[论文解读] Git-Theta: A Git Extension for Collaborative Development of Machine Learning Models

Nikhil Kandpal, Brian Lester|arXiv (Cornell University)|Jun 7, 2023
Software Engineering Research被引用 5
一句话总结

Git-Theta 是一个 Git 扩展,通过将模型检查点视为结构化的参数组而非二进制大对象(blobs),实现了机器学习模型的协作式、版本化开发。它支持通信高效的更新、模型变更的自动合并以及细粒度的版本追踪,从而降低存储和传输成本,同时支持协作式模型演化——在 LoRA 更新中仅需 0.27 GB 存储空间,在词汇表变更中仅需 1024 kB。

ABSTRACT

Currently, most machine learning models are trained by centralized teams and are rarely updated. In contrast, open-source software development involves the iterative development of a shared artifact through distributed collaboration using a version control system. In the interest of enabling collaborative and continual improvement of machine learning models, we introduce Git-Theta, a version control system for machine learning models. Git-Theta is an extension to Git, the most widely used version control software, that allows fine-grained tracking of changes to model parameters alongside code and other artifacts. Unlike existing version control systems that treat a model checkpoint as a blob of data, Git-Theta leverages the structure of checkpoints to support communication-efficient updates, automatic model merges, and meaningful reporting about the difference between two versions of a model. In addition, Git-Theta includes a plug-in system that enables users to easily add support for new functionality. In this paper, we introduce Git-Theta's design and features and include an example use-case of Git-Theta where a pre-trained model is continually adapted and modified. We publicly release Git-Theta in hopes of kickstarting a new era of collaborative model development.

研究动机与目标

  • 为解决机器学习模型开发中缺乏协作式版本控制的问题,即模型通常孤立训练且被视为单体二进制大对象(blobs)。
  • 实现对模型参数变更的细粒度、通信高效的追踪,灵感来源于近期关于低秩适应(low-rank adaptation)和参数高效微调的研究。
  • 支持对独立训练的模型更新进行自动合并,实现在无需完整微调的情况下协作演化模型。
  • 通过为 Git 添加模型感知的版本控制能力,无缝集成到现有的基于 Git 的软件开发工作流中。
  • 提供可插拔架构,支持新更新类型、合并策略和检查点格式的扩展。

提出的方法

  • Git-Theta 扩展 Git,将模型检查点视为参数组张量的集合,实现在参数级别而非单体文件级别的版本控制。
  • 它利用参数高效微调方法(如 LoRA、adapters)将更新表示为小型稀疏张量,极大降低存储和通信开销。
  • 系统使用 Git LFS 和 TensorStore 高效存储和压缩模型检查点,尤其在高精度到低精度转换时优势显著。
  • 它引入插件系统,允许用户定义新的更新类型、合并策略和检查点格式,提升可扩展性。
  • Git-Theta 通过操作参数组数值实现模型更新的自动合并,类似于 Git 的合并逻辑,但应用于模型参数。
  • 它通过比较参数组变更提供有意义的差异报告,揭示模型演化过程中的变化。
Figure 1: An overview of how Git-Theta manages a model checkpoint file during the five basic Git operations. The flow of data between the working tree, staging area, and remote associated with each Git command (left) is shown by the arrows matching the command’s color. For simplicity we include .git
Figure 1: An overview of how Git-Theta manages a model checkpoint file during the five basic Git operations. The flow of data between the working tree, staging area, and remote associated with each Git command (left) is shown by the arrows matching the command’s color. For simplicity we include .git

实验结果

研究问题

  • RQ1能否利用现有 Git 基础设施,实现对参数级变更的细粒度追踪,使模型开发具备协作性与版本控制?
  • RQ2能否在版本控制系统中原生支持通信高效的更新(如 LoRA、adapters),以降低存储和传输成本?
  • RQ3能否在大规模场景下实现对独立训练模型更新的自动合并,同时保持模型性能并支持协作演化?
  • RQ4Git-Theta 的存储与性能开销与传统的基于二进制大对象的模型追踪系统(如 DVC 或 MLflow)相比如何?
  • RQ5通过插件架构,Git-Theta 在多样的模型架构、更新类型和合并策略方面可扩展到何种程度?

主要发现

  • Git-Theta 将基于 LoRA 的更新存储量减少至仅 0.27 GB,显著优于基于二进制大对象的系统。
  • 涉及移除词汇表索引的模型更新仅需 1024 kB 存储空间,凸显系统高效追踪稀疏、非密集变更的能力。
  • 当修改的参数更少时,处理时间减少,表明选择性参数更新带来了性能优势。
  • 系统成功合并了来自不同贡献者的模型更新——例如,将 RTE 和 ANLI 微调模型合并——结果在 RTE 任务上性能提升,与先前研究预测一致。
  • Git-Theta 使用 TensorStore 实现了有效压缩,尤其在首次提交时显著降低高精度模型检查点的存储成本。
  • 系统证明了使用 Git-Theta 进行协作式模型开发的可行性,如在真实案例中,T0 3B 模型在多个任务上被逐步更新并成功合并。
Figure 2: Relative space saving of Git-Theta over Git LFS. Space savings are most apparent when using parameter-efficient training methods. Even when fine-tuning, where all parameters are updated and therefore need to be saved, Git-Theta still reduces storage requirements thanks to the way TensorSto
Figure 2: Relative space saving of Git-Theta over Git LFS. Space savings are most apparent when using parameter-efficient training methods. Even when fine-tuning, where all parameters are updated and therefore need to be saved, Git-Theta still reduces storage requirements thanks to the way TensorSto

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。