Method and apparatus for training natural language pre-trained model, device, and storage medium
AssigneeBeijing Longzhi Digital Technology Co., Ltd.
InventorsYujian BAO, Wenjun ZHANG, Zihan YUAN
Life of this patent
Estimating the term…
Loading patent…
AssigneeBeijing Longzhi Digital Technology Co., Ltd.
InventorsYujian BAO, Wenjun ZHANG, Zihan YUAN
Estimating the term…
A method and apparatus for training a natural language pre-trained model, a device, and a storage medium are provided. The method includes: tokenizing a text by using a dictionary, and converting tokens into one-hot codes; inputting the one-hot codes into a token embedding layer, and performing mapping by using the token embedding layer to obtain a static token vector corresponding to each token; adding the static token vector, a segment embedding vector, and a position embedding vector to obtain an input vector of each token, and taking the input vector as an input to obtain a dynamic token vector corresponding to each token; calculating similarity between the static token vector and the dynamic token vector, and taking a similarity calculation result as a constraint item; and adjusting an original loss function by using the constraint item, and training the natural language pre-trained model with the adjusted original loss function.
A method for training a natural language pre-trained model, comprising:
An apparatus for training a natural language pre-trained model, comprising:
Dependencies are inferred from the claim text.