hottub.patents
US 12,650,779 B2#3222309 Most CitedActiveUnited States (USPTO)Utility

Method and system of managing memory usage in a data learning operation

0Forward Citations (#3222309 Global)
0.0/yrCitation Velocity (#3222309 Global)
0.00Citation PageRank (#3222309 Global)
5Prior Art Cited
8Structured Claims
0Drawings / Sheets

Abstract

Methods and systems for managing memory usage in data learning operations. The method includes profiling one or more objects used for training in the data learning operation, in which the profiling includes determining an object size, a memory allocation timestamp, and a memory deallocation timestamp; and scheduling the memory usage. The scheduling includes grouping the one or more objects into the one or more groups based on the memory allocation and/or the memory deallocation timestamp of the one or more objects, and arranging the one or more objects in the one or more groups in descending order in a memory space. Two or more objects are provided in the descending order in the memory space, in which one of the objects having an earliest memory allocation timestamp is provided at a first value and the other object having a later memory allocation timestamp is provided at a second value.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 0.

Claims (8)

  1. Claim 1Independent Claim

    A method of managing memory usage in a data learning operation, the method comprising: profiling one or more objects of training data used for training in the data learning operation, wherein the profiling includes determining an object size, a memory allocation timestamp, and a memory deallocation timestamp of the one or more objects; and scheduling memory usage for the one or more objects to determine a total size and address range for one or more groups of the one or more objects, wherein the scheduling includes: grouping the one or more objects into the one or more groups based on at least one of the memory allocation timestamp or the memory deallocation timestamp of the one or more objects, arranging the one or more objects in the one or more groups in descending order in a memory space based on one or more values of the one or more objects, wherein, when the one or more objects includes two or more objects, the one or more values include a first value and a second value, that is

  2. Claim 2Depends on #1

    The method of claim 1, further comprising: training an operation in the data learning operation based on the scheduling of the memory usage.

  3. Claim 3Depends on #1

    The method of claim 1, wherein the one of the two or more objects is moved to eliminate or reduce any gap in a memory offset.

  4. Claim 4Depends on #1

    The method of claim 1, wherein the data learning operation is based on a transformer architecture, wherein the profiling occurs on a forward stage of the training of the data learning operation and the profiling is only performed on a first block for the forward stage, and wherein allocation information for one or more blocks during the scheduling is determined for the first block for the forward stage and is applied to any remaining blocks for the forward stage for the training of the data learning operation.

  5. Claim 5Depends on #1

    The method of claim 1, wherein the data learning operation is based on a transformer architecture, wherein the profiling occurs on a backward stage of the training of the data learning operation and the profiling is only performed on a first block for the backward stage, and wherein allocation information for one or more blocks during the scheduling that is determined for the first block for the backward stage is applied to any remaining blocks for the backward stage for the training of the data learning operation.

  6. Claim 6Depends on #4

    The method of claim 4, wherein during training of the data learning operation, for each allocation request, the object size, the memory allocation timestamp, and the memory deallocation timestamp of the one or more objects determined during the profiling is used to map any corresponding objects in each allocation request.

  7. Claim 7Depends on #1

    The method of claim 1, wherein the profiling further includes determining a lifetime of the one or more objects, wherein the determining of the lifetime includes classifying objects as ordinary objects or long-lived objects based on the memory allocation timestamp and the memory deallocation timestamp, and wherein the scheduling includes grouping the ordinary objects and grouping the long-lived objects, and scheduling the group of ordinary objects and the group of long-lived objects.

  8. Claim 8Independent Claim

    A data learning operation training system, the system comprising: a memory to store a data learning operation; at least one processor to: profile one or more objects of training data used for training in the data learning operation, wherein the profiling includes determining an object size, a memory allocation timestamp, and a memory deallocation timestamp of the one or more objects; and schedule a memory usage for the one or more objects to determine a total size and address range for one or more groups of the one or more objects, wherein scheduling includes: grouping the one or more objects into the one or more groups based on at least one of the memory allocation timestamp or the memory deallocation timestamp of the one or more objects, arranging the one or more objects in the one or more groups in descending order in a memory space based on one or more values of the one or more objects, wherein, when the one or more objects includes two or more objects, the one or more values inclu

Technical Overview & Description

FIELD The embodiments described herein pertain generally to managing data storage in a data learning operation, such as, training in a data learning operation, e.g., training a machine learning model. More specifically, the embodiments described herein pertain to methods and systems of managing memory usage in a data learning operation, such as, for training a machine learning model in a distributed training and/or fine-tuning system. BACKGROUND Memory management for training a machine learning model has been a continuous focus in the machine learning field, since each processing unit, e.g., a graphics processing unit (GPU) or central processing unit (CPU), has limited memory capacity. As the data used for training the machine learning model increases, e.g., training hundreds of billions of parameters, memory management is a critical challenge, even when distributed systems are used to collaborate together to train the machine learning model. SUMMARY Features in the embodiments disclosed herein may support data learning operations by reducing and/or optimizing memory consumption and/or reducing computational overhead for data learning operations, e.g., operations included in training a machine learning model, by improving the management of memory usage. The memory management mechanism as discussed herein may be used in deep learning architectures, for example, for natural language processing, computer vision, audio processing, multi-modal processing, generative pre-trained architectures, or directional encoder representations from transformers, in which during the training of machine learning models, input data, model parameters, forward activations, backward gradients, optimizer states, may use processing device memory. Features in the embodiments disclosed herein may include the memory management mechanism that includes a profiling-based memory allocation algorithm that utilizes information about allocated objects, that is obtained in advance through profiling, fo

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

References Cited — Backward Prior Art (5)

Non-Patent Literature (10)

  • Angel-PTM: A Scalable and Economical Large-scale Pre-training System in Tencent; Xiaonan Nie et al.; Mar. 6, 2023; retrieved from https://arxiv.org/abs/2303.02868v1 and https://arxiv.org/pdf/2303.02868v1 (Year: 2023).
  • Ehsan Yousefzadeh-Asl-Miandoab et al. May 8, 2023. Profiling and Monitoring Deep Learning Training Tasks. In Proceedings of the 3rd Workshop on Machine Learning and Systems (EuroMLSys '23). Association for Computing Machinery, New York, NY, USA, 18-25. https://doi.org/10.1145/3578356.3592589 (Year: 2023).
  • J. Will, L. Thamsen, J. Bader, D. Scheinert and O. Kao,
  • “
  • Get Your Memory Right: The Crispy Resource Allocation Assistant for Large-Scale Data Processing,
  • ”
  • 2022 IEEE International Conference on Cloud Engineering (IC2E), CA, USA, 2022, pp. 58-66, doi: 10.1109/IC2E55432.2022.00014. (Year: 2000).
  • J. Li, C. Zhang, Q. Cao, C. Qi, J. Huang and C. Xie,
  • “
  • An Experimental Study on Deep Learning Based on Different Hardware Configurations,