AEC-Q standard-oriented large model training method and system special for vehicle gauge chip testing field, and storage medium
By employing multimodal analysis and two-stage block training methods, combined with low-rank adaptation and group relative strategy optimization algorithms, a large-scale model specifically designed for automotive-grade chip testing was established. This model addresses the issues of low efficiency and inaccurate error correction in manual interpretation of the AEC-Q standard, enabling efficient and accurate automated review of automotive-grade chip test reports.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING NEW ENERGY VEHICLE TECH INNOVATION CENT CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies rely on manual interpretation of the AEC-Q standard in automotive-grade chip testing, which is inefficient and prone to omissions. General-purpose large models lack systematic error correction and reasoning capabilities, resulting in inaccurate report generation and verification.
Multimodal parsing and two-stage block method are used to retrain the pre-trained large model. Reinforcement learning is carried out by combining low-rank adaptation and group relative policy optimization algorithm to establish a large model for automotive-grade chip testing. It has error localization and correction reasoning capabilities, and the data is fine-tuned by causal language model loss function and structured question answering.
It enables efficient and accurate automated review of automotive-grade chip test reports, reduces hardware barriers and annotation costs, and ensures the accuracy of field-level Q&A and the reliability of error correction.
Smart Images

Figure CN121996487A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large model applications, and in particular to a training method, system, and storage medium for a large model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard. Background Technology
[0002] Automotive-grade chips must pass the AEC-Q series stress tests before being installed in vehicles, and the relevant test reports must strictly adhere to the standard terms. However, current technology still relies on manual comparison of PDF standards and reports item by item: on the one hand, AEC-Q documents are lengthy, with many tables and diagrams, making manual interpretation inefficient and prone to omissions; on the other hand, general-purpose large models, lacking systematic learning of AEC-Q knowledge, often make mistakes, misattribute information, or even arrive at conclusions that contradict the standard when faced with professional questions such as "temperature cycling conditions" and "failure criteria," making them difficult to use directly for report generation or verification.
[0003] To improve automation, industry researchers have attempted to vectorize AEC-Q text for retrieval augmentation (RAG). However, non-plain text elements in PDFs, such as table of contents, cross-page tables, and flowcharts, lose their structure during parsing, leading to fragmented data and insufficient retrieval recall. Furthermore, general-purpose models are only fine-tuned using simple domain corpora and lack specialized training for the complete inference chain of "error localization—cause analysis—correction result," failing to guarantee the reliability of error identification and correction in test report error correction scenarios. Therefore, there is an urgent need for a large-scale model training method specifically designed for automotive-grade chip testing that can fully preserve the structured information of the AEC-Q standard and possess systematic error correction inference capabilities. Summary of the Invention
[0004] The purpose of this invention is to provide a training method, system, and storage medium for a large-scale model specifically designed for automotive-grade chip testing in the AEC-Q standard, in order to overcome the problems of lack of professional knowledge, poor error correction reliability, and low field-level question answering accuracy caused by the absence of multimodal information parsing, insufficient inference links, and catastrophic forgetting in the prior art.
[0005] To achieve the aforementioned technical objectives and effects, this invention discloses a training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, comprising at least the following steps:
[0006] S1. Continued Training Phase: The domain block text obtained by multimodal parsing and two-stage segmentation of the AEC-Q automotive-grade chip testing standard document is used to continue training the pre-trained large model so that the model can establish a knowledge system for the automotive-grade chip testing domain.
[0007] S2. Reinforcement and Fine-tuning Stage: Based on the model after continuous training, the model parameters are first fine-tuned efficiently using low-rank adaptation. Then, reinforcement learning is performed on the same error correction dataset using a group relative strategy optimization algorithm to obtain an automotive-grade test error correction model with error localization and correction reasoning capabilities.
[0008] S3. Specific Fine-tuning Phase: The error correction model is fine-tuned using the AEC-Q standard structured question and answer data to enable the model to master the business rule of "asking questions based on specified fields - outputting the corresponding field content", thereby achieving accurate field-level question and answering in the field of automotive-grade chip testing.
[0009] Preferably, the multimodal analysis and two-stage segmentation in step S1 include:
[0010] S11. Use a multimodal document parsing tool to convert AEC-Q standard PDF files into Word files that retain the table of contents, tables, and image metadata;
[0011] S12. Phase 1: Serialize the tables in the Word file into Markdown text, call the visual model to convert the flowchart and architecture diagram into descriptive text, and then generate the initial data blocks according to the directory structure;
[0012] S13. Phase Two: Based on the maximum context length of the model, merge or cut the initial data blocks to obtain continued training samples with a length of 512-1536 tokens.
[0013] Preferably, the continued training in step S1 uses a causal language model loss function, the specific function of which is as follows:
[0014] ;
[0015] Where L(θ) is the training loss corresponding to the model parameter θ; N is the total number of samples for subsequent training; T is the token length of a single sample; x i,t P(x) represents the real token at position t in the i-th question-and-answer pair. i,t ,…,x i,t-1 ;θ) is the probability that the model predicts the t-th token based on the first t-1 tokens of the i-th sample under parameter θ;
[0016] The model's parameters are iteratively updated by minimizing the predicted cross-entropy of the model for automotive-grade text sequences.
[0017] Preferably, step S2 includes at least:
[0018] S21. Data Preparation: Call the block data obtained in Phase 1 by directory, insert errors such as fact reversal, extreme data deviation or core conclusion tampering into the designed workflow, and generate an error correction dataset containing error location index, error cause and corrected text based on the original text of the AEC-Q standard;
[0019] S22. Model Training: After continuous training, LoRA low-rank adaptation fine-tuning is performed on the model, freezing the backbone parameters and updating only the adapter parameters; then, using the obtained error correction dataset as input, reinforcement learning is performed using the group relative policy optimization algorithm. The policy model is iteratively updated through a reward function jointly driven by format reward and accuracy reward, so that the model output conforms to the four-segment error correction framework and the localization and correction are accurate.
[0020] Preferably, the objective function of the group relative strategy optimization algorithm in step S22 is:
[0021] ;
[0022] Among them, J GRPO (θ) is the objective function of the GRPO algorithm; E[q~P(Q)] is the expected value of the query sample Q for error correction in automotive-grade testing; π θold (O|Q) represents the old strategy; π θ (o i |Q) represents the new strategy; Clip(.,1-ε,1+ε) is the truncation operation, and ε is the hyperparameter; A i Let be the advantage function of the i-th output; β is the penalty coefficient for the KL divergence, and D KL (π θ ||π ref ) is the KL divergence between the new strategy and the reference strategy;
[0023] D KL (π θ ||π ref The equation is as follows:
[0024] ;
[0025] Where, π ref (o i |Q) is the reference strategy π ref The error correction output o for the i-th group i The predicted probability; π θ (o i |Q) is the new strategy π θ The error correction output o for the i-th group i The predicted probability;
[0026] The reward function is as follows:
[0027] ;
[0028] Among them, A i R is the advantage function corresponding to the i-th error correction output; i The reward value obtained from the error correction output of the i-th group; Mean({r1,r2,…,r G}) represents the average reward of the error correction output of group G in the same batch; std({r1,r2,…,r) G}) represents the reward standard deviation of the error correction output of group G in the same batch.
[0029] Preferably, step S3 includes at least:
[0030] S31. Data Preparation: Business experts construct a business model containing fields such as "test item, test content, test conditions, and judgment criteria" based on the AEC-Q standard documents and test reports, and write the specific test requirements into the database table; by specifying some field content as questions and the remaining field content as answers, structured question-and-answer pairs are generated in batches.
[0031] S32. Model Training: Using question-answer pairs as input, fine-tune the model obtained in S2 using the causal language model loss function, prioritizing the updating of parameters related to field mapping, until the proportion of samples in which the model output answers are completely consistent with the corresponding field content in the database reaches a preset threshold.
[0032] Preferably, the parameter update formula during backpropagation in steps S1-S3 is as follows:
[0033] ;
[0034] Where, θ t+1 The updated model parameters; θ t The parameters are the current model parameters before the update; η is the learning rate. For the loss function L(θ) at the current parameter θ t The gradient at that point.
[0035] This invention also discloses a training system for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard. The training system is based on the aforementioned training method and includes at least the following components:
[0036] The data preparation module is used to obtain domain-specific text blocks from the AEC-Q automotive-grade chip testing standard document through multimodal parsing and two-stage segmentation, and further generate error correction datasets and structured question-answering pairs samples.
[0037] The model training module is used to execute the following sequentially:
[0038] The pre-trained large model is then further trained using the segmented text.
[0039] The parameters of the continuously trained model are efficiently fine-tuned using a low-rank adaptation method, and then reinforcement learning is performed on the error correction dataset using a group relative policy optimization algorithm to obtain an automotive-grade test error correction model.
[0040] The error correction model was fine-tuned using the question-and-answer pairs to enable it to achieve precise question-and-answer capabilities at the field level.
[0041] The parameter update module is used to iteratively update model parameters through gradient descent and backpropagation of the loss function.
[0042] The data preparation module includes:
[0043] The multimodal parsing submodule is used to convert AEC-Q standard PDFs into Word files that retain the table of contents, tables, and image metadata.
[0044] The two-stage chunked submodule is used to serialize tables into Markdown text, convert flowcharts / architecture diagrams into descriptive text, and merge or cut them according to the token length to obtain training samples;
[0045] The error correction dataset generation submodule is used to insert errors such as fact reversal, extreme data bias, or core conclusion tampering into the segmented data, and outputs an error correction dataset containing the error location index, error cause, and corrected text.
[0046] The question-and-answer pair generation submodule is used to generate structured question-and-answer pair samples in batches based on the AEC-Q business model fields.
[0047] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described training method.
[0048] The present invention has the following beneficial effects:
[0049] 1. Through a three-stage progressive architecture of "continuous training - reinforcement fine-tuning - specific fine-tuning", while injecting the complete knowledge structure of the AEC-Q standard, the model introduces group relative strategy optimization reinforcement learning, which enables the model to have both field-level accurate question answering ability and logically rigorous error localization-correction inference chain. This significantly improves the efficiency and accuracy of reviewing automotive-grade chip test reports and avoids the catastrophic forgetting of general capabilities.
[0050] 2. Employing a multimodal parsing and two-stage segmentation scheme, the table of contents, cross-page tables, and flowcharts in the PDF are separated. Figure 1 The text is transformed into structured text in one step, and then fine-tuned with low-rank adaptation and constrained by causal language model loss. This enables lightweight training that can be completed with a single A100 card, reducing the hardware threshold and annotation cost, and providing a feasible path for the engineering deployment of large models in the field of automotive-grade testing. Attached Figure Description
[0051] Figure 1 This is a flowchart illustrating the training method steps of Embodiment 1 of the present invention.
[0052] Figure 2 The flowchart shows the preparation of training data for Embodiment 1 of the present invention.
[0053] Figure 3 This is a flowchart of the fine-tuning data preparation process for Embodiment 1 of the present invention.
[0054] Figure 4 This is a training example of the training method established in Embodiment 2 of the present invention.
[0055] Figure 5 This is another training example of the training method established in Embodiment 2 of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments.
[0057] Example 1
[0058] like Figure 1-3 As shown, this embodiment discloses a training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, including the following steps:
[0059] S1. Continued Training Phase: The domain block text obtained by multimodal parsing and two-stage segmentation of the AEC-Q automotive-grade chip testing standard document is used to continue training the pre-trained large model so that the model can establish a knowledge system for the automotive-grade chip testing domain.
[0060] The multimodal analysis and two-stage block division in step S1 include:
[0061] S11. Use a multimodal document parsing tool to convert AEC-Q standard PDF files into Word files that retain the table of contents, tables, and image metadata;
[0062] S12. Phase 1: Serialize the tables in the Word file into Markdown text, call the visual model to convert the flowchart and architecture diagram into descriptive text, and then generate the initial data blocks according to the directory structure;
[0063] S13. Phase Two: Based on the maximum context length of the model, merge or cut the initial data blocks to obtain continued training samples with a length of 512-1536 tokens.
[0064] Furthermore, the continued training described in step S1 uses a causal language model loss function, the specific function of which is as follows:
[0065] ;
[0066] Where L(θ) is the training loss corresponding to the model parameter θ; N is the total number of samples for subsequent training; T is the token length of a single sample; x i,t P(x) represents the real token at position t in the i-th question-and-answer pair. i,t ,…,x i,t-1 ;θ) is the probability that the model predicts the t-th token based on the first t-1 tokens of the i-th sample under parameter θ;
[0067] The model's parameters are iteratively updated by minimizing the predicted cross-entropy of the model for automotive-grade text sequences.
[0068] In the S1 step of the training phase, multimodal parsing and two-stage block division are used to convert the directory hierarchy, tables and diagrams in the AEC-Q standard into continuous text that retains semantic associations. This enables the model to write the mapping relationship between "standard number - test conditions - failure criteria" into the parameters all at once under the subsequent causal language model loss constraint, thereby establishing a scalable and reasonable knowledge base for the field of automotive-grade chip testing.
[0069] S2. Reinforcement and Fine-tuning Stage: Based on the model after continuous training, the model parameters are first fine-tuned efficiently using low-rank adaptation. Then, reinforcement learning is performed on the same error correction dataset using a group relative strategy optimization algorithm to obtain an automotive-grade test error correction model with error localization and correction reasoning capabilities.
[0070] Step S2 includes:
[0071] S21. Data Preparation: Call the block data obtained in Phase 1 by directory, insert errors such as fact reversal, extreme data deviation or core conclusion tampering into the designed workflow, and generate an error correction dataset containing error location index, error cause and corrected text based on the original text of the AEC-Q standard;
[0072] S22. Model Training: After continuous training, LoRA low-rank adaptation fine-tuning is performed on the model, freezing the backbone parameters and updating only the adapter parameters; then, using the obtained error correction dataset as input, reinforcement learning is performed using the group relative policy optimization algorithm. The policy model is iteratively updated through a reward function jointly driven by format reward and accuracy reward, so that the model output conforms to the four-segment error correction framework and the localization and correction are accurate.
[0073] Furthermore, the objective function of the group relative strategy optimization algorithm described in step S22 is:
[0074] ;
[0075] Among them, JGRPO (θ) is the objective function of the GRPO algorithm; E[q~P(Q)] is the expected value of the query sample Q for error correction in automotive-grade testing; π θold (O|Q) represents the old strategy; π θ (o i |Q) represents the new strategy; Clip(.,1-ε,1+ε) is the truncation operation, and ε is the hyperparameter; A i Let be the advantage function of the i-th output; β is the penalty coefficient for the KL divergence, and D KL (π θ ||π ref ) is the KL divergence between the new strategy and the reference strategy;
[0076] D KL (π θ ||π ref The equation is as follows:
[0077] ;
[0078] Where, π ref (o i |Q) is the reference strategy π ref The error correction output o for the i-th group i The predicted probability; π θ (o i |Q) is the new strategy π θ The error correction output o for the i-th group i The predicted probability;
[0079] The reward function is as follows:
[0080] ;
[0081] Among them, A i R is the advantage function corresponding to the i-th error correction output; i The reward value obtained from the error correction output of the i-th group; Mean({r1,r2,…,r G}) represents the average reward of the error correction output of group G in the same batch; std({r1,r2,…,r) G}) represents the reward standard deviation of the error correction output of group G in the same batch.
[0082] In stage S2, "low-rank adaptation" and "group relative policy optimization" are combined on the same error correction dataset: First, LoRA is used to perform lightweight fine-tuning on the retrained model, training only the newly added adapter parameters while freezing all backbone weights, thus injecting domain-specific error correction capabilities while avoiding catastrophic forgetting; then, using this LoRA model as the old policy, GRPO reinforcement learning is run, locking policy updates within a controllable range through Clip truncation and KL divergence penalty, and using the dominance function to perform batch-based standardization of format rewards and accuracy rewards, driving the model to continuously output a four-stage structure of "thinking—location—reason—correction". The resulting policy network retains general language capabilities and can stably locate factual inversions, numerical biases, or conclusion tampering in automotive-grade test report scenarios, providing correction results that conform to the original AEC-Q text.
[0083] S3. Specific Fine-tuning Phase: The error correction model is fine-tuned using the AEC-Q standard structured question and answer data to enable the model to master the business rule of "asking questions based on specified fields - outputting the corresponding field content", thereby achieving accurate field-level question and answering in the field of automotive-grade chip testing.
[0084] Step S3 includes:
[0085] S31. Data Preparation: Business experts construct a business model containing fields such as "test item, test content, test conditions, and judgment criteria" based on the AEC-Q standard documents and test reports, and write the specific test requirements into the database table; by specifying some field content as questions and the remaining field content as answers, structured question-and-answer pairs are generated in batches.
[0086] S32. Model Training: Using question-answer pairs as input, fine-tune the model obtained in S2 using the causal language model loss function, prioritizing the updating of parameters related to field mapping, until the proportion of samples in which the model output answers are completely consistent with the corresponding field content in the database reaches a preset threshold.
[0087] Furthermore, the parameter update formulas during backpropagation in steps S1-S3 are as follows:
[0088] ;
[0089] Where, θ t+1 The updated model parameters; θ t The parameters are the current model parameters before the update; η is the learning rate. For the loss function L(θ) at the current parameter θ t The gradient at that point.
[0090] In section S3, the error correction model is further converged to the "field alignment" task: First, the AEC-Q standard is broken down into four categories of fields—"test items, test content, test conditions, and judgment criteria"—using a business model and stored in the database. Then, a massive number of question-and-answer pairs that perfectly match the database row-level content are generated in one go through a sampling method of "specifying some fields as questions and the rest as answers." Subsequently, the model obtained in S2 is fine-tuned with causal language model loss as the optimization objective. Backpropagation prioritizes updating only parameters closely related to field mapping, enabling the network to learn the direct mapping of "outputting the corresponding field value upon seeing the field key." The process stops when the proportion of samples in which the model generates answers that are completely consistent with the database content reaches a preset threshold, thus ensuring that the final network can provide an accurate answer that is exactly the same as the original standard text when faced with any question based on AEC-Q fields, completing the closed loop of "specified field question—accurate field answer" in the field of automotive-grade chip testing.
[0091] Example 2
[0092] This embodiment, based on the design of Embodiment 1, proposes a more specific implementation method:
[0093] First, the pre-trained fine-tuned model Qwen2.5-Coder-7B-Instruct is deployed on the server. This model will serve as the base model for all subsequent training stages on an Nvidia A100 GPU. The training environment is configured as follows: CentOS Linux 7 operating system, CUDA 11.8, PyTorch 2.6.0, with 80GB of GPU memory allocated, supporting full-parameter training and quantization acceleration.
[0094] S1. Continued Training Phase: The domain block text obtained by multimodal parsing and two-stage segmentation of the AEC-Q automotive-grade chip testing standard document is used to continue training the pre-trained large model so that the model can establish a knowledge system for the automotive-grade chip testing domain.
[0095] Data preparation:
[0096] Document parsing and format conversion: Collect PDF files of core automotive-grade chip testing standards such as AEC-Q100 (Rev G), AEC-Q101 (Rev D), and AEC-Q104 (Rev E), with a total document page count of ≥200 pages, including ≥40 tables and ≥30 flowcharts / architecture diagrams. Use the multimodal document parsing tool MinerU V4.0 with the following parsing parameters set: parsing precision = high precision, table format preservation = Word, image export resolution = 300dpi, ensuring that the Word format output file fully preserves the directory hierarchy (maximum 3 levels), table cell relationships, and image metadata.
[0097] Phase 1:
[0098] Table processing: The pandas library is used to serialize the Word table into Markdown text. The serialization parameters header=True (keep the table header), index=False (hide the row index), and sep="|" (field separator) ensure that the text format meets the structured logic of [table title] + [header row] + [data row].
[0099] Image processing: The Qwen-VL model is used to convert image information such as flowcharts and architecture diagrams in the document into accurate descriptive text.
[0100] Table of contents segmentation: Based on the parsed and preserved table of contents structure, the document content (including serialized tables and image description text) is segmented into initial data blocks corresponding to the table of contents chapters, with the number of initial blocks ≥ 1000.
[0101] Phase Two:
[0102] Based on the maximum context length (2048 tokens) of Qwen2.5-Coder-7B-Instruct, the block length thresholds were set as follows: minimum length = 512 tokens, maximum length = 1536 tokens. The Tokenizer from the transformers library was used for length pre-validation. Blocks shorter than 512 tokens were merged based on directory association, and blocks longer than 1536 tokens were cut according to semantic breakpoints (such as "test conditions end" or "judgment criteria begin"). This resulted in the generation of ≥900 training samples.
[0103] Model training:
[0104] Input processing: The model's native tokenizer (qwen2.5-coder-tokenizer) is used with parameters set to padding=True, truncation=True, and max_length=1536 to convert the segmented text into a token ID sequence; the embedding layer dimension is 4096 (consistent with the model's native dimension), and layer_norm_eps=1e-5 (layer normalization parameter) is enabled during vectorization to ensure the stability of semantic vectors.
[0105] Position information encoding: Sine position encoding is used, with parameters set to d_model=4096 (vector dimension) and max_seq_len=2048 (maximum sequence length). A chunk_id position embedding is also added to distinguish the logical relationships between different chunks. The encoding formula is as follows:
[0106] ;
[0107] Where pos is the position of the token in the sequence, i is the vector dimension index, and d_model=4096 is the Embedding dimension.
[0108] Model forward pass and parameter update:
[0109] The processed vectors are fed into the Transformer architecture. The Encoder part learns key relationships within the text (such as the connection between "high temperature operating life test" and "AEC-Q100 standard") through a self-attention mechanism, deepening its understanding.
[0110] The Decoder uses self-attention to ensure the coherence of the generated content, and uses cross-attention to associate the domain knowledge information output by the Encoder to predict the next token.
[0111] The cross-entropy loss function is used to calculate the gap between the model's predicted next token and the actual text token.
[0112] The gradient of the loss with respect to all parameters of the model is calculated using the backpropagation algorithm, and all parameters (including Embedding, attention weights, feedforward network, etc.) are updated using the AdamW optimizer. Through multiple iterations, the model internalizes automotive-grade chip testing knowledge.
[0113] Core formula:
[0114] ;
[0115] Where L(θ) is the training loss corresponding to the model parameter θ (target value ≤ 0.1); N is the total number of samples for further training (N = 900 in this embodiment); T is the token length of a single sample (T ∈ [512, 1536] in this embodiment); x i,t For the true token at position t in the i-th question-answer pair (e.g., "AEC-Q100" "Test conditions: 125℃ / 1000h"); P(x i,t ,…,x i,t-1 ;θ) is the probability of the model predicting the t-th token based on the first t-1 tokens of the i-th sample under parameter θ (output by the Softmax layer of the Transformer Decoder).
[0116] Parameter tuning process:
[0117] The optimizer chosen is AdamW, with initial parameters set to lr=2e. -5(Learning rate), betas=(0.9, 0.999) (momentum parameter), weight_decay=0.01 (weight decay to prevent overfitting);
[0118] The learning rate scheduling strategy uses linear decay, with warmup_steps=100 (warmup steps) and total_steps=2000 (total steps). The learning rate starts from 1e during the warmup phase. -7 Linearly increase to 2e -5 Subsequently, it decays linearly to 2e -6 ;
[0119] Training batch settings: batch_size=2 (single card memory adaptation), gradient_accumulation_steps=4 (gradient accumulation, equivalent batch=8);
[0120] 4. Regularization strategy: Enable Dropout layer with parameter dropout=0.1; and add label smoothing (label_smoothing=0.1) to reduce the risk of model overfitting;
[0121] 5. Iteration stopping condition: When the validation set loss (using 10% of the samples as the validation set) does not decrease for 3 consecutive epochs (the decrease threshold is ≤0.001), training stops. The final training epoch is 15, and the validation loss is 0.006.
[0122] S2. Reinforcement and Fine-tuning Stage: Based on the model after continuous training, the model parameters are first fine-tuned efficiently using low-rank adaptation. Then, reinforcement learning is performed on the same error correction dataset using a group relative strategy optimization algorithm to obtain an automotive-grade test error correction model with error localization and correction reasoning capabilities.
[0123] Data preparation:
[0124] Using the catalog-segmented data prepared in Phase 1 of the training phase, and following a pre-designed agent workflow, the correct AEC-Q segmented data is designed to contain erroneous text, including fact-reversal errors, extreme data bias errors, or core conclusion tampering errors. The agent then uses inference based on the original AEC-Q standard text to identify these errors, generating inference data for reinforcement learning. The total dataset size is 500 entries. The dataset format is uniformly set to {"input": "text to be corrected", "error_pos": "error location index", "error_reason": "error reason", "label": "corrected text"}.
[0125] Model training:
[0126] Parameter Efficient Fine-Tuning (PEFT) - LoRA:
[0127] Technical parameters: LoRA (Low-Rank Adaptation) is used, the adaptation layer is selected from the Q and V projection matrices of Transformer, and r=8 (low-rank matrix dimension), lora_alpha=32 (scaling factor), lora_dropout=0.05 (dropout probability), bias="none" (do not train bias term), task_type="CAUSAL_LM" (task type);
[0128] Training parameters: The backbone parameters of the model were frozen (approximately 98%), and only the LoRA adapter parameters were trained (parameter count ≈ 1.2M). The optimizer was AdamW, and the initial learning rate was lr = 1e. -4 betas=(0.9, 0.999), weight_decay=0.001; training batch_size=4, gradient_accumulation_steps=2, training epoch=8, validation loss ≤0.5.
[0129] Reinforcement Learning—Group Relative Policy Optimization (GRPO):
[0130] The model finely tuned by LoRA is used as the policy model, and the GRPO algorithm is applied to train it on the constructed error correction dataset.
[0131] Reward function design: The reward function consists of two parts:
[0132] Formatted reward: The model is forced to organize its response according to a pre-set four-part framework of "thinking", "error location", "error reason" and "corrected result", guiding the model to conduct structured and step-by-step reasoning.
[0133] Accuracy Bonus: Calculated based on the model's accuracy in locating errors and the correctness of the corrected results.
[0134] Reward function parameters:
[0135] Format bonus (30%): 3 points are awarded when the model output fully conforms to the four-part framework of "Thoughts", "Correction Location", "Error Reason" and "Corrected Result"; 1 point is deducted for each missing module, and 0.5-2 points are deducted for non-standard format;
[0136] Accuracy Bonus (70%): Error Location Accuracy (Ploc) × 3.5 + Correction Result Accuracy (Pcorr) × 3.5; where Ploc = number of correctly located errors / total number of errors, Pcorr = number of correctly corrected errors / total number of errors;
[0137] Example of reward value calculation: Complete output format (3 points), 100% error location accuracy (3.5 points), 100% correction result accuracy (3.5 points), total reward Ri = 10 points.
[0138] Through GRPO algorithm optimization, the driving model generates error correction content that is both logically sound and accurate, enabling it to accurately locate and rigorously analyze errors during the review of automotive-grade chip test reports.
[0139] Core formula:
[0140] ;
[0141] Among them, J GRPO (θ) is the objective function of the GRPO algorithm (objective value ≥ 1.2); E[q~P(Q)] is the expected value of the query sample Q for automotive-grade test error correction (in this embodiment, Q is 500 error correction samples, and P(Q) is uniformly distributed); π θold (O|Q) represents the old strategy; π θ (o i |Q) represents the new strategy; Clip(.,1-ε,1+ε) is the truncation operation, where ε is a hyperparameter (ε=0.2); A i Let be the advantage function of the i-th output; β is the penalty coefficient for KL divergence (β=0.05 in this embodiment), D KL (π θ ||π ref ) is the KL divergence between the new strategy and the reference strategy;
[0142] D KL (π θ ||π ref The equation is as follows:
[0143] ;
[0144] Where, π ref (o i |Q) is the reference strategy π ref The error correction output o for the i-th group i The predicted probability; π θ (o i |Q) is the new strategy π θ The error correction output o for the i-th group i The predicted probability;
[0145] The reward function is as follows:
[0146] ;
[0147] Among them, A iR is the advantage function corresponding to the i-th error correction output; i The reward value obtained from the error correction output of the i-th group; Mean({r1,r2,…,r G}) represents the average reward of the error correction output of group G in the same batch; std({r1,r2,…,r) G}) represents the reward standard deviation of the error correction output of group G in the same batch.
[0148] Parameter tuning process:
[0149] 1. Policy model initialization: The model trained by PEFT is used as the initial policy model (θ). old );
[0150] 2. Sampling strategy: Randomly sample batches (batch_size=8) from the error correction dataset, and generate G=8 sets of outputs for each sample (output diversity is achieved by adjusting temperature=0.3-0.7);
[0151] 3. Optimizer settings: AdamW optimizer, lr=5e -5 , betas=(0.9, 0.999), weight_decay=0.0001;
[0152] 4. Learning rate scheduling: A constant learning rate is used, with 500 training steps, and the policy performance is evaluated every 50 steps;
[0153] 5. Stopping condition: When J GRPO (θ)≥1.2 and D KL Training stops when the value is ≤0.01, with a final training step count of 500 steps. GRPO (θ)=1.35, D KL =0.008.
[0154] S3. Specific Fine-tuning Phase: The error correction model is fine-tuned using the AEC-Q standard structured question and answer data to enable the model to master the business rule of "asking questions based on specified fields - outputting the corresponding field content", thereby achieving accurate field-level question and answering in the field of automotive-grade chip testing.
[0155] Data preparation:
[0156] Business experts modify standard documents and test reports based on core conclusions, extract key business entities and attributes, and construct a business model (including fields such as "test item," "test content," "test conditions," and "judgment criteria"). This business model is then instantiated, and the specific test requirements data are stored in a structured format in a database table.
[0157] Generate question-and-answer pairs: By specifying certain fields and their contents in the table as "questions" (e.g., "What is the test content when the test item is 'HTOL' and the test condition is '125°C'?"), and using the contents of the target field (i.e., the specific description of the "test content") as the "answer", high-quality fine-tuned question-and-answer pair data samples are generated in batches, with a total data volume of 900.
[0158] Model training:
[0159] Input Processing: Question-answer pair data samples are input into the model. The tokenizer processes the questions and answers separately. During vectorization, the model focuses on learning the strong semantic association between specified fields in the question and target fields in the answer. Positional encoding highlights the pairing logic of "question-answer".
[0160] Model forward pass and parameter update:
[0161] The Transformer's Encoder module focuses on parsing the fields mentioned in the problem and their relationships.
[0162] The Decoder module closely correlates the Encoder's parsing results with cross-attention, focusing on generating accurate answers that perfectly match the content of the target field in the database.
[0163] Loss functions (such as cross-entropy) focus on the degree of matching between the model-generated answers and the actual field content in the database.
[0164] By backpropagation and updating model parameters using optimizers (such as AdamW), priority is given to adjusting parameters related to field mapping and business logic understanding (especially LoRA adapter parameters, and some underlying parameters can also be partially unfrozen). This enables the model to eventually master the business rule of "asking questions based on specified fields → outputting the corresponding field content", thus achieving accurate question answering of AEC-Q automotive-grade chip test structured data.
[0165] Parameter tuning process:
[0166] 1. Parameter update strategy: Unfreeze LoRA adapter parameters (continuing from the second phase configuration), and additionally unfreeze parameters corresponding to domain field keywords in the Embedding layer (approximately 5%).
[0167] 2. Optimizer settings: AdamW optimizer, lr=8e -5 , betas=(0.9, 0.999), weight_decay=0.001;
[0168] 3. Learning rate scheduling: Cosine annealing is used, with warmup_steps=50 and T_max=1000 (annealing cycles), eventually decaying the learning rate to 1e.-6 ;
[0169] 4. Training batch size: batch_size=4, gradient_accumulation_steps=2, training epoch=10;
[0170] 5. Evaluation Metrics: Introduce a domain-specific question-answering metric—Field Matching Accuracy (Pfield). The calculation formula is Pfield = Number of samples where the answer completely matches the database field content / Total number of samples. The target Pfield is ≥ 95%.
[0171] 6. Stopping condition: Training is stopped when Pfield ≥ 95% and validation loss ≤ 0.05. The final training epoch is 8, Pfield = 96.2%, and validation loss = 0.04.
[0172] Three-stage general parameter update formula:
[0173] ;
[0174] Where, θ t+1 The updated model parameters (including embedding vectors, attention weights, LoRA adapter parameters, etc.); θ t The parameters are the current model parameters before the update (initial values are the pre-trained model parameters, and subsequent values are the parameters after the previous training stage); η is the learning rate (a hyperparameter, the values for each stage are shown in the corresponding parameter tuning process, and in automotive-grade domain training, θ∈[1e) is uniformly set). -5 , 1e -4 (To avoid parameter oscillations). For the loss function L(θ) at the current parameter θ t The gradient at that point (automatically calculated using PyTorch's autograd, with gradient clipping parameter max_norm=1.0 to prevent gradient explosion).
[0175] Implementation conditions: Gradient calculation adopts mixed precision training (FP16) to accelerate the training process; at the same time, gradient checkpointing is enabled to save memory usage (single card memory consumption ≤35GB).
[0176] The entire training process is executed sequentially on a single A100 graphics card, ultimately resulting in a dedicated large model with complete knowledge of automotive-grade chip testing, logical reasoning capabilities, and accurate question-answering functions.
[0177] like Figure 4-5As shown in the image, the interactive error diagnosis interface of the AEC-Q 100 Rev-H standard document is displayed. To improve the accuracy of AEC-Q standard document parsing, this embodiment uses a simplified design. Figure 4 The interactive error diagnosis interface shown includes core functions such as text input adaptation, real-time error annotation, correction suggestion generation, providing precise correction solutions based on the AEC-Q 100Rev-H Table 1 standard clauses, and version tracking management. This interface significantly reduces the cognitive load of manual review through its multi-dimensional visual design.
[0178] The example input information is: "The ambient operating temperature range for Class 0 devices in AEC-Q 100 Rev-H is -40℃ to +150℃. The ambient operating temperature range for Class 3 devices specified in Table 1 of the AEC-Q100_Rev_HBase_Document is +40℃ to +95℃." The system first calls... Figure 4 The interactive diagnostic module completes basic error identification and then automatically triggers... Figure 5 The intelligent correction process. Figure 5 By using error feature vectorization technology to transform erroneous segments into structured data, and relying on knowledge graph retrieval to query "Level 3 device standard temperature range" and multi-modal correction strategies, the system finally generates a correction result that conforms to the specifications, achieving a fully automated closed loop from "error labeling" to "intelligent correction".
[0179] Example 3
[0180] This embodiment proposes a training system for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, based on embodiments 1 and 2. The training system is established based on the aforementioned training method and includes:
[0181] The data preparation module is used to obtain domain-specific text blocks from the AEC-Q automotive-grade chip testing standard document through multimodal parsing and two-stage segmentation, and further generate error correction datasets and structured question-answering pairs samples.
[0182] The model training module is used to execute the following sequentially:
[0183] The pre-trained large model is then further trained using the segmented text.
[0184] The parameters of the continuously trained model are efficiently fine-tuned using a low-rank adaptation method, and then reinforcement learning is performed on the error correction dataset using a group relative policy optimization algorithm to obtain an automotive-grade test error correction model.
[0185] The error correction model was fine-tuned using the question-and-answer pairs to enable it to achieve precise question-and-answer capabilities at the field level.
[0186] The parameter update module is used to iteratively update model parameters through gradient descent and backpropagation of the loss function.
[0187] The data preparation module includes:
[0188] The multimodal parsing submodule is used to convert AEC-Q standard PDFs into Word files that retain the table of contents, tables, and image metadata.
[0189] The two-stage chunked submodule is used to serialize tables into Markdown text, convert flowcharts / architecture diagrams into descriptive text, and merge or cut them according to the token length to obtain training samples;
[0190] The error correction dataset generation submodule is used to insert errors such as fact reversal, extreme data bias, or core conclusion tampering into the segmented data, and outputs an error correction dataset containing the error location index, error cause, and corrected text.
[0191] The question-and-answer pair generation submodule is used to generate structured question-and-answer pair samples in batches based on the AEC-Q business model fields.
[0192] The system architecture presented in Example 3 maps the training method into three coupled modules: the data preparation module undertakes four functions: multimodal parsing, two-stage block division, error correction dataset generation, and question-answer pair generation, converting the original AEC-Q standard documents into trainable continuation training samples, reinforcement learning positive and negative examples, and field-aligned question-answer pairs in one go; the model training module is only responsible for sequentially calling the above data to complete continuation training, low-rank adaptation fine-tuning, GRPO reinforcement learning, and field-level fine-tuning, without involving data processing logic itself; the parameter update module performs local iteration on the adapter and field-related parameters through gradient descent and backpropagation, realizing the injection of domain capabilities while keeping the general weights frozen. The three modules have a clear hierarchy and well-defined input / output interfaces, making the aforementioned steps reusable in engineering and providing a pluggable modular foundation for subsequent hardware or cloud deployment.
[0193] Example 4
[0194] Based on Embodiment 3, this embodiment proposes a computer-readable storage medium that stores one or more programs that can be executed by one or more processors to implement the training methods of Embodiments 1 and 2 above.
[0195] The migration method described in this application can be stored in a storage medium as software for computer access and operation, or it can be made into an independent computing card to form an independent data computing and analysis terminal.
[0196] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0197] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0198] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0199] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0200] Furthermore, in the various embodiments of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional unit.
[0201] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0202] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, characterized in that, It should include at least the following steps: S1. Continued Training Phase: The domain block text obtained by multimodal parsing and two-stage segmentation of the AEC-Q automotive-grade chip testing standard document is used to continue training the pre-trained large model so that the model can establish a knowledge system for the automotive-grade chip testing domain. S2. Reinforcement and Fine-tuning Stage: Based on the model after continuous training, the model parameters are first fine-tuned efficiently using low-rank adaptation. Then, reinforcement learning is performed on the same error correction dataset using a group relative strategy optimization algorithm to obtain an automotive-grade test error correction model with error localization and correction reasoning capabilities. S3. Specific Fine-tuning Phase: The error correction model is fine-tuned using the AEC-Q standard structured question and answer data to enable the model to master the business rule of "asking questions based on specified fields - outputting the corresponding field content", thereby achieving accurate field-level question and answering in the field of automotive-grade chip testing.
2. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 1, is characterized in that... The multimodal analysis and two-stage block division mentioned in step S1 include: S11. Use a multimodal document parsing tool to convert AEC-Q standard PDF files into Word files that retain the table of contents, tables, and image metadata; S12. Phase 1: Serialize the tables in the Word file into Markdown text, call the visual model to convert the flowchart and architecture diagram into descriptive text, and then generate the initial data blocks according to the directory structure; S13. Phase Two: Based on the maximum context length of the model, merge or cut the initial data blocks to obtain continued training samples with a length of 512-1536 tokens.
3. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 1 or 2, is characterized in that... The continued training described in step S1 uses a causal language model loss function, the specific function of which is as follows: ; Where L(θ) is the training loss corresponding to the model parameter θ; N is the total number of samples for subsequent training; T is the token length of a single sample; x i,t P(x) represents the real token at position t in the i-th question-and-answer pair. i,t ,…,x i,t-1 ;θ) is the probability that the model predicts the t-th token based on the first t-1 tokens of the i-th sample under parameter θ; The model's parameters are iteratively updated by minimizing the predicted cross-entropy of the model for automotive-grade text sequences.
4. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 2, is characterized in that... The S2 step includes at least the following: S21. Data Preparation: Call the block data obtained in Phase 1 by directory, insert errors such as fact reversal, extreme data deviation or core conclusion tampering into the designed workflow, and generate an error correction dataset containing error location index, error cause and corrected text based on the original text of the AEC-Q standard; S22. Model Training: After continuous training, LoRA low-rank adaptation fine-tuning is performed on the model, freezing the backbone parameters and updating only the adapter parameters; then, using the obtained error correction dataset as input, reinforcement learning is performed using the group relative policy optimization algorithm. The policy model is iteratively updated through a reward function jointly driven by format reward and accuracy reward, so that the model output conforms to the four-segment error correction framework and the localization and correction are accurate.
5. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 4, is characterized in that... The objective function of the group relative strategy optimization algorithm described in step S22 is: ; Among them, J GRPO (θ) is the objective function of the GRPO algorithm; E[q~P(Q)] is the expected value of the query sample Q for error correction in automotive-grade testing; π θold (O|Q) represents the old strategy; π θ (o i |Q) represents the new strategy; Clip(.,1-ε,1+ε) is the truncation operation, and ε is the hyperparameter; A i Let be the advantage function of the i-th output; β is the penalty coefficient for the KL divergence, and D KL (π θ ||π ref ) is the KL divergence between the new strategy and the reference strategy; D KL (π θ ||π ref The equation is as follows: ; Where, π ref (o i |Q) is the reference strategy π ref The error correction output o for the i-th group i The predicted probability; π θ (o i |Q) is the new strategy π θ The error correction output o for the i-th group i The predicted probability; The reward function is as follows: ; Among them, A i R is the advantage function corresponding to the i-th error correction output; i The reward value obtained from the error correction output of the i-th group; Mean({r1,r2,…,r G }) represents the average reward of the error correction output of group G in the same batch; std({r1,r2,…,r) G }) represents the reward standard deviation of the error correction output of group G in the same batch.
6. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 1, is characterized in that... The S3 step includes at least the following: S31. Data Preparation: Business experts construct a business model containing fields such as "test item, test content, test conditions, and judgment criteria" based on the AEC-Q standard documents and test reports, and write the specific test requirements into the database table; by specifying some field content as questions and the remaining field content as answers, structured question-and-answer pairs are generated in batches. S32. Model Training: Using question-answer pairs as input, fine-tune the model obtained in S2 using the causal language model loss function, prioritizing the updating of parameters related to field mapping, until the proportion of samples in which the model output answers are completely consistent with the corresponding field content in the database reaches a preset threshold.
7. The training method for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, as described in claim 1, is characterized in that: The parameter update formulas during backpropagation in steps S1-S3 are as follows: ; Where, θ t+1 The updated model parameters; θ t The parameters are the current model parameters before the update; η is the learning rate. For the loss function L(θ) at the current parameter θ t The gradient at that point.
8. A training system for a large-scale model specifically designed for automotive-grade chip testing oriented towards the AEC-Q standard, characterized in that... The training system is established based on the training method described in any one of claims 1-7, and includes at least: The data preparation module is used to obtain domain-specific text blocks from the AEC-Q automotive-grade chip testing standard document through multimodal parsing and two-stage segmentation, and further generate error correction datasets and structured question-answering pairs samples. The model training module is used to execute the following sequentially: The pre-trained large model is then further trained using the segmented text. The parameters of the continuously trained model are efficiently fine-tuned using a low-rank adaptation method, and then reinforcement learning is performed on the error correction dataset using a group relative policy optimization algorithm to obtain an automotive-grade test error correction model. The error correction model was fine-tuned using the question-and-answer pairs to enable it to achieve precise question-and-answer capabilities at the field level. The parameter update module is used to iteratively update model parameters through gradient descent and backpropagation of the loss function.
9. A training system for a large-scale automotive-grade chip testing system as described in claim 8, wherein: The data preparation module includes: The multimodal parsing submodule is used to convert AEC-Q standard PDFs into Word files that retain the table of contents, tables, and image metadata. The two-stage chunked submodule is used to serialize tables into Markdown text, convert flowcharts / architecture diagrams into descriptive text, and merge or cut them according to the token length to obtain training samples; The error correction dataset generation submodule is used to insert errors such as fact reversal, extreme data bias, or core conclusion tampering into the segmented data, and outputs an error correction dataset containing the error location index, error cause, and corrected text. The question-and-answer pair generation submodule is used to generate structured question-and-answer pair samples in batches based on the AEC-Q business model fields.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.