Large model self-adaption method under heterogeneous cloud edge end scene

By adopting large-model adaptive methods in cloud-edge end scenarios, we jointly generate a personalized model architecture, and solve the problem of inefficient model customization and resource utilization on heterogeneous devices, and achieve high-precision and cost-effective model deployment.

CN119537966AActive Publication Date: 2025-02-28TIANJIN UNIV

Patent Information

Application Number
CN202411497958.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-28
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve efficient model customization and resource utilization in heterogeneous cloud edge-end scenarios, resulting in poor performance and inefficient energy efficiency.

Method used

A large-model adaptive method is adopted to generate a personalized model architecture through the collaborative work of cloud servers, edge servers and device groups. This method includes allocating a personalized backbone architecture in the cloud, generating a coarse-grained header architecture by edge servers, and refining the header architecture through local data by device groups, and finally issuing a personalized model for edge server aggregation matrix.

Benefits of technology

It realizes efficient model customization and resource utilization on heterogeneous devices, improves model accuracy and cost-effectiveness, and improves the system's response capabilities and data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537966A_ABST
    Figure CN119537966A_ABST
Patent Text Reader

Abstract

The invention discloses a large model self-adaption method under a heterogeneous cloud edge end scene, the method is based on a cloud server, an edge server and equipment groups, the cloud server distributes a personalized backbone architecture to each equipment group according to the equipment attribute of each group; the edge server starts a first NAS stage according to a local shared data set so as to generate a coarse-grained Header architecture, and the architecture data of the first NAS stage is issued to a device group linked with the first NAS stage; the device group uses local data to refine the Header architecture through a second NAS stage to generate an architecture matrix, and uploads the architecture matrix back to the edge server; the edge server aggregates all matrixes of the group, and customizes and issues a final personalized model architecture for each device; according to the method, the large model can be gradually refined from the coarse granularity to be gradually matched with different devices, and the local model architecture is perfected by utilizing the collaboration among multiple devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to large model adaptive processing technology, and in particular to a large model adaptive method for applying in a heterogeneous cloud-edge scenario. Background Art

[0002] In recent years, pre-trained large-scale Transformer-based models, such as Vision Transformer (ViT), BERT, and GPT-4, have shown excellent results in a variety of tasks, significantly advancing the capabilities of personal intelligent virtual assistants. These models are traditionally deployed in cloud environments and face significant challenges in data privacy and response latency, especially in real-time applications where latency can severely impact user experience and operational efficiency. Therefore, deploying these models in cloud-edge-end systems has become a key research area, promising to enhance data privacy and improve system responsiveness by localizing processing and reducing data transmission distances.

[0003] However, deploying existing manually designed models directly onto devices often results in poor performance, as these models are often mismatched with the limited computing resources, diverse data environments, and stringent energy efficiency requirements of edge environments. To address these mismatches, there is an urgent need to automatically design models that are specifically optimized for the unique operational requirements of devices. This approach is expected to improve the efficiency of model deployment in cloud-edge-end systems.

[0004] 1. Lack of efficient collaboration for fine-grained model customization. Existing cloud-edge-device architectures often struggle to provide fine-grained model customization capabilities, which hinders efficient adaptation of models to the unique needs of individual devices. Without innovative collaborative approaches that enable progressive and fine-grained model customization and efficient device-specific adaptation in the cloud, achieving optimal performance and resource utilization on heterogeneous devices will become challenging.

[0005] 2. Performance imbalance caused by heterogeneity of device attributes. The heterogeneity of devices in terms of capabilities and energy consumption characteristics may lead to performance imbalance when models are deployed on different devices. A model optimized for one device may perform poorly or be energy inefficient on another device with different characteristics. Designing models based on a single performance or attribute and failing to consider the diverse limitations brought about by device heterogeneity may hinder the overall effectiveness of the model.

[0006] 3. Poor performance due to device data heterogeneity. The statistical characteristics of data generated by different devices may vary significantly, resulting in different optimal model architectures. If the model fails to consider the unique characteristics of each device data distribution, it may not be able to effectively capture the underlying pattern, resulting in poor performance. Summary of the invention

[0007] In response to the difficulties in the existing technology, the present invention provides an edge computing system task offloading optimization method for a multimodal large model; the present invention can achieve higher model accuracy while significantly reducing the model size, and has better evaluation results than the existing large model lightweight method.

[0008] In order to solve the problems of the prior art, the present invention adopts the following technical solutions (to be added after the technical solutions are determined):

[0009] A large model adaptive method in a heterogeneous cloud-edge scenario, the method is based on a cloud server, an edge server and a device group, and includes:

[0010] The cloud server assigns a personalized backbone architecture to each device group based on the device attributes of each group;

[0011] The edge server starts the first NAS phase based on the local shared data set to generate a coarse-grained Header architecture and sends its architecture data to the device group connected to it;

[0012] The coarse-grained Header architecture establishes a large model architecture that matches the device attributes through the following formula, namely:

[0013] P1:

[0014] in: Represents a generalized public dataset in a cloud server, Indicated by s s The intermediate model obtained;

[0015] The device group generates a fine-grained header structure using local data through the second NAS stage, and uploads the matrix of the fine-grained header structure back to the edge server; wherein:

[0016] The fine-grained header architecture establishes a model architecture that matches device-specific data through the following formula, namely:

[0017] P2:

[0018] in: Represented in each device group managed by the edge server;

[0019] The edge server aggregates all matrices of the device group and customizes and sends a personalized model architecture for each device.

[0020] Furthermore, the personalized backbone architecture generation process includes:

[0021] According to the large model performance, energy consumption and model size, the personalized backbone architecture is established through the following formula:

[0022]

[0023] in: is the device n usage model θ n and local data D n Task-specific loss function for Calculate θ n The number of parameters; H, ξ h and f Respectively represent the number of parameters, hidden layer dimensions and feedforward layer dimensions of all Headers; where:

[0024] For a group of devices n across k training cycles, the total energy consumption is modeled as follows:

[0025]

[0026] Where: P n (·,·)T n (·,·) represent the power consumption and the average delay per training cycle, respectively;

[0027]

[0028] Where: ΔG n is the power consumption increase for each additional Transformer layer, p n is the number of blocks, is the estimated GPU energy consumption for batch size β, L n and ΔL n They represent the initial delay and the delay added by each layer respectively.

[0029] Furthermore, the first NAS stage generates a coarse-grained Header architecture process, including:

[0030] Generate search space by predefining different operation blocks;

[0031] The number of coarse-grained Header structures generated by the operation blocks is selected according to the following formula;

[0032]

[0033] Among them, b represents the bth block, B represents the total number of blocks, Represents a set of operations;

[0034] According to the LSTM controller parameters of the edge server and the shared parameters ω of the sub-models sGenerate a coarse-grained Header structure for the number of coarse-grained Header structures;

[0035]

[0036] in: is from The samples obtained by independent sampling; M represents the number of samples in Monte Carlo sampling.

[0037] Furthermore, the device group generates a fine-grained Header architecture process using local data through the second NAS stage, including:

[0038] Parameters of a coarse-grained header architecture that scales local data across groups of devices based on gradients accessible during training

[0039] The importance set of the coarse-grained Header architecture is obtained by evaluating the importance of the parameters of the coarse-grained Header architecture through the following formula;

[0040]

[0041] in: The first-order Taylor expansion is Nearby Approximate Q n,r ;

[0042] According to the coarse-grained Header architecture importance set, the edge server calculation is assigned to the group according to the following formula Similarity of devices in W s ;

[0043]

[0044] in: is the similarity between device i and device j, and is the Wasserstein distance, that is

[0045]

[0046] in: is from A small random sample of data, Similarly; The pre-trained model The distribution of the features extracted from the above; ∏(·,·) represents the joint distribution set between two distributions; d(x,y) is the distance between x and y calculated by the L1 norm function;

[0047] The similarity W of the device is calculated by the following formula sOptimize to obtain personalized model architecture;

[0048]

[0049] in: Combined with knowledge from other devices, the edge server will Distribute to device group n.

[0050] Beneficial Effects

[0051] Compared with the traditional technical solution, the beneficial effects brought by the present invention are:

[0052] Efficient cloud-edge-device collaborative fine-grained model customization method: The present invention provides a cloud-edge-device collaborative architecture that can gradually perform fine-grained model customization for each device. The architecture allows efficient device-specific adaptation, which helps achieve optimal performance and resource utilization on heterogeneous devices. By leveraging the capabilities of cloud and edge nodes, the present invention achieves effective collaboration and customization of individual device models.

[0053] · Attribute-aware personalized model matching: This invention uses a gradient-based approach to generate personalized Backbone networks, providing a range of options to match device performance and storage. This invention uses a grid approach to find the Pareto front under model size constraints, and can quickly obtain the model structure required by the device after building the front. This enhances the matching degree between the model and the device attributes, thereby improving the cost-effectiveness of the model.

[0054] Data-aware personalized two-stage neural architecture search (NAS): We perform automatic header generation on different models distributed on the cloud-edge and fine-tune them on the local device to obtain the structure matrix.

[0055] In order to solve the problem of limited data, the present invention also provides a personalized aggregation technology based on data distribution differences. This technology uses the knowledge of other devices to fine-tune the local structure matrix, thereby obtaining a model structure that matches the local data.

[0056] We evaluate FormerTailor on different datasets. The results show that FormerTailor is able to achieve more cost-effective models under model size constraints. Compared with other methods, its performance is improved by at least 3%, and when considering the trade-offs between performance, energy consumption, and size, the relevant indicators are improved by nearly 20%, such as Figure 5 shown. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Cloud-edge-end system architecture diagram;

[0058] Figure 2The overall flow chart of the method of the present invention;

[0059] Figure 3 Search method and search space diagram;

[0060] Figure 4 Schematic diagram of obtaining importance sets and model pruning;

[0061] Figure 5 Comparison analysis of different large models. DETAILED DESCRIPTION

[0062] The following is combined with Figure 1 -Attached Figure 5 The present invention is described as follows:

[0063] 1. Overall system architecture

[0064] like Figure 1 As shown in the figure, the present invention proposes a hierarchical cloud-edge-end system for generating personalized Transformer-based models. The system is defined as a tuple (C, S, N), where C represents the cloud server, S = {s 1 ,...,s S} represents the set of edge servers, and N = {1,...,N} represents the set of devices. The system topology is characterized by the centralized connection from the cloud server to all edge servers and the partitioning of devices. Where N s is assigned to edge servers s Each edge server s Receive models from cloud servers and customize personalized models for their assigned device groups. Device partitioning is based on similarity of computing power and storage capacity. Considering the resource limitations of mobile battery-powered devices (e.g., drones, robots), the present invention focuses on optimizing their performance, storage, and energy consumption. In contrast, cloud servers and edge servers have sufficient computing and storage resources.

[0065] Devices are located in different geographical locations and handle different tasks. The data between devices should be heterogeneous. The present invention simulates the heterogeneity of devices and their data: for each device, the present invention defines a tuple (G n ,C n ,θ n ), where G n Indicates GPU capacity, C n represents the maximum storable model volume, θ n It is a personalized model. and Represents Header and Backbone components respectively. The model architecture satisfies where |·| represents the model size. This reflects the typical composition of Transformer-based models, where the Backbone part is much larger than the task-specific Header.

[0066] Without loss of generality, the present invention will refer to the model For device n, the conversion function δ(·) is used relative to Parameterize its Backbone model, that is, in represents the width scaling factor, Represents the number of Transformer layers. This representation provides a unified framework for analyzing and comparing different model architectures, facilitating consistent evaluation across heterogeneous devices.

[0067] FormerTailor consists of two phases: one phase is the personalization of the backbone network architecture, by generating a Pareto frontier to match the backbone network with device attributes; the second phase is the personalization of the header architecture, developing a two-stage NAS that collaborates between edge servers and devices to create a header architecture that adapts to local data distribution, such as Figure 2 shown.

[0068] Specifically, the entire framework works in a collaborative way. Figure 1 The cloud server allocates the optimized backbone to each device group N according to the device attributes of each group. s . Then, the edge server starts the first NAS phase based on the local shared data set to generate coarse-grained Header architectures and sends these architectures to the devices connected to it. The devices use local data to refine these Header architectures through the second NAS phase, generate an architecture matrix, and upload the architecture matrix back to the edge server. The edge server aggregates all matrices of the group, customizes and sends the final personalized model architecture for each device. This framework allows the model to be gradually refined from coarse-grained to gradually match different devices, and utilizes the collaboration between multiple devices to improve the local model architecture.

[0069] 2. Optimize energy consumption model

[0070] To optimize custom model generation, we quantify the energy consumption of Transformer-based models on heterogeneous devices. We use the energy consumption of the backbone network to approximate the total energy consumption. For device n across k training cycles, the total energy consumption can be modeled as follows:

[0071]

[0072] Where P n (·,·)Tn (·,·) represent the power consumption and the average delay of each training cycle respectively. The present invention defines

[0073]

[0074] where ΔG n is the power consumption increase for each additional Transformer layer, p n is the number of blocks, is the estimated GPU energy consumption for batch size β, L n and ΔL n Represent the initial delay and the delay added by each layer, respectively. This energy consumption model enables the present invention to accurately optimize the model architecture between heterogeneous devices and balance performance and energy efficiency.

[0075] 3. Problem Modeling

[0076] This paper formalizes the problem of generating customized models for heterogeneous devices as a multi-objective optimization problem. The goal is to minimize a comprehensive function that balances model performance, energy consumption, and model size while respecting device-specific storage constraints. Formally, this paper defines the optimization problem as follows:

[0077]

[0078] in: is the device n usage model θ n and local data D n The task-specific loss function. Calculate θ n The number of parameters. H,ξ h and f They represent the number of parameters, hidden layer dimensions, and feedforward layer dimensions of all Headers respectively.

[0079] In order to cope with the complexity of the optimization problem of the present invention, the present invention decomposes it into two sub-problems:

[0080] (1) matching the model architecture to the device properties, and (2) matching the model architecture to the device specific data. The present invention mainly focuses on optimizing the backbone network in the first sub-problem. In contrast, the second sub-problem adjusts the Header to achieve adaptation to specific data.

[0081] This decomposition strategy has several advantages. The optimized backbone network is able to provide effective general representations on different datasets without requiring extensive tuning. Reusing the backbone network enhances the model's ability to handle a variety of tasks and improves its generalization ability. Header customization captures data-specific high-level semantics and category details, improving performance without significantly increasing computational overhead. By separating the optimization of the backbone network and header, a balance is achieved between model generalization and task-specific performance while minimizing computational cost. This approach improves the efficiency and flexibility of customized model design, enabling it to effectively adapt to heterogeneous devices and diverse data distributions.

[0082] Phase 1 Problem: Matching Model Architecture to Device Properties

[0083] The problem of matching the model architecture with the device attributes is formalized as a multi-objective optimization problem. This formulation considers two device attributes, C n and G n , which affect the model size limit and energy consumption respectively. The goal is to balance model size, energy consumption and accuracy within the device constraints. Formally, the present invention defines the optimization problem P1 as follows:

[0084] P1:

[0085] in Represents a generalized public dataset in a cloud server, Indicated by s s The intermediate model is obtained.

[0086] Phase 2 Problem: Matching Model Architecture to Device-Specific Data

[0087] After matching the model architecture with the device attributes, each edge group has a backbone architecture adjusted according to the attributes of the devices it manages, i.e. The present invention customizes the header architecture based on the local data of each device while retaining the group-specific backbone. This approach produces a customized model that adapts to both device attributes and local data. The present invention formulates the second stage as an optimization problem P2:

[0088] P2:

[0089] in This allows custom headers within each device group managed by an edge server while maintaining a shared optimized backbone architecture.

[0090] Figure 2 As shown, the first NAS stage: generating and customizing a personalized backbone structure

[0091] Personalized backbone structure generation

[0092] In order to adapt to devices with different properties, this paper proposes a systematic method to generate multiple smaller backbone models from a complete backbone network by selectively removing components. This process targets both width (embedding dimension, attention head, multi-layer perceptron (MLP) dimension) and depth.

[0093] (Transformer layer). Given the interdependence of the two dimensions in the present invention's strategy, the present invention adopts a two-step approach. First, the present invention derives a variable-width architecture It serves as the final backbone architecture θ B basis.

[0094] The present invention uses a small data set To quantify the importance of neurons in the Header and MLP in the Multi-Head Self-Attention (MSA) module. The output of Header h is h Importance Index I h The definition is as follows:

[0095]

[0096] in: Indicated in the dataset The training loss function of the model containing Header h is Represents the loss function after removing Header h. h=0 is the model output without Header h. The present invention uses a first-order Taylor expansion to approximate As shown below:

[0097] Where R h=0 is the remainder and can be ignored because it is much smaller than the previous term. h=0 =0.

[0098] Therefore, combining the above two formulas, the present invention obtains the following derivation:

[0099]

[0100] The importance of neurons can be obtained by similar methods. Based on these importance indicators, the present invention sorts the Header and neurons of each Transformer. According to the requirements, the present invention discards the lower ranked parts to obtain This is a dynamically adjustable width The backbone model.

[0101] In order to generate the final backbone architecture with dynamic width and dynamic depth, the present invention adopts a knowledge distillation method using As the teacher model. The distillation objective function is as follows:

[0102]

[0103] where l(·,·) represents the mean square error function. and Represent the logits, embeddings, and hidden states of the teacher model, respectively. Similarly, y, E, and H correspond to the corresponding parts of the student model. Used to balance the contributions of different components in the distillation process.

[0104] Personalized backbone structure customization

[0105] The present invention decomposes each objective function in P1 into multiple sub-problems and uses a grid method to find the Pareto frontier. The present invention uses an approximate method to solve P1, specifically using the maximum energy consumption within each device group as a representative indicator:

[0106]

[0107] in and

[0108] is the loss function of the model under the data set. In order to simplify the representation, the present invention allows express The lth element of .

[0109] The present invention introduces a performance window γ p To quantify the acceptable trade-off between performance and other goals. The present invention divides the target space into intervals, which are located between the ideal optimal point and the worst case point, where l=1 corresponds to the performance index. This division is applied evenly across all objectives. For each backbone architecture, the present invention calculates the grid coordinates for the lth objective function as follows:

[0110]

[0111] Where σ>0 is a small constant to prevent division by zero. The present invention defines a solution set for the lth target in the kth interval as follows:

[0112]

[0113] For each edge server, the objective function Definition of the invention is the kth interval The grid coordinates of all solutions in Then the present invention constructs As in Satisfied The solution set of all The union of forms the Pareto Front Grid (PFG), which approximates the Pareto optimal set in the discrete objective space.

[0114] Considering the above strict storage constraints, the present invention proposes an efficient Pareto front construction and model selection method. Make This effectively sets an upper limit on the model size. The invention then constructs a truncated PFG by discarding all models that exceed this limit. In this restricted PFG, the invention first determines the model with the highest performance. Using the grid position of this high-performance model as the invention's search space, the invention selects the final model Minimize it to the ideal optimal point The Euclidean distance is:

[0115]

[0116] in and Represents a collection of models that are at the highest performing model grid location while meeting storage constraints.

[0117] like Figure 3-4 As shown, the search space is generated based on the module

[0118] Inspired by the progressive NAS method, the present invention designs a structure consisting of predefined operation blocks for the Header architecture of each edge server. The basic module architecture of the Header is represented as a directed acyclic graph (DAG) containing B blocks, namely , this structure is repeated N times, followed by a pooling layer and a multi-layer perceptron (MLP). Each block B in the DAG b Defined as a quintuple in Represents the input tensor. The present invention defines block B b The input set is the union of all previous blocks, the backbone output, and the output of the second-to-last Transformer layer in the backbone. Represents an operation to be applied to the input. Operation Set Includes a variety of functions commonly used in model headers, including z×z convolutional layers, pooling layers, and downsampling operations. Specifies how the outputs of the operation are combined.

[0119] The present invention combines the functions Restricted to element-level addition, the search space is effectively reduced while maintaining expressiveness. To accommodate size mismatches, the present invention inserts 1×1 convolutional layers when necessary. In order to utilize the global feature representation captured by the backbone, the present invention integrates the [CLS] tag into the final pooled output of the Header. This integration promotes the synergy between the global information from the backbone and the local features extracted by the Header. The figure shows the Header architecture consisting of U basic modules, where B=4, demonstrating the potential complexity and flexibility of the search space proposed by the present invention.

[0120] In order to quantify the search space and demonstrate its ability to adapt to different header requirements of various backbone architectures, the present invention conducts the following analysis. Represents the possible architecture space of the b-th block. The cardinality of is given by: in

[0121] Since U does not affect the search space, the total number of possible architectures of the Header with B blocks is expressed as

[0122]

[0123] Block Selection and Coarse Header Generation

[0124] The edge server uses the controller to determine the block selection and connection strategy of its device group, and finally defines the coarse-grained model. To adapt to variable-sized inputs, the present invention implements a long short-term memory (LSTM)-based controller that can handle sequences of length 4B. Sequence element B b Represents one of the four components of a block: and The input of LSTM is a or The final hidden state of the LSTM is transformed through a fully connected layer and a sigmoid function to estimate the validation accuracy.

[0125] In order to reduce the complexity of the search, the present invention adopts a parameter sharing strategy of the sub-model. The search process involves two sets of learnable parameters: the LSTM controller parameters of the edge server and the shared parameters ω of the sub-models s .

[0126] The search alternates between the following two steps:

[0127] 1) Optimize ω using a shared datasets ;

[0128] 2) Update based on the performance of the sampling architecture This alternating optimization continues throughout the search process. In the implementation of the present invention, the shared parameter ω s The weights corresponding to the operations within each block, because the method of the present invention uses the same layer stack. This parameter sharing mechanism significantly reduces the computational overhead of architecture search by allowing multiple sub-models to reuse the same set of parameters.

[0129] Optimizing the shared parameter ω in edge servers s During this period, the strategy of the fixed controller of the present invention in Represents the sampled submodel. The present invention uses stochastic gradient descent to minimize the expected loss Monte Carlo sampling estimates the gradient, that is:

[0130]

[0131] in is from Samples obtained by independent sampling.

[0132] In order to optimize the controller parameters of the edge server, the present invention fixes ω s and maximize the expected reward The present invention uses the REINFORCE algorithm to calculate the policy gradient and introduces a moving average baseline to reduce variance.

[0133] Stage 2-2: The second stage NAS uses personalized aggregation to generate a fine header suitable for the data

[0134] Header structure generated by the edge server is coarse-grained. This architecture may not be suitable for local data distribution on a single device. To address this limitation, the present invention proposes a two-step process:

[0135] 1) Device-specific header adaptation: Each device generates a header optimized for its local data distribution; 2) Collaborative knowledge integration: Devices use collective information to refine their header architecture and improve model performance.

[0136] Importance-based architecture quantization, such as Figure 4 Shown:

[0137] Other studies have emphasized that the importance of parameters varies with different tasks and data, and eliminating unnecessary parameters can improve model performance. In this step, considering the limitations of device capabilities, the present invention chooses a minimum overhead strategy to measure importance based on the gradients accessible during training. As shown in Figure (a), the present invention uses the above strategy to quantify the parameter importance of the coarse-grained header of the local data of device n, and according to the importance set Discard the redundant parts and adapt the Header to the local data.

[0138] Device n receives from the edge server The parameters of Header therefore, It can be expressed as Assumptions The parameters in are independent, and the present invention can decide which parameters should be removed by considering their importance. Initially, the present invention reduces The parameters in , quantize each parameter by removing the introduced error. Based on the assumption of independent and identical distribution (IID), the error caused by It is measured as the squared difference of the prediction errors.

[0139]

[0140] In order to avoid the calculation of the rth parameter Q n,r Repeated assessment of the importance of The present invention uses a first-order Taylor expansion in Nearby Approximate Q n,r :

[0141]

[0142] Therefore, the present invention obtains the importance set:

[0143]

[0144] After a certain number of iterations, the present invention uses the average importance as a criterion to discard a preset number of neurons with smaller joint importance of their parameters.

[0145] Model performance improvement with personalized aggregation

[0146] In order to overcome the limitation of limited data on the device, a personalized aggregation method is designed to allow the Header architecture of each device to be refined by combining the knowledge of other devices. As shown in Figure (b), the present invention measures the similarity of data distribution on the device to avoid the negative impact caused by data bias. In the end, each device obtains a customized Header that is not only adapted to local data, but also more generalized by acquiring knowledge from other devices.

[0147] The present invention uses Wasserstein distance to measure the difference in data distribution between different devices, which is more advantageous in capturing the geometric structure of complex distribution. The similarity of the devices in the same network is calculated and the similarity matrix W is generated. s :

[0148]

[0149] in is the similarity between device i and device j, and yes

[0150] Wasserstein distance, that is

[0151]

[0152] is from A small random sample of data, Same reason. The pre-trained model Π(·,·) represents the joint distribution set between two distributions. d(x,y) is the distance between x and y calculated by the L1 norm function.

[0153] To further normalize the similarity matrix W s , the present invention first converts it into a symmetric matrix and then normalizes it row by row:

[0154]

[0155] The final importance set for device n is a weighted convex combination of the other sets using the similarity matrix:

[0156]

[0157] Combined with knowledge from other devices, the edge server will Distribute to device n to adjust the header architecture. In this way, each device can have a customized header that not only matches its local data but also incorporates knowledge of other device data.

[0158] Although the present invention has been described above, the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many modifications without departing from the purpose of the present invention, which are all within the protection of the present invention.

Claims

1. A large model adaptive method in a heterogeneous cloud-edge scenario, the method is based on a cloud server, an edge server and a device group, characterized in that: include: The cloud server assigns a personalized backbone architecture to each device group based on the device attributes of each group; The edge server starts the first NAS phase based on the local shared data set to generate a coarse-grained Header architecture and sends its architecture data to the device group connected to it; The coarse-grained Header architecture establishes a large model architecture to match device attributes through the following formula, namely: in: Represents a generalized public dataset in a cloud server, Indicated by s s The intermediate model obtained; The device group generates a fine-grained header structure using local data through the second NAS stage, and uploads the matrix of the fine-grained header structure back to the edge server; wherein: The fine-grained header architecture establishes a model architecture that matches device-specific data through the following formula, namely: in: Represented in each device group managed by the edge server; The edge server aggregates all matrices of the device group and customizes and sends a personalized model architecture for each device.

2. According to the large model adaptive method in a heterogeneous cloud-edge scenario according to claim 1, it is characterized in that: The personalized backbone architecture generation process includes: According to the large model performance, energy consumption and model size, the personalized backbone architecture is established through the following formula: in: is the device n usage model θ n and local data D n Task-specific loss function for Calculate θ n The number of parameters; H, ξ h and f Respectively represent the number of parameters, hidden layer dimensions and feedforward layer dimensions of all Headers; where: For a group of devices n across k training cycles, the total energy consumption is modeled as follows: Where: P n (·,·)T n (·,·) represent the power consumption and the average delay per training cycle, respectively; Where: ΔG n is the power consumption increase for each additional Transformer layer, p n is the number of blocks, is the estimated GPU energy consumption for batch size β, L n and ΔL n They represent the initial delay and the delay added by each layer respectively.

3. According to the large model adaptive method in a heterogeneous cloud-edge scenario according to claim 1, it is characterized in that: The first NAS stage is a process of generating a coarse-grained Header architecture, including: Generate search space by predefining different operation blocks; The number of coarse-grained Header structures generated by the operation blocks is selected according to the following formula; Among them, b represents the bth block, B represents the total number of blocks, Represents a set of operations; According to the LSTM controller parameters of the edge server and the shared parameters ω of the sub-models s Generate a coarse-grained Header structure for the number of coarse-grained Header structures; in: is from The samples obtained by independent sampling; M represents the number of samples in Monte Carlo sampling.

4. According to claim 1, a large model adaptive method in a heterogeneous cloud-edge scenario is characterized in that The device group generates a fine-grained header structure process using local data through the second NAS stage, including: Parameters of a coarse-grained header architecture that scales local data across groups of devices based on gradients accessible during training The importance set of the coarse-grained Header architecture is obtained by evaluating the importance of the parameters of the coarse-grained Header architecture through the following formula; in: The first-order Taylor expansion is Nearby Approximate Q n,r ; According to the coarse-grained Header architecture importance set, the edge server calculation is assigned to the group according to the following formula Similarity of devices in W s ; in: is the similarity between device i and device j, and is the Wasserstein distance, that is in: is from A small random sample of data, Similarly; The pre-trained model The distribution of the features extracted from ; Π(·,·) represents the joint distribution set between two distributions; d(x,y) is the distance between x and y calculated by the L1 norm function; The similarity W of the device is calculated by the following formula s Optimize and obtain personalized model architecture; in: Combined with knowledge from other devices, the edge server will Distribute to device group n.

Citation Information

Patent Citations

  • Edge computing system based on automatic federated learning and learning method thereof

    CN114638357A

  • Deep reinforcement learning-based cloud edge-end collaborative intelligent oil field edge computing system task unloading strategy

    CN117812072A

  • Multi-granularity federated learning method for large model

    CN117973501A

  • Adaptive personalized federated learning method supporting heterogeneous model

    WO2024027164A1

Cited By

  • Image neural network architecture search method based on collaborative large language model

    CN121234989A