# US 2026/0073223 A1 · Method for controlling video memory for model training, electronic device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0073223 A1
- Document ID: US20260073223A1
- Status: Published application
- Kind: A1
- Application number: 19/242,599
- Filed: 2025-06-18
- Published: 2026-03-12
- Earliest claimed: 2024-12-17
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Jinle Zeng; Liang Shen; Jiabin Yang; Dianhai Yu; Yanjun Ma; Haifeng Wang
- Web page: https://patentgrep.com/patent/US20260073223A1

## CPC

- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for controlling a video memory for model training, an electronic device and a storage medium are provided, relating to the field of artificial intelligence technology, and in particular to the fields of neural network, large model, training optimization and other technologies. The method includes: reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations; performing the one or more backward calculations to obtain one or more backward calculation results; storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations; and releasing the video memory space reconstructed for the one or more backward calculations.

## Claims

### Claim 1

A method for controlling a video memory for model training, comprising:
reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations;
performing the one or more backward calculations to obtain one or more backward calculation results;
storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations; and
releasing the video memory space reconstructed for the one or more backward calculations.

### Claim 2 (depends on 1)

The method of claim 1, wherein reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations, comprises:
applying for reconstruction of the video memory space for the one or more backward calculations according to the grouping information of the parameter gradient information required for the one or more backward calculations in an internal memory; and
inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information.

### Claim 3 (depends on 2)

The method of claim 2, wherein inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information, comprises:
inplace multiplexing a storage unit required by identification information of each parameter gradient in the parameter gradient information with the applied video memory space to obtain a storage unit corresponding to the identification information of each parameter gradient in the video memory.

### Claim 4 (depends on 3)

The method of claim 3, wherein storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, comprises:
storing a value of each parameter gradient in the one or more backward calculation results into the storage unit corresponding to the identification information of each parameter gradient reconstructed for the one or more backward calculations.

### Claim 5 (depends on 1)

The method of claim 1, wherein performing the one or more backward calculations to obtain one or more backward calculation results, comprises:
in a case of one training step comprises multiple backward calculations, using some or all of values of parameter gradients in a video memory space reconstructed for a first backward calculation as input information for a second backward calculation, and performing the second backward calculation to obtain a value of a parameter gradient of the second backward calculation.

### Claim 6 (depends on 5)

The method of claim 5, wherein storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, comprises:
storing the value of the parameter gradient of the second backward calculation into a video memory space reconstructed for the second backward calculation.

### Claim 7 (depends on 1)

The method of claim 1, wherein releasing the video memory space reconstructed for the one or more backward calculations, comprises:
releasing video memory spaces reconstructed for all backward calculations in one training step after all the backward calculations end.

### Claim 8

An electronic device, comprising:
at least one processor; and
a memory connected in communication with the at least one processor;
wherein the memory stores an instruction executable by the at least one processor, and the instruction, when executed by the at least one processor, enables the at least one processor to execute:
reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations;
performing the one or more backward calculations to obtain one or more backward calculation results;
storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations; and
releasing the video memory space reconstructed for the one or more backward calculations.

### Claim 9 (depends on 8)

The electronic device of claim 8, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations, by:
applying for reconstruction of the video memory space for the one or more backward calculations according to the grouping information of the parameter gradient information required for the one or more backward calculations in an internal memory; and
inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information.

### Claim 10 (depends on 9)

The electronic device of claim 9, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information, by:
inplace multiplexing a storage unit required by identification information of each parameter gradient in the parameter gradient information with the applied video memory space to obtain a storage unit corresponding to the identification information of each parameter gradient in the video memory.

### Claim 11 (depends on 10)

The electronic device of claim 10, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, by:
storing a value of each parameter gradient in the one or more backward calculation results into the storage unit corresponding to the identification information of each parameter gradient reconstructed for the one or more backward calculations.

### Claim 12 (depends on 8)

The electronic device of claim 8, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute performing the one or more backward calculations to obtain one or more backward calculation results, by:
in a case of one training step comprises multiple backward calculations, using some or all of values of parameter gradients in a video memory space reconstructed for a first backward calculation as input information for a second backward calculation, and performing the second backward calculation to obtain a value of a parameter gradient of the second backward calculation.

### Claim 13 (depends on 12)

The electronic device of claim 12, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, by:
storing the value of the parameter gradient of the second backward calculation into a video memory space reconstructed for the second backward calculation.

### Claim 14 (depends on 8)

The electronic device of claim 8, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute releasing the video memory space reconstructed for the one or more backward calculations, by:
releasing video memory spaces reconstructed for all backward calculations in one training step after all the backward calculations end.

### Claim 15

A non-transitory computer-readable storage medium storing a computer instruction thereon, wherein the computer instruction is used to cause a computer to execute:
reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations;
performing the one or more backward calculations to obtain one or more backward calculation results;
storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations; and
releasing the video memory space reconstructed for the one or more backward calculations.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the computer instruction is used to cause the computer to execute reconstructing a video memory space for one or more backward calculations during model training according to grouping information of parameter gradient information required for the one or more backward calculations, by:
applying for reconstruction of the video memory space for the one or more backward calculations according to the grouping information of the parameter gradient information required for the one or more backward calculations in an internal memory; and
inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the computer instruction is used to cause the computer to execute inplace multiplexing the applied video memory space with a video memory space required by the parameter gradient information, by:
inplace multiplexing a storage unit required by identification information of each parameter gradient in the parameter gradient information with the applied video memory space to obtain a storage unit corresponding to the identification information of each parameter gradient in the video memory.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the computer instruction is used to cause the computer to execute storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, by:
storing a value of each parameter gradient in the one or more backward calculation results into the storage unit corresponding to the identification information of each parameter gradient reconstructed for the one or more backward calculations.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the computer instruction is used to cause the computer to execute performing the one or more backward calculations to obtain one or more backward calculation results, by:
in a case of one training step comprises multiple backward calculations, using some or all of values of parameter gradients in a video memory space reconstructed for a first backward calculation as input information for a second backward calculation, and performing the second backward calculation to obtain a value of a parameter gradient of the second backward calculation.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the computer instruction is used to cause the computer to execute storing the one or more backward calculation results into the video memory space reconstructed for the one or more backward calculations, by:
storing the value of the parameter gradient of the second backward calculation into a video memory space reconstructed for the second backward calculation.
