Information processing methods, devices, equipment, and media based on large-scale models
A single large-scale model with mode control identifiers for multiple operating modes addresses the inefficiencies of multiple model architectures by enhancing adaptability and reducing costs, improving generation efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies require multiple independent models for different inference strategies, leading to increased training, deployment, and maintenance costs.
A single large-scale model is equipped with dedicated mode control identifiers for multiple pre-configured operating modes, allowing it to automatically recognize and execute different inference strategies based on specific scenes, enhancing adaptability and reducing costs.
The solution improves the adaptability of the large-scale model to user needs and enhances generation efficiency while minimizing the costs associated with training, deploying, and maintaining multiple models for various inference strategies.
Smart Images

Figure 2026082926000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, particularly to the fields of technologies such as machine learning, deep learning, and large models. Specifically, it relates to an information processing method based on a large model, an information processing apparatus based on a large model, an electronic device, a computer-readable storage medium, and a computer program product.
Background Art
[0002] Artificial intelligence is a subject that studies how to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) on a computer. There are both hardware technologies and software technologies. The hardware technologies of artificial intelligence generally include technologies such as sensors, artificial intelligence dedicated chips, cloud computing, distributed storage, and big data processing. The artificial intelligence software technologies mainly include several directions such as natural language processing technology, computer vision technology, speech recognition technology, and machine learning / deep learning, big data processing technology, and knowledge graph technology.
[0003] With the rapid development of large language models (LLMs), large models that support inference have already achieved remarkable results in multiple tasks. Such models can generate intermediate steps in the inference process, decompose complex problems into multiple sub-problems, verify the inference links step by step, and build a foundation for the generation of subsequent response content. Subsequently, the large model for generation can complete the final output based on the inference result. This approach not only helps to improve the accuracy of the output content, but can also intuitively show the inference process to the user, and by making the output more logical and explainable, it improves the reliability of the output content.
[0004] The methods described in this section are not necessarily previously conceived or adopted. Unless otherwise specified, none of the methods described in this section should be considered prior art simply because they are included in this section. Similarly, unless otherwise specified, none of the problems mentioned in this section should be considered to have been acknowledged in any prior art. [Overview of the project]
[0005] This disclosure provides an information processing method based on a large-scale model, an information processing device based on a large-scale model, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of this disclosure, an information processing method based on a large-scale model is provided. The method includes: obtaining user input; determining a target operating mode from a plurality of pre-set operating modes, each pre-set operating mode having a corresponding inference strategy and a mode control identifier used to trigger the inference strategy; and obtaining target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode to the large-scale model.
[0007] Another aspect of the present disclosure provides an information processing device based on a large-scale model. The device includes an acquisition unit configured to acquire user input; a determination unit configured to determine a target operating mode from a plurality of pre-configured operating modes, each pre-configured operating mode having a corresponding inference strategy and a mode control identifier used to trigger the inference strategy; and a text generation unit configured to acquire target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode to the large-scale model.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising at least one processor and a memory communicated to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and these instructions are executed by the at least one processor so that the at least one processor can perform the method described above.
[0009] Another aspect of this disclosure provides a non-temporary computer-readable storage medium storing computer instructions for causing a computer to perform the method described above.
[0010] According to another aspect of this disclosure, a computer program product is provided which includes a computer program that, when executed by a processor, accomplishes the method described above.
[0011] According to one or more embodiments of the present disclosure, the present disclosure sets a dedicated mode control identifier for each of a plurality of pre-configured operating modes having different inference strategies, and by inputting the large model along with the corresponding first mode control identifier during the generation stage, the large model can automatically recognize and execute the inference strategy corresponding to the selected operating mode. According to this embodiment, a single large model can support multiple operating modes having different inference strategies, which can be flexibly selected according to specific scenes, thereby improving the adaptability of the large model to user needs and the generation efficiency, and reducing the costs of training, deploying, and maintaining multiple models for multiple inference strategies.
[0012] It should be understood that the content described in this section is not intended to identify any essential or important features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will be readily apparent from the following specification. [Brief explanation of the drawing]
[0013] The drawings illustrate embodiments and constitute part of the specification, and are used to illustrate exemplary embodiments of the embodiments together with the textual description of the specification. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements. [Figure 1] This is a schematic diagram of an exemplary system capable of carrying out each of the methods described herein, according to the embodiments of this disclosure. [Figure 2] This is a flowchart showing an information processing method based on a large-scale model according to an embodiment of the present disclosure. [Figure 3] This is a flowchart showing the training operation of a large-scale model according to the embodiments of this disclosure. [Figure 4] This is a block diagram showing an information processing device based on a large-scale model according to an embodiment of the present disclosure. [Figure 5] This is a block diagram showing an exemplary electronic device configuration for realizing an embodiment of the present disclosure. [Modes for carrying out the invention]
[0014] The following description illustrates exemplary embodiments of the disclosure, accompanied by drawings, and includes various details of the embodiments for the sake of ease of understanding; however, these should be considered merely illustrative. Accordingly, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the disclosure. Similarly, for clarity and conciseness, descriptions of known functions and structures are omitted in the following description.
[0015] In this disclosure, unless otherwise specified, terms such as “first,” “second,” etc., used to describe various elements are not intended to limit the spatial, timing, or importance relationships of these elements. Such terms are used solely to distinguish one element from another. In some examples, the first and second elements may refer to the same example of that element, or, depending on the contextual description, to different examples.
[0016] The terms used in describing the various examples in this disclosure are for illustrative purposes only and are not intended to limit them. Unless otherwise explicitly indicated in the context, such elements may be one or more, unless the number of elements is specifically limited. The terms "and / or" as used in this disclosure cover any of the listed items and all possible combinations thereof.
[0017] In related technologies, several embodiments employ different independent models for different inference strategies. However, the training, deployment, and maintenance costs of multimode architectures are multiplied.
[0018] To solve the above problem, this disclosure sets a dedicated mode control identifier for each of several pre-configured operating modes having different inference strategies, and by inputting the large-scale model along with the corresponding first mode control identifier during the generation stage, the large-scale model can automatically recognize and execute the inference strategy corresponding to the selected operating mode. According to this embodiment, a single large-scale model can support multiple operating modes having different inference strategies, which can be flexibly selected according to specific scenes, thereby improving the adaptability of the large-scale model to user needs and the generation efficiency, and reducing the cost of training, deploying, and maintaining multiple models for multiple inference strategies.
[0019] The embodiments of this disclosure will be described in detail below with reference to the drawings.
[0020] Figure 1 shows a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein can be implemented according to embodiments of the present disclosure. Referring to Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 that connect one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to run one or more applications.
[0021] In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of the method of the present disclosure.
[0022] In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, to users of client devices 101, 102, 103, 104, 105 and / or 106 in a Software as a Service (SaaS) model.
[0023] In the configuration shown in FIG. 1, server 120 may include one or more assemblies that implement the functions executed by server 120. These assemblies may include software assemblies, hardware assemblies, or combinations thereof that can be executed by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and / or 106 can interact with server 120 by sequentially using one or more client applications to utilize the services provided by these assemblies. It should be understood that various different system configurations are possible and may be different from system 100. Therefore, FIG. 1 is an example of a system for implementing various methods described herein and is not intended to be limiting.
[0024] The user can perform human-machine interaction using client devices 101, 102, 103, 104, 105, and / or 106. The client device can provide an interface for the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Although only six client devices are illustrated in FIG. 1, as will be understood by those skilled in the art, the present disclosure can support any number of client devices.
[0025] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices such as portable handheld devices, general-purpose computers (e.g., personal computers and notebook computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors, or other detection devices. These computer devices can run various types and versions of software applications and operating systems such as MICROSOFT Windows, APPLE iOS, UNIX-like (registered trademark) operating systems, Linux (registered trademark) or Linux-like (registered trademark) operating systems (e.g., GOOGLE Chrome OS), or can include various mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include mobile phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Game systems may include various handheld game devices, Internet-connected game devices, etc. Client devices can, for example, run Internet-related applications, communication applications (e.g., email applications), short message service (SMS) applications, and can execute various applications and use various communication protocols.
[0026] Network 110 may be any type of network known to those skilled in the art, and it may use any one of several available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. For example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, Token Ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth®, WIFI), and / or any combination of these and / or other networks.
[0027] Server 120 may include one or more general-purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX® servers, midrange servers), blade servers, large computers, server clusters, or any other suitable configuration and / or combination. Server 120 may also include one or more virtual machines running a virtual operating system, or other computing architectures related to virtualization (e.g., one or more flexible pools of virtualized logical memory devices to maintain the server's virtual memory devices). In various embodiments, Server 120 may run one or more services or software applications that provide the functions described below.
[0028] The computing units in server 120 can run one or more operating systems, including any of the above-mentioned operating systems and any commercial server operating systems. Server 120 can also run any one of a variety of additional server applications and / or middle-tier applications, such as an HTTP server, FTP server, CGI server, JAVA® server, or database server.
[0029] In some embodiments, the server 120 may include one or more applications for analyzing and integrating data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105 and / or 106. The server 120 may further include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105 and / or 106.
[0030] In some embodiments, server 120 may be a server in a distributed system or a server incorporating blockchain. Server 120 may be a cloud server or a smart cloud computing server or smart cloud host equipped with artificial intelligence technology. A cloud server is a host product in a cloud computing service system and solves the problems of high management difficulty and low business scalability that exist in conventional physical hosts and virtual private server (VPS) services.
[0031] System 100 may also include one or more databases 130. In some embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as audio files and video files. The databases 130 can be located in various locations. For example, a database used by server 120 may be located locally with server 120, or it may be located away from server 120 and communicate with server 120 via a network or a dedicated connection. The databases 130 may be of various types. In some embodiments, the database used by server 120 may be a relational database. One or more of these databases can store, update, and retrieve data from the databases in response to instructions.
[0032] In some embodiments, one or more of the databases 130 may be used by an application to store application data. The databases used by the application may be of different types, such as a key-value repository, an object repository, or a general-purpose repository supported by a file system.
[0033] The system 100 in Figure 1 can be configured and operated in various ways so that the various methods and apparatus described in this disclosure can be applied.
[0034] According to one aspect of this disclosure, an information processing method based on a large-scale model is provided. As shown in Figure 2, the method includes: step S201 of acquiring user input; step S202 of determining a target operating mode from a plurality of pre-set operating modes, where each pre-set operating mode has a corresponding inference strategy and a mode control identifier used to trigger the inference strategy is set; and step S203 of acquiring target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode into the large-scale model.
[0035] This allows for the setting of dedicated mode control identifiers for multiple pre-configured operating modes, each with a different inference strategy. By inputting the large-scale model along with the corresponding first mode control identifier during the generation phase, the large-scale model can automatically recognize and execute the inference strategy corresponding to the selected operating mode. According to this embodiment, a single large-scale model can support multiple operating modes with different inference strategies, which can be flexibly selected according to specific scenarios. This improves the adaptability of the large-scale model to user needs and the generation efficiency, and reduces the costs of training, deploying, and maintaining multiple models for multiple inference strategies.
[0036] The large-scale models (or deep learning large-scale models) described in this disclosure may also be large-scale language models. Deep learning large-scale models have end-to-end characteristics and can generate response data directly from user input data without requiring any functional modules or additional inputs other than the deep learning large-scale model itself. In other words, the deep learning large-scale model itself has the generation function. Large-scale language models typically refer to deep learning large-scale models with billions to hundreds of billions of parameters, which are trained on large amounts of text data or other modal data. Large-scale language models may be used for a variety of natural language processing tasks, such as text generation, language translation, and question answering systems.
[0037] Large-scale deep learning models can use, for example, an N-layer Transformer network structure with encoders and decoders, or a Unified Pre-trained Language Model (UniLM) network structure. It is important to understand that large-scale deep learning models may also be neural network models based on other Transformer network structures, and are not limited to such models. The inputs and outputs of large-scale deep learning models consist of tokens (also called lexemes). Each token can correspond to a single letter, character, word, or special symbol. Large-scale deep learning models are trained through pre-training tasks and generation tasks to acquire the above-mentioned generation capabilities.
[0038] The large-scale models described in this disclosure may be multimodal large-scale models. The inputs of multimodal large-scale models may include not only text data but also various types of information such as images, audio, and video, and are capable of processing cross-modal information. Multimodal large-scale models typically enable the model to understand and integrate various sources of information by unifying data from different modal systems using Unicode or modeling, thereby enabling more complex inference and generation tasks. Therefore, the output of multimodal large-scale models is not limited to text form but may also include image generation, speech synthesis, video summarization, and the like.
[0039] In a multimodal scene, a token may also represent a modal unit such as an image block or an audio frame, and is used to unify and process non-textual information.
[0040] In step S201, user input is obtained.
[0041] User input in this disclosure may include various external information that can be processed by a large-scale model, including text, audio, images, or other types of information actively entered by the user, and may also include content automatically entered by the system based on user information or content obtained in other ways. In one exemplary embodiment, user input may be user query data.
[0042] In step S202, a target operating mode is determined from a plurality of pre-configured operating modes, where each pre-configured operating mode has a corresponding inference strategy, and a mode control identifier used to trigger the inference strategy is set.
[0043] In some embodiments, multiple pre-configured operating modes can correspond to multiple inference strategies, such as performing inference, skipping inference, and the large model autonomously deciding whether or not to perform inference. Here, "performing inference" means forcing the large model to perform the inference process, "skipping inference" means forcing the large model to skip the inference process, and "the large model autonomously decides" means the large model autonomously deciding whether or not to perform the inference process based on user input. The details of the implementation of each of the above modes are described below. Each of the above modes implements control over the large model via a corresponding mode control identifier. It can be understood that the mode control identifier determines the inference processing method before the large model generates response data for user input, and these can all be considered inference strategies in this disclosure.
[0044] Mode control identifiers may use natural language or specific formatted symbols or tags (the specific forms of which will be described later), and are used to control how large-scale models generate them according to the corresponding inference strategy.
[0045] In step S203, the user input and the mode control identifier of the target operating mode are input to the large-scale model, thereby obtaining the target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode.
[0046] In some embodiments, user input and mode control identifiers are first combined to form input data for a large-scale model, and then this input data can be processed by the large-scale model. In some scenarios, the input data for the large-scale model is also referred to as a prompt or prompt text.
[0047] In some embodiments, input data for large-scale models can be obtained by stitching user input and mode control identifiers together. Furthermore, a string representing the user side can be set before the user input, and a string representing the machine side can be set before the mode control identifier. A logical partition identifier may also be set between the user input and the string representing the machine side.
[0048] In one exemplary example, the input data for the large-scale model is: User:{User Input}\nAssistant:{Mode Control Identifier} may also be used. Here, "User:" is a string indicating the user side, "\n" is a newline character, i.e., a logical partition identifier, and "Assistant:" is a string indicating the machine side.
[0049] Large-scale models can generate output data using an autoregressive approach. Specifically, tokenization of the input data (e.g., user input and mode control identifiers) is performed first to obtain a token array. Furthermore, the token array can be processed using the large-scale model, and the newly generated tokens are iteratively input into the large-scale model to finally obtain the output data generated by the large-scale model. In this way, the input data (i.e., prompts) and output data (multiple tokens generated in sequence) of the large-scale model can form a single complete array.
[0050] In some embodiments, user input and mode control identifiers are sequentially input to the large model, and the target output data is generated by the large model after the mode control identifier has been input to the large model. "Subsequently" can be understood as meaning that the large model performs the generation of the last token of the input data immediately after completing the pre-embedding of the token array corresponding to the input data. Thus, in the complete array described above, the mode control identifier and the output data are adjacent. The multiple tokens generated by the large model after the mode control identifier include multiple tokens belonging to the response data, and depending on the inference strategy, may also include one or more tokens belonging to the inference process text preceding the response data. Furthermore, the response data may also include certain formatted symbols or tags.
[0051] According to some embodiments, multiple pre-configured operating modes are set such that each mode control identifier includes a unified inference start identifier, and by adding or omitting a subsequent identifier after the inference start identifier, the large model is instructed to trigger the corresponding inference strategy, the subsequent identifier including an inference end identifier and / or a logical partition identifier.
[0052] This allows for a unified inference start identifier, where each operating mode can be distinguished simply by adding or omitting a subsequent identifier. This enables a mode control identifier format where different operating modes match, allowing large-scale models to quickly and reliably determine the corresponding operating mode and inference strategy. This simplifies the identifier parsing logic of large-scale models, reduces the complexity of data processing during the training and inference phases, and improves the stability of mode selection.
[0053] An inference start identifier may be understood as an identifier for guiding or instructing the large model to enter the inference phase, and an inference end identifier may be understood as an identifier for guiding or instructing the large model to exit the inference phase. In a mode control identifier, adding an inference end identifier after the inference start identifier can explicitly indicate that the inference process by the large model has already ended (or that there is no need to perform inference); adding a logical partition identifier after the inference start identifier but not adding an inference end identifier guides the large model to generate text content following the logical partition identifier and allows it to perform the inference process; omitting a subsequent identifier after the inference start identifier (i.e., not adding an inference end identifier or logical partition identifier) can still guide the large model to enter the inference phase, but because a logical partition identifier is not added, it does not guide the large model to continue generating text content, and the large model can autonomously decide whether or not to directly generate an inference end identifier in order to skip the inference phase, or generate a logical partition identifier in order to start the inference process.
[0054] In one exemplary embodiment, the inference start identifier is <think> It may also be, and the inference termination identifier is< / think> This may also be the case. By using customized paired XML tags, large-scale models can accurately recognize the correspondence between identifiers, thereby improving the effectiveness of analysis of mode-controlled identifiers based on large-scale models. It should be understood that inference start identifiers and inference end identifiers can be used in other forms, and this disclosure is not intended to limit them.
[0055] According to some embodiments, the multiple pre-configured operating modes may include a forced inference mode. The mode control identifier corresponding to the forced inference mode may further include a logical partition identifier appended after the inference start identifier, but not the inference end identifier. In response to the large model detecting a mode control identifier corresponding to a forced inference mode, the target output data sequentially includes the inference process text, the inference end identifier, and the response data corresponding to the user input, generated based on the inference process text.
[0056] This allows for the addition of a logical partition identifier after the inference start identifier in the forced inference mode, but without adding an inference end identifier. This guides the large-scale model to generate inference process text from the logical partition identifier, and then autonomously generates an inference end identifier after the inference is complete, generating response data based on this inference process text. Since the logical partition identifier has the function of guiding text generation, adding it prevents situations where the large-scale model might directly generate an inference end identifier after the inference start identifier and skip the inference process, thus ensuring that the large-scale model is forced to execute the inference process.
[0057] In this disclosure, “logical delimiter identifiers” are used to identify logical boundaries in the inference process during text generation. Logical delimiter identifiers can use symbols or tags commonly used in text content, thereby allowing large-scale models to recognize that text generation is currently underway. In one exemplary embodiment, the logical delimiter identifier may be a newline character \n. It should be understood that, in addition to newline characters, any symbol, character, or tag capable of achieving a similar logical delimiter function can be used as a substitute, provided that this does not exceed the scope of protection of this disclosure.
[0058] In some embodiments, the large-scale model may generate a logical partition identifier after the inference process text has been generated, and then generate an inference end identifier after the logical partition identifier. That is, the target output data may further include other logical partition identifiers between the inference process text and the inference end identifier. According to this embodiment, the inference start identifier, logical partition identifier, inference process text generated sequentially by the large-scale model, logical partition identifier, and inference end identifier in the mode control identifier constitute a structural block with a clear boundary and a symmetrical structure, which can be easily identified, extracted, or otherwise processed by the large-scale model or subsequent systems.
[0059] In one exemplary embodiment, in forced inference mode, the input data for the large-scale model is: User: {User input}\nAssistant: <think>\n is also acceptable, Here, <think>"\n" is the mode control identifier. Correspondingly, the output data of the large model is {Inference Process Text}\n< / think> It may also be {response data}. According to some embodiments, the multiple pre-configured operating modes may include non-inference modes, and the mode control identifier corresponding to a non-inference mode may include an inference start identifier and a subsequently appended inference end identifier. In response to the large-scale model detecting a mode control identifier corresponding to a non-inference mode, the target output data includes response data corresponding to user input, generated by the large-scale model after skipping the inference process.
[0060] This allows for flexible control over the inference strategy of large models by setting the mode control identifier for non-inference modes to include a pair of inference start and inference end identifiers, thereby guiding large models to skip the inference process and directly generate response data.
[0061] In one exemplary embodiment, in non-inference mode, the input data for the large-scale model is: User: {User input}\nAssistant: <think>< / think> Even if that is the case, Here, <think>< / think> " is the mode control identifier. Correspondingly, the output data of the large model is It may also be {response data}. According to some embodiments, the multiple pre-configured operating modes may further include large-scale model autonomous inference modes, and the mode control identifier corresponding to a large-scale model autonomous inference mode omits a subsequent identifier after the inference start identifier. In other words, the mode control identifier corresponding to a large-scale model autonomous inference mode does not include a logical partition identifier or an inference end identifier after the inference start identifier. In response to the large-scale model detecting a mode control identifier corresponding to a large-scale model autonomous inference mode, the large-scale model autonomously decides that it needs to perform an inference process based on user input, and the target output data sequentially includes the logical partition identifier, the inference process text, the inference end identifier, and the answer data corresponding to the user input generated based on the inference process text.
[0062] This allows the large model to autonomously decide whether or not to generate logical partition identifiers and subsequent inference text based on user input, by providing only an inference start identifier to the large model in large model autonomous inference mode, and not providing logical partition identifiers to guide it to generate inference process text. This gives the large model the ability to dynamically select whether or not to execute the inference process based on the complexity of the user input, improving the adaptability of the solution and enabling rational allocation and improved generation efficiency of inference resources.
[0063] In one exemplary embodiment, in the large-scale model autonomous inference mode, the input data for the large-scale model is: User: {User input}\nAssistant: <think>Even if that is the case, Here, <think> " is a mode control identifier. As you can see, compared to forced inference mode, the input data in large-scale model autonomous inference mode has fewer newline characters "\n". Therefore, in large-scale model autonomous inference mode, the large-scale model either generates a logical partition identifier (e.g., newline character "\n") to execute the inference process, or generates a corresponding inference termination identifier (e.g., "< / think> It can autonomously decide whether to directly generate the '' and skip the inference process.
[0064] When a large-scale model decides that it needs to perform an inference process, the output data is: \n{Inference Process Text}\n< / think> It may also be {response data}. According to some embodiments, in response to the large model detecting a mode control identifier corresponding to the large model autonomous inference mode, the large model autonomously decides that it does not need to perform the inference process based on user input, and the target output data includes an inference termination identifier and response data to the user input generated after the large model skipped the inference process.
[0065] In one exemplary embodiment, when a large-scale model determines that it does not need to perform an inference process, the output data is: < / think> It may also be {response data}. Unlike conventional methods that achieve different inference strategies by switching between independent models, this disclosure sets a prefix selection method for mode control identifiers based on the inference strategies expected to be adopted in large-scale models. This allows users to flexibly switch between different inference strategies based on specific application requirements, thereby meeting the needs in various scenarios and simplifying the usage process. Furthermore, the large-scale models in this disclosure can automatically select the appropriate operating mode based on the complexity of the problem, maximizing the utilization of computational resources and improving inference efficiency while guaranteeing inference effectiveness.
[0066] According to some embodiments, the information processing method may further include determining a target inference intensity. The target inference intensity can represent a target length of the inference process text that the large-scale model is expected to generate. In response to the large-scale model deciding that it needs to perform an inference process, the large-scale model can generate the inference process text based on the inference intensity.
[0067] By introducing inference intensity, this allows us to constrain the length of the inference process text generated by large-scale models as a control dimension other than the operating mode or inference strategy, preventing the inference process from becoming too long and improving the overall generation efficiency and user experience of large-scale models.
[0068] In some embodiments, the inference strength of the large-scale model can be qualitatively controlled, for example, by setting multiple inference strength levels such as low, medium, and high. Depending on the level of inference strength, the large-scale model can generate inference process text of different lengths. In some embodiments, the inference strength of the large-scale model can also be quantitatively controlled, for example, by setting the target length to an upper limit of a predetermined number of tokens.
[0069] According to some embodiments, the information processing method may further include inputting the inference strength as system information into a large-scale model.
[0070] This allows the generation behavior of a large-scale model to be controlled without changing the input data of the large-scale model, by inputting the inference strength as system information. This makes control over the length of the inference process more abstract and flexible.
[0071] According to some embodiments, the large-scale model can generate target output data using an autoregressive method based on user input, a mode control identifier, and previously generated tokens. In step S203, obtaining target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode into the large-scale model may include forcing the large-scale model to input an inference termination identifier in response to the length of the inference process text already generated by the current large-scale model exceeding the target length, and obtaining the response data corresponding to the user input that the large-scale model has generated after the inference termination identifier.
[0072] This allows for the implementation of constraints on the length of the inference process by monitoring the length of the text already generated in the inference process (i.e., the number of tokens already generated) and forcing the input of an inference termination identifier when the inference strength is exceeded. This effectively prevents large models from generating inference content that is too long.
[0073] In one exemplary embodiment, the inference strength can be quantitatively controlled by the output count. For example, the user may set a specific upper limit on the number of tokens (e.g., 2000 tokens). When the inference process reaches a predetermined count, the inference process is forcibly terminated, and the large-scale model is made to output the answer data by stitching \n to the end of the already generated array.
[0074] In conventional technologies, adjusting the inference strength usually depends on the user's experience and lacks fine-grained control mechanisms. This disclosure improves computational efficiency by providing a two-tiered inference strength control mechanism involving both the user and a large-scale model. This mechanism allows the user to flexibly adjust the inference strength as needed, while the large-scale model autonomously controls the optimization of the computational cost of the inference.
[0075] According to some embodiments, the large-scale model may be obtained by training using inference sample data, which includes a first sample input, an inference start identifier, a first inference process text, an inference end identifier, and first sample response data, and non-inference sample data, which includes a second sample input, an inference start identifier, an inference end identifier, and second sample response data.
[0076] In one exemplary embodiment, the inference sample data is: User: {First sample input}\nAssistant: <think> \n{First reasoning process text}\n< / think> This could also be {first sample response data}, As you can see, the inference sample data includes three parts: the user query, the inference process, and the answer.
[0077] In one exemplary embodiment, the non-inference sample data is: User:{Second sample input}\nAssistant: <think>< / think> This could also be {second sample response data}, As you can see, the non-inference sample data includes two parts: user input and response, but it does not participate in the inference process.
[0078] The data organization method for the inference sample data and non-inference sample data described above is consistent with the format of the mode control identifiers corresponding to each pre-configured operating mode and the output data corresponding to the large-scale model, as described above. By using a unified data organization method, training with the inference sample data and non-inference sample data allows the large-scale model to accurately identify the currently used inference strategy and generate a suitable output when it receives the mode control identifiers corresponding to each pre-configured operating mode, thereby meeting the inference needs in different application scenarios.
[0079] According to some examples, the semantic complexity of the first sample input may be greater than that of the second sample input. During the training phase, for simple problems, large-scale models can directly output response data without performing an inference process, while for complex problems, large-scale models can improve the quality of the response data by performing an inference process.
[0080] According to some embodiments, as shown in Figure 3, the large-scale model was obtained by training it through the following steps: step S301, which uses the large-scale model to be trained to generate multiple inference paths with corresponding inference process text and response data for the same sample input; step S302, which calculates the inference cost of each inference path; step S303, which determines at least one inference path with accurate response data and rearranges at least one inference path based on the inference cost; and step S304, which guides the training of the large-scale model to be trained by preferentially using the inference path with the lowest inference cost based on the rearrangement result.
[0081] This introduces a mechanism to suppress inference costs during the reinforcement learning phase, encouraging the model to achieve similar output effects even with lower inference costs, thereby improving computational efficiency.
[0082] In step S301, the sample inputs may be the first and second sample inputs mentioned above. In this step, the large model under training generates multiple candidate inference paths under the same input conditions, each inference path containing one stage of inference text and corresponding response data. Differences may exist between different inference paths in the logical development of the inference process, length, and expression of conclusions. Guiding the large model under training to generate multiple selectable paths provides a basis for subsequent selection of the optimal training samples.
[0083] In step S302, the inference cost can be evaluated using methods such as the length of the inference process text and the computational resources consumed in its generation. In one exemplary embodiment, the scale of the cost can be evaluated based on the number of tokens generated in the inference process, where a larger number of tokens results in a longer inference path and a higher cost.
[0084] In step S303, based on artificial annotation, rule matching, or an automated scoring mechanism, it can be determined whether the response data generated by each inference path matches the target's expectations. For paths where all responses are "accurate," they can be further sorted based on the inference cost obtained in step S302, and paths with lower costs can be selected as higher-priority samples for subsequent learning. By sorting these inference paths with "accurate" responses, the model is encouraged to produce more rational outputs with shorter inference paths and lower costs.
[0085] In step S304, the top inference paths are selected as training signals based on the sorting results, and fine-tuning learning can be performed on the large-scale model to be trained. The training target includes maximizing the similarity between the inference results output from the model and the preferred inference paths, or minimizing the deviation between the inference results output from the model and the preferred inference paths. According to this embodiment, the trained large-scale model can achieve an optimal balance between inference power and inference cost, further improving the overall performance of generation efficiency and generation quality.
[0086] Another aspect of the present disclosure provides an information processing device based on a large-scale model. As shown in Figure 4, the information processing device 400 based on a large-scale model includes: an acquisition unit 410 configured to acquire user input; a determination unit 420 configured to determine a target operating mode from a plurality of pre-configured operating modes, each of which has a corresponding inference strategy and is configured with a mode control identifier used to trigger the inference strategy; and a text generation unit 430 configured to acquire target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode to the large-scale model.
[0087] The operation and effects of units 410 to 430 in apparatus 400 can be understood by referring to steps S201 to S203 in Figure 2, respectively, and a detailed explanation is omitted here.
[0088] In the proposed technology described herein, all processing of relevant user personal information, including collection, storage, use, processing, transmission, provision, and disclosure, complies with the provisions of relevant laws and regulations and does not violate public order and morals.
[0089] Embodiments of this disclosure further provide electronic devices, readable storage media, and computer program products.
[0090] As shown in Figure 5, a block diagram of an electronic device 500, which can be used as a server or client side of the Disclosure, is described here as an example of a hardware device applicable to various aspects of the Disclosure. The electronic device represents various forms of digital electronic computers, such as laptop computers, desktop computers, stages, personal digital assistive devices, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may further represent various forms of mobile devices, such as personal digital processing devices, mobile phones, intelligent phones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are illustrative and do not limit the implementation of the Disclosure described herein and / or claimed herein.
[0091] As shown in Figure 5, the electronic device 500 may include a computing unit 501 that can perform various appropriate operations and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data necessary for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0092] Multiple components of the electronic device 500, including an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509, are connected to an I / O interface 505. The input unit 506 may be any type of device capable of inputting information into the electronic device 500, and may receive input numeric or character information and generate key signal inputs related to user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackboard, trackball, lever, microphone, and / or remote control. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. The storage unit 508 may include, but is not limited to, a magnetic disk or an optical disk. The communication unit 509 enables the electronic device 500 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth® devices, 802.11 devices, WiFi devices, WiMAX devices, cellular communication devices, and / or similar devices.
[0093] The computing unit 501 may be a variety of general-purpose and / or dedicated processing components having processing and computing capabilities. The computing unit 501 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units for executing machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs each of the methods, processes, and / or operations described above. For example, in some embodiments, these methods, processes, and / or operations can be implemented as computer software programs tangibly contained in a machine-readable medium such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed into the electronic device 500 via ROM 502 and / or communication unit 509. Once the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the methods, processes, and / or operations described above can be performed. Alternatively, in another embodiment, the computing unit 501 may be configured to perform these methods, processes and / or operations in any other suitable manner (e.g., by firmware).
[0094] Various embodiments of the systems and technologies described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and which may transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0095] Program code for carrying out the methods of this disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the program code is executed by the processor or controller, it performs the functions / operations specified in the flowcharts and / or block diagrams. The program code may be executed entirely by machine, partially by machine, partially by machine and partially by remote machine as a standalone software package, or entirely by remote machine or server.
[0096] In the context of this disclosure, a machine-readable medium may be a tangible medium which may contain or store a program for use by or in combination with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may contain, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatus, or any suitable combination of the above contents. More specific examples of machine-readable storage media include one or more leaded electrical connections, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above contents.
[0097] To provide user interaction, a computer may implement the systems and techniques described herein, the computer having a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitoring monitor), and a keyboard and pointing device (e.g., a mouse or trackball), the user may provide input to the computer using the keyboard and pointing device. Other types of devices may further provide user interaction, for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form (including voice input, haptic input).
[0098] The systems and technologies described herein may be implemented in computing systems including backstage components (e.g., as data servers), computing systems including middleware components (e.g., application servers), computing systems including front-end components (e.g., user computers having a graphical user interface or web browser, through which users can interact with embodiments of those systems and technologies), or computing systems consisting of any combination of these backstage components, middleware components, or front-end components. The components of the system may be interconnected by digital data communication (e.g., communication networks) in any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), the internet, and blockchain networks.
[0099] A computer system may include a client and a server. The client and server are generally geographically distant from each other and typically interact via a communication network. The client-server relationship is created by running computer programs on the relevant computers that have a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.
[0100] It should be understood that the various forms of flows described above may be reordered, steps added, or deletions made. For example, each step described in this disclosure may be performed in parallel, sequentially, or in a different order, as long as the technical proposal disclosed herein achieves the desired result.
[0101] While embodiments or examples of this disclosure are described with reference to the drawings, it should be understood that the above-described methods, systems, and apparatus are merely illustrative embodiments or examples, and the scope of this disclosure is not limited by these embodiments or examples, but is limited only by the authorized claims and their uniform scope. Various elements of the embodiments or examples may be omitted or replaced by their equivalent elements. Furthermore, each step may be performed in an order different from the order described herein. In addition, various elements in the embodiments or examples may be combined in various ways. Importantly, as technology advances, many of the elements described herein can be replaced by equivalent elements appearing later in this disclosure.
Claims
1. A computer-based information processing method based on a large-scale model, Obtaining user input and The system determines the target operating mode from multiple pre-configured operating modes, each pre-configured operating mode has a corresponding inference strategy, and a mode control identifier is set to be used to trigger that inference strategy. A method for processing information based on a large-scale model, comprising: inputting the user input and the mode control identifier of the target operating mode into the large-scale model to obtain target output data generated by the large-scale model based on an inference strategy corresponding to the target operating mode.
2. The method according to claim 1, wherein each of the plurality of pre-configured operating modes is configured such that each mode control identifier includes a unified inference start identifier, and the large model is instructed to trigger the corresponding inference strategy by adding or omitting a successor identifier after the inference start identifier, the successor identifier including an inference end identifier and / or a logical partition identifier.
3. The plurality of pre-configured operating modes include a forced inference mode, and the mode control identifier corresponding to the forced inference mode includes the logical partition identifier appended after the inference start identifier, but does not include the inference end identifier. The method according to claim 2, in response to the large-scale model detecting a mode control identifier corresponding to the forced inference mode, the target output data sequentially includes the inference process text, the inference termination identifier, and the response data to the user input generated based on the inference process text.
4. The plurality of pre-set operating modes include a non-inference mode, and the mode control identifier corresponding to the non-inference mode includes the inference end identifier appended after the inference start identifier. The method of claim 2, wherein, in response to the large-scale model detecting a mode control identifier corresponding to the non-inference mode, the target output data includes response data to the user input generated after the large-scale model skips the inference process.
5. The plurality of pre-configured operating modes include a large-scale model autonomous inference mode, and the mode control identifier corresponding to the large-scale model autonomous inference mode is obtained by omitting the subsequent identifier after the inference start identifier. The method according to claim 2, in response to the large-scale model detecting a mode control identifier corresponding to the large-scale model autonomous inference mode, the large-scale model autonomously determines that it is necessary to perform an inference process based on the user input, and the target output data includes, in order, the logical partition identifier, the inference process text, the inference termination identifier, and the response data to the user input generated based on the inference process text.
6. The method according to claim 5, in response to the large-scale model detecting a mode control identifier corresponding to the large-scale model autonomous inference mode, the large-scale model autonomously determines that it does not need to perform an inference process based on the user input, and the target output data includes the inference termination identifier and response data to the user input generated after the large-scale model skipped the inference process.
7. The process further includes determining a target inference strength that represents the target length of the inference process text generated by the large-scale model, The method according to any one of claims 2 to 6, wherein, in response to the large-scale model determining that it needs to perform an inference process, the large-scale model generates an inference process text based on the inference intensity.
8. The large-scale model generates the target output data based on the user input, the mode control identifier of the target operating mode, and the tokens already generated using an autoregressive method, and by inputting the user input and the mode control identifier of the target operating mode into the large-scale model, the target output data generated by the large-scale model based on the inference strategy corresponding to the target operating mode can be obtained. In response to the length of the inference process text already generated by the current large-scale model exceeding the target length, the large-scale model is forced to input the inference termination identifier, The method according to claim 7, comprising obtaining response data for the user input generated by the large-scale model after the inference termination identifier.
9. The method according to claim 7, further comprising inputting the inference strength as system information into the large-scale model.
10. The aforementioned large-scale model, Inference sample data including a first sample input, the inference start identifier, the first inference process text, the inference end identifier, and the first sample response data, The method according to any one of claims 2 to 6, obtained by training using a second sample input, the inference start identifier, the inference end identifier, and non-inference sample data including the second sample response data.
11. The method according to claim 10, wherein the semantic complexity of the first sample input is greater than the semantic complexity of the second sample input.
12. The aforementioned large-scale model, For the same sample input, the large-scale model being trained is used to generate multiple inference paths, each containing corresponding inference process text and response data. Calculate the inference cost for each inference path, Determine at least one inference path that has accurate answer data, and rearrange the at least one inference path based on the inference cost. The method according to claim 10, wherein the model is obtained by performing training by guiding the training of the large-scale model to be trained by preferentially using inference paths with low inference costs based on the sorting results, thereby acquiring the large-scale model.
13. An information processing device based on a large-scale model, An acquisition unit configured to acquire user input, A decision unit configured to determine a target operating mode from a plurality of pre-configured operating modes, wherein each pre-configured operating mode has a corresponding inference strategy, and a mode control identifier used to trigger the inference strategy is set. A data processing device based on a large-scale model, including a text generation unit configured to acquire target output data generated by the large-scale model based on an inference strategy corresponding to the target operating mode by inputting the user input and the mode control identifier of the target operating mode to the large-scale model.
14. It is an electronic device, At least one processor, Includes memory that is communicated to at least one processor, An electronic device wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, thereby causing the at least one processor to perform the method according to any one of claims 1 to 6.
15. A non-temporary computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method according to any one of claims 1 to 6.
16. A computer program product comprising a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 6.