Prompt processing in a distributional generative artificial intelligence model
By decomposing input cues into sub-cues and processing them using a gating mechanism, generative AI models can generate complex image outputs more accurately, solving the accuracy problem of generative AI models when processing large input cues.
Patent Information
- Application Number
- CN202580030836.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-07
- Filing Date
- 2025-03-06
- Publication Date
- 2026-11-24
AI Technical Summary
Generative AI models struggle to accurately generate content that reflects the input prompts when dealing with large input prompts, especially when the prompts contain multiple objects and modifiers, leading to inaccurate output.
The input prompts are broken down into multiple sub-prompts, and based on the contextual information of the lexical units, they are processed independently using a gating mechanism. Accurate output is generated through a large language model and an image generator.
By breaking down input prompts into sub-prompts, generative AI models are able to more accurately generate content that reflects the input prompts, especially for complex and large image outputs.
Smart Images

Figure CN123165633A_ABST
Abstract
Description
Cross-references to related applications
[0001] This application claims priority to U.S. Patent Application No. 18 / 657,472, filed May 7, 2024, which is incorporated herein by reference. Technical Field
[0002] The aspects disclosed herein relate to generative artificial intelligence models. Background Technology
[0003] Generative AI models can be used in a variety of environments to generate responses to input prompts (also known as queries or inputs). For example, a generative AI model can be used in chatbot applications that use a large language model (LLM) to generate answers or at least responses to input prompts. Other examples of where generative AI models can be used include latent diffusion models, in which the model generates an image or image stream (e.g., video content) from an input text description of the content of a desired image or image stream; decision transformers, in which future actions are predicted based on a sequence of previous actions within a given environment; and so on. These models can be used, for example, in autonomous driving, image capture, and image display applications (e.g., extended reality, augmented reality, and / or virtual reality applications) to generate image outputs used within these applications. Summary of the Invention
[0004] Certain aspects of this disclosure provide a method for generating a response to a large input cue using a generative artificial intelligence model. The method typically includes receiving an input cue for processing using a generative artificial intelligence model; dividing the input cue into multiple sub-cues based on contextual information associated with words in the input cue; generating a response to the input cue using a generative artificial intelligence model based on the multiple sub-cues and the contextual information associated with words in the input cue; and outputting the generated response.
[0005] Other aspects include: processing systems configured to perform the foregoing methods and those methods described herein; a non-transitory computer-readable medium including instructions that, when executed by one or more processors of the processing system, cause the processing system to perform the foregoing methods and those methods described herein; a computer program product embodied on a computer-readable storage medium including code for performing the foregoing methods and those methods further described herein; and a processing system including components for performing the foregoing methods and those methods further described herein.
[0006] The following description and related figures illustrate certain exemplary features of one or more aspects. Attached Figure Description
[0007] The accompanying drawings depict only certain aspects of this disclosure and are therefore not intended to limit the scope of this disclosure.
[0008] Figure 1 An example of a generative artificial intelligence model according to various aspects of this disclosure is illustrated, which is configured to generate output in response to a large input cue using a gating mechanism that divides a large input cue into multiple sub-parts.
[0009] Figure 2 Example gating mechanisms for dividing large input prompts into one or more sub-prompts, according to various aspects of this disclosure, are illustrated.
[0010] Figure 3 Example operations for generating outputs using a generative artificial intelligence model in response to large input prompts, according to various aspects of this disclosure, are illustrated. The generative artificial intelligence model includes a gating mechanism that divides the input prompts into multiple sub-parts.
[0011] Figure 4 Example processing systems configured to perform various aspects of this disclosure are described.
[0012] For ease of understanding, the same reference numerals are used where possible to designate common elements shared by all figures. Elements and features conceived in one aspect can be beneficially incorporated into other aspects without further elaboration. Detailed Implementation
[0013] This disclosure provides apparatus, methods, processing systems, and computer-readable media for processing large input cues distributed in generative artificial intelligence models to accurately generate outputs that reflect the input cues.
[0014] Typically, generative AI models generate responses to prompts input into the model. For example, a generative AI model might generate images or other visual content depicting one or more objects specified in an input prompt provided to the model. While a generative AI model can generate visual content, it may not be able to accurately generate visual content that includes the content requested in the input prompt. For example, a generative AI model might lexicalize the input prompt into a predefined number of lexical units that it can use to generate the output requested by the prompt. While using a predefined number of lexical units to represent the query allows the generative AI model to generate output that accurately reflects the content requested in a small prompt (e.g., a prompt that does not include a large number of objects to be rendered or rendering conditions), using a predefined number of lexical units to represent the query may not yield an accurate output for a larger prompt. For example, such degradation may occur because the entire prompt is processed in each layer of the generative AI model and in the same way during each iteration of processing the prompt through the generative AI model.
[0015] Large input prompts may request generative AI models to generate images or other visual content, such as images containing various objects, and apply various transformations to the visual content. Typically, the objects in the generated image can be local concepts. For example, some objects may be located in the foreground of the image, while others may be located in the background. Objects may also have spatial relationships with each other that can be specified in the input prompt. In contrast, the modifiers specified in the input prompt can be local or global concepts. Some modifiers may apply to specific objects or specific parts of the image (e.g., foreground content, background content, etc.), while other modifiers may be global concepts applied to the entire generated image. Therefore, processing words in large input prompts in the same way, regardless of whether they are associated with local or global concepts or specific temporal relationships, can lead to inaccurate outputs generated by the generative output model relative to the input prompt.
[0016] Various aspects of this disclosure provide techniques and apparatus for accurately generating responses to large input prompts using generative artificial intelligence models. To this end, various aspects of this disclosure decompose the prompt into multiple sub-prompts that can be processed independently. These sub-prompts may include, for example, logically related lexical units (e.g., based on contextual information associated with these lexical units), allowing the generative artificial intelligence model to process these sub-prompts independently (e.g., using different layers of the generative artificial intelligence model, at different times, etc.). By doing so, various aspects of this disclosure allow the generative artificial intelligence model to accurately generate outputs that reflect what is specified in the input prompt, even as the size and complexity of the input prompt increase. Example of large input suggestion processing using a generative artificial intelligence model.
[0017] Figure 1 A generative artificial intelligence model 100 according to various aspects of this disclosure is illustrated, which uses a gating mechanism to generate a response to a large input cue by dividing it into multiple sub-parts. Typically, as discussed, a large input cue can be an input cue into the generative artificial intelligence model that specifies the output to be generated based on one or more applicable conditions and one or more objects to be included in the output. As illustrated, the generative artificial intelligence model includes a lexer 110, a large language model 130, a gating mechanism 140, and an image generator 150.
[0018] To generate an image from a large input cue (which is typically a text string specifying the content of the output generated by the generative AI model 100), a lexer 110 generates a set 120 of lexical units representing the large input cue. The set 120 may be a one-dimensional array comprising multiple lexical units derived from the large input cue. In some respects, the lexical units in the set 120 may represent words or portions of words in the large input cue. Within the one-dimensional array, the ordering of the lexical units may reflect the ordering of words in the large input cue, such that a correlation may exist between the lexical units in the set 120 and the words or portions of words in the input cue.
[0019] A set of lexical units can be provided as input to a large language model 130 and a gating mechanism 140. The large language model can be a prior-trained model and can be frozen. The gating mechanism can be a learnable machine learning model adapted to the data processed by the generative artificial intelligence model 100 to divide the large input cue into multiple sub-cues 1421, 1422, and 1433 (etc., collectively referred to as "sub-cues 142"). In some aspects, the gating mechanism 140 can be configured to generate sub-cues 142 based on temporal embeddings 132 or other temporal contextual information identifying a part of the ongoing image generation process in the generative artificial intelligence model 100. By doing so, the gating mechanism 140 can generate sub-cues 142 related to the generation of different objects in the image at each stage of the image generation process. Typically, these different stages can correspond to different layers of a model implemented by, for example, the image generator 150, and can correspond to different resolutions or receptive fields in the images generated by the image generator 150.
[0020] In some aspects, the large input cue representing the lexical set 120 may additionally or alternatively be generated by a gating mechanism based on the output of a large language model 130, which is trained to generate contextual information about the lexical units in the lexical set, which can be used as input by the gating mechanism. In some aspects, the large language model 130 may generate contextual information for each lexical unit in the lexical set.
[0021] Contextual information can be, for example, spatial contextual information identifying a region of the output to be generated by image generator 150, where objects represented by lexical units, temporal contextual information identifying temporal dependencies associated with different objects included in the output generated by image generator 150, etc., will reside. Spatial contextual information can, for example, indicate whether a lexical unit is associated with a local or global concept, and thus indicate a region of the potential image to be modified by image generator 150 (e.g., an image from a previous inference generated by generative artificial intelligence model 100). Typically, local concepts correspond to objects involved in processing within a portion of the image output generated by image generator 150 and can have varying degrees of granularity. For example, local concepts can be organized into foreground and background content. In another example, local concepts can be organized into different spatial regions that relate to other spatial regions in the image output generated by image generator 150. Global concepts correspond to objects or modifications involved in processing the image output as a whole. For example, global concepts can include styles to be applied by image generator 150 to the entire image output, simulations of photographic filters on the image output, etc.
[0022] The temporal context information identified by the large language model 130 may include information identifying the temporal stage in the inference process of the image generator 150 processing the lexical set 120. Typically, lexical units related to objects that do not have a spatial relationship with other objects specified in the input prompt may be associated with temporal context information indicating that these lexical units can be processed earlier than other lexical units in the inference process. Lexical units related to objects that have a spatial relationship with other objects specified in the input prompt may be associated with temporal context information indicating that the image generator 150 will generate objects before processing these lexical units. Finally, lexical units related to globally applicable changes to the image generated by the image generator 150 may be associated with temporal context information indicating that these lexical units will be processed at the end of the inference process.
[0023] Contextual information generated by the large language model 130 can be provided as input to a gating mechanism 140, which, as illustrated, decomposes the lexical set 120 representing an input prompt into multiple sub-prompts 142 comprising a subset of the lexical set 120. Typically, the gating mechanism 140 decomposes the lexical set 120 into multiple sub-prompts 142 based on contextual information from the large language model 130 regarding the lexical identifiers in the lexical set 120. In some aspects of the large language model 130 generating spatial contextual information, the gating mechanism 140 may generate sub-prompts 142 based on shared spatial information of the lexical units in the lexical set 120 representing the input prompt. For example, the gating mechanism 140 may generate sub-prompts 142 for lexical units associated with local concepts and those associated with global concepts. In another example, the gating mechanism 140 may generate sub-prompts 142 for lexical units associated with foreground content and those associated with background content. In some aspects of generating temporal context information in the large language model 130, the gating mechanism 140 can generate sub-cues 142 based on the stage in the inference process where different objects need to be generated or different modifications need to be applied to the image.
[0024] Sub-cue 142, along with Gaussian noise image 144 and temporal embedding 132, can be input into image generator 150 for generating image output of generative artificial intelligence model 100. Image generator 150 can be, for example, a generative artificial intelligence model comprising multiple layers, such as a text-to-image diffusion model (e.g., the U-Net model). Different layers in image generator 150 can be used to generate content in different spatial regions of the image, starting with Gaussian noise image 144 and progressively denoising the image to obtain an image that includes the object specified in the input cue and has the style specified in the input cue.
[0025] In some respects, sub-cues 142 can be routed to and processed by different layers in the image generator 150. Typically, processing of sub-cues 142 by different layers in the image generator 150 allows different portions of the image output generated by the image generator 150 to be processed according to a temporal embedding 132 that identifies the step in the inference process where the image is being processed (e.g., a diffusion step, where the image generator 150 denoises the potential image to generate an image that includes the objects and effects specified in the input cue) and the region to be influenced by processing the lexical terms included in the sub-cues 142.
[0026] Figure 2 An architecture of a gating mechanism 140 according to various aspects of this disclosure is illustrated, which, as discussed above, divides a large input prompt into one or more sub-prompts.
[0027] As illustrated, the gating mechanism 140 can be an attention-based neural network, which receives the representation as input and... Figure 1 The generative AI model 100 illustrated in the diagram generates a lexicalized version of the large input prompt, a lexical set 120, which generates a sub-prompt as a mask, a lexical set 222. As illustrated, this includes a first layer 210 (also referred to as a first projection layer) configured to project the lexical set 120 into query data and a second layer 212 (also referred to as a second projection layer) configured to project contextual information and / or the lexical set 120 associated with the inference process into key-value data. As discussed above, the contextual information may include spatial contextual information and / or temporal contextual information, the spatial contextual information identifying portions of the image generated by the generative AI model 100 affected by different lexical units in the lexical set 120 representing the large input prompt, and the temporal contextual information identifying the temporal relationship between the current inference phase performed by the generative AI model 100 or between different objects or influences specified in the large input prompt.
[0028] The query data generated by the first layer 210 and the key-value data generated by the second layer can be fed into the attention block 214 for processing. The attention block 214 typically uses the query data generated from the lexical set 120 and the key-value data generated from the context data 202 to determine which lexicals are relevant to a specific inference round or part of the image processed by the generative AI model 100. The output of the attention block 214 can be a probability value associated with each lexical in the lexical set 120, indicating the likelihood that those lexicals are relevant to a specific inference round or part of the image processed by the generative AI model 100. The probability value of each lexical can be processed by a nonlinear layer 216 (e.g., exemplified as a softmax layer, but other nonlinear functions may also be envisioned in the nonlinear layer 216; for example, the nonlinear layer 216 may alternatively be an sigmoid layer) to generate one or more masks 218 to be applied to the lexical set 120, thereby generating sub-cues for processing. Mask 218 can be combined with lexical set 120 (e.g., via multiplication block 220) to generate lexical set 222 of the mask. In some aspects, the sum of the values of the identifiers in mask 218 can be 1, where relevant lexical elements are associated with higher values and irrelevant lexical elements are associated with zero or near-zero values. By combining mask 218 with lexical set 120 using multiplication block 220, the resulting lexical set 222 of the mask can include multiple zero or near-zero values of lexical elements that are irrelevant to a particular sub-cue (e.g., a portion of an input cue processed during a given inference round in generative AI model 100) and non-zero values of lexical elements that are relevant to the particular sub-cue. In some respects, the nonlinear layer 216 may include a rounding function that converts probability values above a threshold level (which may be defined a priori) to a value of one and probability values below a threshold level to zero, such that the terminology 222 of the resulting mask generated by multiplying the terminology set 120 by the mask 218 includes zero-value terminology or terminology having the same value as the corresponding terminology in the terminology set 120. Example operation for handling large input prompts using a generative artificial intelligence model.
[0029] Figure 3 Example operation 300 for generating output to a large input cue using a generative artificial intelligence model according to various aspects of this disclosure is illustrated. This generative artificial intelligence model includes a gating mechanism that divides the input cue into multiple sub-parts. Operation 300 can be performed by a device on which a generative artificial intelligence model can be deployed, such as a smartphone, tablet, laptop, desktop, server, cloud computing instance hosted in a distributed computing environment, etc.
[0030] As illustrated, operation 300 can begin at box 310, where input prompts are received for processing using a generative artificial intelligence model.
[0031] At box 320, operation 300 continues, in which the input prompt is divided into multiple sub-prompts based on contextual information associated with the words in the input prompt.
[0032] In some aspects, contextual information includes breadth measures associated with lexical units in the input prompt. To segment the input, a language model can be used to associate the corresponding breadth measure with the corresponding lexical units from the input prompt. Lexical units in the input prompt can be segmented based on the corresponding breadth measure associated with the corresponding lexical units from the input prompt. In some aspects, the corresponding breadth measure includes an indication of whether the corresponding lexical unit corresponds to a global concept in the input prompt or one or more local concepts in the input prompt. Lexical units in the input prompt can be segmented into a set of lexical units corresponding to global concepts and a set of one or more lexical units corresponding to one or more local concepts in the input prompt.
[0033] In some respects, breadth metrics can correspond to the spatial context information discussed above. Local concepts can be, for example, concepts that modify a portion of an image less than the whole image by processing associated lexical units in a generative AI model. In contrast, global concepts can be concepts involving modifications to the entire image.
[0034] In some aspects, contextual information may include temporal embeddings associated with words in the input prompt. The input prompt can be divided into multiple sub-prompts by segmenting words in the input prompt into time-related word groups based on temporal embeddings.
[0035] In some respects, contextual information may include temporal embeddings associated with the output generation process. Typically, these temporal embeddings may correspond to steps in the currently executing output generation process.
[0036] At box 330, operation 300 continues, in which a generative artificial intelligence model is used to generate a response to the input prompt based on multiple sub-prompts and contextual information associated with the lexical units in the input prompt.
[0037] In some aspects, generative AI models include gating mechanisms configured to route multiple sub-prompts to different layers of the generative AI model based on contextual information associated with lexical units in the input prompt. The gating mechanism can be, for example, an attention layer or other attention-based neural network. A typical gating mechanism includes a first projection block that projects contextual information onto key and value data; a second projection block that projects lexical units from the input prompt onto query data; a multi-head attention block that generates an attention output based on the key, value, and query data; and a non-linear projection layer that generates an attention mask based on the attention output. This attention mask is combined with lexical units from the input prompt to generate a set of lexical units that form the mask, which serves as the output of the gating mechanism.
[0038] In some respects, generative artificial intelligence models include text-to-image diffusion models configured to generate image outputs from text inputs.
[0039] At box 340, operation 300 continues, where the generated response is output.
[0040] In some respects, the generated response may be an image depicting one or more objects specified by the input prompt. Example processing system for handling large input prompts using generative artificial intelligence models.
[0041] Figure 4 An example processing system 400 for processing large input prompts using a generative artificial intelligence model is described, such as the one described herein for example... Figures 1 to 3 As described.
[0042] Processing system 400 includes a central processing unit (CPU) 402, which in some examples may be a multi-core CPU. Instructions executed at CPU 402 may be loaded, for example, from program memory associated with CPU 402 or from a memory partition (e.g., memory 424).
[0043] The processing system 400 also includes additional processing components tailored for specific functions, such as a graphics processing unit (GPU) 404, a digital signal processor (DSP) 406, a neural processing unit (NPU) 408, and a connectivity component 412.
[0044] NPUs, such as the NPU 408, are typically configured to implement dedicated circuitry for the control and arithmetic logic used to execute machine learning algorithms, such as those for processing artificial neural networks (ANNs), deep neural networks (DNNs), random forests (RFs), etc. NPUs are sometimes alternatively referred to as neural signal processors (NSPs), tensor processing units (TPUs), neural network processors (NNPs), intelligent processing units (IPUs), vision processing units (VPUs), or graphics processing units.
[0045] NPUs (such as the NPU 408) are configured to accelerate the execution of common machine learning tasks, such as image classification, machine translation, object detection, and various other predictive models. In some examples, multiple NPUs may be instantiated on a single chip, such as a system-on-a-chip (SoC), while in other examples, such NPUs may be part of a dedicated neural network accelerator.
[0046] An NPU can be optimized for either training or inference, or in some cases configured to balance performance between the two. For an NPU capable of performing both training and inference, these two tasks can generally still be performed independently.
[0047] NPUs designed to accelerate training are typically configured to speed up the optimization of new models. This involves taking an existing dataset (usually labeled or sublabeled), iterating over the dataset, and subsequently tuning model parameters (such as weights and biases) to improve model performance—a highly computationally intensive operation. Generally, optimization based on incorrect predictions involves backtracking through the layers of the model and determining gradients to reduce prediction errors.
[0048] NPUs designed to accelerate inference are typically configured to operate on the full model. Therefore, such NPUs can be configured to take a new piece of data as input and process it rapidly through an already trained model to generate model output (e.g., inference).
[0049] In some implementations, the NPU 408 is part of one or more of the CPU 402, GPU 404, and / or DSP 406. These can be located in the user equipment (UE) of a wireless communication system or on another computing device.
[0050] In some examples, connectivity component 412 may include sub-components for, for example, third-generation (3G) connectivity, fourth-generation (4G) connectivity (e.g., Long Term Evolution (LTE)), fifth-generation (5G) connectivity (e.g., New Radio (NR)), Wi-Fi connectivity, Bluetooth connectivity, and other wireless data transmission standards. Connectivity component 412 may be further coupled to one or more antennas 414.
[0051] The processing system 400 may also include one or more sensor processing units 416 associated with the sensor in any way, one or more image signal processors (ISPs) 418 associated with the image sensor in any way, and / or a navigation processor 420, which may include satellite-based positioning system components (e.g., GPS or GLONASS) and inertial positioning system components.
[0052] The processing system 400 may also include one or more input and / or output devices 422, such as screens, touch-sensitive surfaces (including touch-sensitive displays), physical buttons, speakers, microphones, etc.
[0053] In some examples, one or more processors in the processing system 400 may be based on the ARM or RISC-V instruction set.
[0054] The processing system 400 also includes a memory 424, which represents one or more static and / or dynamic memories, such as dynamic random access memory, flash-based static memory, etc. In this example, the memory 424 includes computer-executable components that can be executed by one or more of the aforementioned processors of the processing system 400.
[0055] Specifically, in this example, memory 424 includes a prompt receiving component 424A, a prompt partitioning component 424B, a response generation component 424C, a response output component 424D, and a generative model 424E. The depicted components and other undepicted components can be configured to perform various aspects of the methods described herein.
[0056] Typically, the processing system 400 and / or its components can be configured to perform the methods described herein. Example Terms
[0057] Specific implementation details of various aspects of this disclosure are described in the following numbered clauses.
[0058] Clause 1: A processor implementation method for machine learning, the method comprising: receiving an input prompt for processing using a generative artificial intelligence model; dividing the input prompt into a plurality of sub-prompts based on contextual information associated with lexical units in the input prompt; generating a response to the input prompt using the generative artificial intelligence model based on the plurality of sub-prompts and the contextual information associated with the lexical units in the input prompt; and outputting the generated response.
[0059] Clause 2: The method according to Clause 1, wherein: the context information includes a breadth metric associated with the word in the input prompt; and dividing the input prompt into the plurality of sub-prompts includes: associating the corresponding breadth metric with the corresponding word from the word in the input prompt using a language model; and dividing the word in the input prompt based on the corresponding breadth metric associated with the corresponding word from the word in the input prompt.
[0060] Clause 3: The method according to Clause 2, wherein the corresponding breadth metric includes an indication of whether the corresponding lexical corresponds to a global concept in the input prompt or one or more local concepts in the input prompt.
[0061] Clause 4: According to the method described in Clause 3, the segmentation of the lexical units in the input prompt includes segmenting the lexical units into a set of lexical units corresponding to the global concept and one or more sets of lexical units corresponding to the one or more local concepts in the input prompt.
[0062] Clause 5: The method according to any one of Clauses 1 to 4, wherein: the context information includes a time embedding associated with the word in the input prompt; and dividing the input prompt into the plurality of sub-prompts includes dividing the word in the input prompt into time-related word groups based on the time embedding.
[0063] Clause 6: The method according to any one of Clauses 1 to 5, wherein the generative artificial intelligence model includes a gating mechanism configured to route the plurality of sub-cues to different layers of the generative artificial intelligence model based on the contextual information associated with the lexical in the input prompt.
[0064] Clause 7: The method according to Clause 6, wherein the gating mechanism includes an attention layer in the generative artificial intelligence model, the attention layer comprising: a first projection block that projects the context information onto key and value data; a second projection block that projects the lexical in the input prompt onto query data; a multi-head attention block that generates an attention output based on the key data, the value data, and the query data; and a non-linear layer that generates an attention mask based on the attention output, the attention mask being combined with the lexical in the input prompt to generate a lexical set of the mask as the output of the gating mechanism.
[0065] Clause 8: The method according to any one of Clauses 1 to 7, wherein the generated response includes an image depicting one or more objects specified by the input prompt.
[0066] Clause 9: The method according to any one of Clauses 1 to 8, wherein the generative artificial intelligence model includes a text-to-image diffusion model configured to generate image output from text input.
[0067] Clause 10: A processing system comprising: at least one memory storing executable instructions; and one or more processors coupled to the at least one memory and configured to execute the executable instructions to cause the processing system to perform any one of Clauses 1 to 9.
[0068] Clause 11: A processing system comprising: components for performing operations according to any one of Clauses 1 to 9.
[0069] Clause 12: A non-transitory computer-readable medium having executable instructions stored thereon, which, when executed by one or more processors, perform the operations pursuant to any one of Clauses 1 to 9. Additional Notes
[0070] The foregoing description is provided to enable any person skilled in the art to practice the various aspects described herein. The examples discussed herein do not limit the scope, applicability, or aspects set forth in the claims. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. For example, the function and arrangement of the elements discussed may be changed without departing from the scope of this disclosure. Various processes or components may be omitted, substituted, or added as appropriate in various examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in some other examples. For example, any number of aspects set forth herein may be used to implement an apparatus or practice. Moreover, the scope of this disclosure is intended to cover such apparatuses or methods practiced using other structures, functionalities, or structures and functionalities that complement or replace the various aspects of this disclosure set forth herein. It should be understood that any aspect of the disclosure herein may be embodied by one or more elements of the claims.
[0071] As used herein, the term “exemplary” means “serving as an example, instance, or illustration.” Any aspect described as “exemplary” in this document is not necessarily to be construed as preferred or superior to other aspects.
[0072] As used in this article, the phrase “at least one of” in a list of items refers to any combination of those items, including a single member. For example, “at least one of a, b, or c” is intended to cover a, b, c, ab, ac, bc, and abc, as well as any combination with multiple identical elements (e.g., aa, aaa, aab, aac, abb, acc, bb, bbb, bbc, cc, and ccc, or any other ordering of a, b, and c).
[0073] As used herein, the term "determine" encompasses a wide variety of actions. For example, "determine" can include calculation, computation, processing, derivation, research, searching (e.g., looking in a table, database, or other data structure), ascertainment, and similar actions. Furthermore, "determine" can include receiving (e.g., receiving information), accessing (e.g., accessing data in memory), etc. Additionally, "determine" can include parsing, selecting, picking, building, etc.
[0074] The methods disclosed herein include one or more steps or actions for implementing the methods. The steps and / or actions of the methods may be interchanged without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of a particular step and / or action may be modified without departing from the scope of the claims. Furthermore, the various operations of the methods described above may be performed by any suitable component capable of performing the corresponding function. This component may include various hardware and / or software components and / or modules, including but not limited to circuits, application-specific integrated circuits (ASICs), or processors. Generally, where the operations illustrated in the figures are present, those operations may have corresponding components with similar numbering plus functional components.
[0075] The following claims are not intended to be limited to the aspects shown herein, but should be given the full scope consistent with the language of the claims. Within the claims, unless specifically stated otherwise, reference to the singular form of an element is not intended to mean “one and only one,” but rather “one or more.” Unless specifically stated otherwise, the term “some” means one or more. No element of any claim should be interpreted in accordance with 35 USC § 112(f) unless the element is expressly referred to by the phrase “for a component of,” or, in the case of a method claim, by the phrase “for a step of.” All structural and functional equivalents of the elements throughout the various aspects described herein that are known to a person of ordinary skill in the art, or will be known later, are expressly incorporated herein by reference and are intended to be covered by the claims. Furthermore, nothing disclosed herein is intended to be offered to the public, whether or not such disclosure is explicitly stated in the claims.
Claims
1. A processing system, the processing system comprising: At least one memory, wherein executable instructions are stored in the at least one memory; and One or more processors, coupled to the at least one memory and configured to execute the executable instructions to enable the processing system to: Receive input prompts for processing using a generative artificial intelligence model; The input prompt is divided into multiple sub-prompts based on contextual information associated with the words in the input prompt; The generative artificial intelligence model is used to generate a response to the input prompt based on the plurality of sub-prompts and the contextual information associated with the lexical units in the input prompt; as well as Output the generated response.
2. The processing system according to claim 1, wherein: The contextual information includes a breadth metric associated with the lexical term in the input prompt; and In order to divide the input prompt into the multiple sub-prompts, the one or more processors are configured to cause the processing system to: The language model is used to associate the corresponding breadth metric with the corresponding lexical from the input prompt; and The lexical elements in the input prompt are segmented based on a corresponding breadth metric associated with the corresponding lexical elements from the input prompt.
3. The processing system of claim 2, wherein the corresponding breadth metric includes an indication of whether the corresponding lexical corresponds to a global concept in the input prompt or one or more local concepts in the input prompt.
4. The processing system of claim 3, wherein, in order to segment the lexical units in the input prompt, the one or more processors are configured to cause the processing system to segment the lexical units into a set of lexical units corresponding to the global concept and one or more sets of lexical units corresponding to the one or more local concepts in the input prompt.
5. The processing system according to claim 1, wherein: The context information includes temporal embeddings associated with the lexical units in the input prompt; and In order to divide the input prompt into the plurality of sub-prompts, the one or more processors are configured to cause the processing system to divide the lexical units in the input prompt into time-related lexical units based on the time embedding.
6. The processing system of claim 1, wherein the generative artificial intelligence model includes a gating mechanism configured to route the plurality of sub-prompts to different layers of the generative artificial intelligence model based on contextual information associated with the lexical units in the input prompt.
7. The processing system according to claim 6, wherein the gating mechanism includes an attention layer in the generative artificial intelligence model, the attention layer comprising: A first projection block projects the context information onto the key data and value data; The second projection block projects the lexical elements in the input prompt onto the query data; A multi-head attention block that generates attention output based on the key data, the value data, and the query data; and A nonlinear layer generates an attention mask based on the attention output, and the attention mask is combined with the lexical units in the input prompt to generate a set of lexical units for the mask as the output of the gating mechanism.
8. The processing system of claim 1, wherein the generated response includes an image depicting one or more objects specified by the input prompt.
9. The processing system of claim 1, wherein the generative artificial intelligence model includes a text-to-image diffusion model configured to generate image outputs from text inputs.
10. A processor-implemented method for machine learning, the method comprising: Receive input prompts for processing using a generative artificial intelligence model; The input prompt is divided into multiple sub-prompts based on contextual information associated with the words in the input prompt; The generative artificial intelligence model is used to generate a response to the input prompt based on the plurality of sub-prompts and the contextual information associated with the lexical units in the input prompt; as well as Output the generated response.
11. The method of claim 10, wherein: The contextual information includes a breadth metric associated with the lexical term in the input prompt; and Dividing the input prompt into multiple sub-prompts includes: The language model is used to associate the corresponding breadth metric with the corresponding lexical from the input prompt; as well as The lexical elements in the input prompt are segmented based on a corresponding breadth metric associated with the corresponding lexical elements from the input prompt.
12. The method of claim 11, wherein the corresponding breadth metric includes an indication of whether the corresponding lexical corresponds to a global concept in the input prompt or one or more local concepts in the input prompt.
13. The method of claim 12, wherein dividing the lexical units in the input prompt comprises dividing the lexical units into a set of lexical units corresponding to the global concept and one or more sets of lexical units corresponding to the one or more local concepts in the input prompt.
14. The method of claim 10, wherein: The context information includes temporal embeddings associated with the lexical units in the input prompt; and Dividing the input prompt into multiple sub-prompts includes dividing the lexical units in the input prompt into time-related lexical units based on the time embedding.
15. The method of claim 10, wherein the generative artificial intelligence model includes a gating mechanism configured to route the plurality of sub-prompts to different layers of the generative artificial intelligence model based on contextual information associated with the lexical units in the input prompt.
16. The method of claim 15, wherein the gating mechanism includes an attention layer in the generative artificial intelligence model, the attention layer comprising: A first projection block projects the context information onto the key data and value data; The second projection block projects the lexical elements in the input prompt onto the query data; A multi-head attention block that generates attention output based on the key data, the value data, and the query data; and A nonlinear layer generates an attention mask based on the attention output, and the attention mask is combined with the lexical units in the input prompt to generate a set of lexical units for the mask as the output of the gating mechanism.
17. The method of claim 10, wherein the generated response comprises an image depicting one or more objects specified by the input prompt.
18. The method of claim 10, wherein the generative artificial intelligence model includes a text-to-image diffusion model configured to generate image outputs from text inputs.
19. A processing system, the processing system comprising: A component for receiving input prompts for processing using a generative artificial intelligence model; A component for dividing the input prompt into multiple sub-prompts based on contextual information associated with the lexical units in the input prompt; A component for generating a response to the input prompt using the generative artificial intelligence model based on the plurality of sub-prompts and the contextual information associated with the lexical units in the input prompt; and The component used to output the generated response.
