JORA: JAX Tensor-Parallel LoRA Library for Retrieval Augmented Fine-Tuning

Anique Tahir, Lu Cheng, Huan Liu
3/17/2024
cs.LGcs.CLcs.DC

No official code found. Best implementation: aniquetahir/JORA (36 stars, JAX, last commit 2024-04-25).

Abstract

The scaling of Large Language Models (LLMs) for retrieval-based tasks, particularly in Retrieval Augmented Generation (RAG), faces significant memory constraints, especially when fine-tuning extensive prompt sequences. Current open-source libraries support full-model inference and fine-tuning across multiple GPUs but fall short of accommodating the efficient parameter distribution required for retrieved context. Addressing this gap, we introduce a novel framework for PEFT-compatible fine-tuning of Llama-2 models, leveraging distributed training. Our framework uniquely utilizes JAX's just-in-time (JIT) compilation and tensor-sharding for efficient resource management, thereby enabling accelerated fine-tuning with reduced memory requirements. This advancement significantly improves the scalability and feasibility of fine-tuning LLMs for complex RAG applications, even on systems with limited GPU resources. Our experiments show more than 12x improvement in runtime compared to Hugging Face/DeepSpeed implementation with four GPUs while consuming less than half the VRAM per GPU.

View on arXivView PDF

Code Implementations(1)

aniquetahir/JORACommunity100%
JAX

JORA: JAX Tensor-Parallel LoRA Library (ACL 2024)

361PythonMar 14, 20242 years agoNOASSERTION
jaxlarge-language-modelsloramachine-learningtensor-parallelism

Similar Papers

Cite this paper

@article{tahir2024jora,
  title  = {JORA: JAX Tensor-Parallel LoRA Library for Retrieval Augmented Fine-Tuning},
  author = {Anique Tahir and Lu Cheng and Huan Liu},
  year   = {2024},
  eprint = {2403.11366},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.11366v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.11366.svg)](https://codeofpaper.com/paper/2403.11366)

Discussion