Enabling inference-time compute with token counting and dynamic budget-forcing
The dynamic budget-forcing approach with two-stage training optimizes RMs to adhere to computational limits, enhancing their performance and efficiency in resource-constrained environments.
Patent Information
- Application Number
- PCT/US2026/022917
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-12-15
- Filing Date
- 2026-04-08
- Publication Date
- 2026-11-26
AI Technical Summary
Reasoning models (RMs) operating in resource-constrained environments face challenges in adhering to computational budget constraints, leading to degraded performance, and conventional methods either abruptly interrupt or exceed the budget, limiting their reasoning capabilities.
A dynamic budget-forcing approach with a two-stage training process that includes supervised fine-tuning to count tokens and reinforcement learning to adjust reasoning behavior, ensuring compliance with computational limits while optimizing efficiency and performance.
Enables RMs to effectively function within resource constraints by dynamically managing computational resources, balancing efficiency and performance without sacrificing accuracy.
Smart Images

Figure US2026022917_26112026_PF_FP_ABST
Abstract
Description
Qualcomm Ref. No. 2505078WO 1ENABLING INFERENCE-TIME COMPUTE WITH TOKEN COUNTING AND DYNAMIC BUDGET-FORCINGCROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present application claims priority to U.S. Patent Application No.19 / 420,499, filed on December 15, 2025, and titled, “ENABLING INFERENCE-TIME COMPUTE WITH TOKEN COUNTING AND DYNAMIC BUDGET-FORCING,” which claims the benefit of U.S. Provisional Patent Application No. 63 / 811,341, filed on May 23, 2025, and titled “ENABLING INFERENCE-TIME COMPUTE WITH TOKEN COUNTING AND DYNAMIC BUDGET-FORCING,” the disclosures of which are expressly incorporated by reference in their entireties.FIELD OF THE DISCLOSURE
[0002] Aspects of the present disclosure generally relate to artificial neural network memory management, and more specifically to enabling inference-time compute with token counting and dynamic budget-forcing.BACKGROUND
[0003] Artificial neural networks may comprise interconnected groups of artificial neurons (e.g., neuron models). The artificial neural network (ANN) may be a computational device or be represented as a method to be performed by a computational device. Various ANN model structures are available for consideration. Convolutional neural networks (CNNs) are a type of feed-forward ANN. Convolutional neural networks may include collections of neurons that each have a receptive field and that collectively tile an input space.
[0004] A transformer ANN structure makes use of attention mechanisms that may enable the model to process input sequences in a parallel and efficient manner. An attention mechanism allows the model to focus on different parts of the input sequence at different times. A transformer ANN structure may be of particular use for tasks that involve sequence modeling, such as text generation by a large language model (LLM).Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 2
[0005] Reasoning models (RMs) have garnered a lot of attention and have significantly grown in popularity. RMs are large language models trained to perform complex reasoning tasks. In resource-constrained environments, stringent constraints may be imposed on the computational resources utilized by RMs to perform specific tasks. RMs that are unaware of such limitations may experience degraded performance. While the use of small language models (SLMs) may mitigate some efficiency issues, SLMs can still easily exceed computational budget constraints imposed by the systems in which they operate. Thus, operating reasoning models on edge devices, such as smartphones or wearables, is challenging.SUMMARY
[0006] Various aspects of the present disclosure are directed to an apparatus. The apparatus has at least one memory and one or more processors coupled to the at least one memory. The processor(s) is configured to receive, by a reasoning model, an input prompt and a budget prompt. The processor(s) is also configured to determine, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt. The processor(s) is additionally configured to generate, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens. The processor(s) is further configured to determine, by the reasoning model, the final response based on the input prompt and the set of tokens. The reasoning model is forced to generate the final response before exceeding the number of remaining tokens.
[0007] In some aspects of the present disclosure, a processor-implemented method includes receiving, by a reasoning model, an input prompt and a budget prompt. The processor-implemented method also includes determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt. The processor-implemented method additionally includes generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens. The processor-implemented method further includes determining, by the reasoning model, the final response based on the input prompt and the set of tokens. The reasoning modelSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 3is forced to generate the final response before exceeding the number of remaining tokens.
[0008] Various aspects of the present disclosure are directed to an apparatus. The apparatus includes means for receiving, by a reasoning model, an input prompt and a budget prompt. The apparatus also includes means for determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt. The apparatus additionally includes means for generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens. The apparatus further includes means for determining, by the reasoning model, the final response based on the input prompt and the set of tokens. The reasoning model is forced to generate the final response before exceeding the number of remaining tokens.
[0009] Additional features and advantages of the disclosure will be described below. It should be appreciated by those skilled in the art that this disclosure may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present disclosure. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the teachings of the disclosure as set forth in the appended claims. The novel features, which are believed to be characteristic of the disclosure, both as to its organization and method of operation, together with further objects and advantages, will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present disclosure.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The features, nature, and advantages of the present disclosure will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 4
[0011] FIGURE 1 illustrates an example implementation of a neural network using a system-on-a-chip (SOC), including a general-purpose processor in accordance with certain aspects of the present disclosure.
[0012] FIGURE 2 is an illustrative block diagram of an example machine learning (ML) model represented by an artificial neural network (ANN), in accordance with aspects of the present disclosure.
[0013] FIGURE 3 is a block diagram illustrating an exemplary software architecture that may modularize artificial intelligence (Al) functions, in accordance with aspects of the present disclosure.
[0014] FIGURE 4A is block diagram illustrating an example base architecture of a reasoning model (RM) with adaptive budget-forcing, in accordance with various aspects of the present disclosure.
[0015] FIGURE 4B is a block diagram illustrating an architecture for training an RM for adaptive budget- forcing, in accordance with various aspects of the present disclosure.
[0016] FIGURE 5 is a graph illustrating an example reward design, in accordance with various aspects of the present disclosure.
[0017] FIGURE 6 is a flow diagram illustrating a processor-implemented method for adaptive budget-forcing for reasoning models, in accordance with various aspects of the present disclosure.DETAILED DESCRIPTION
[0018] The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of the various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 5
[0019] Based on the teachings, one skilled in the art should appreciate that the scope of the disclosure is intended to cover any aspect of the disclosure, whether implemented independently of or combined with any other aspect of the disclosure. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth. In addition, the scope of the disclosure is intended to cover such an apparatus or method practiced using other structure, functionality, or structure and functionality in addition to or other than the various aspects of the disclosure set forth. It should be understood that any aspect of the disclosure disclosed may be embodied by one or more elements of a claim.
[0020] The word “exemplary” is used to mean “serving as an example, instance, or illustration.” Any aspect described as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
[0021] Although particular aspects are described, many variations and permutations of these aspects fall within the scope of the disclosure. Although some benefits and advantages of the preferred aspects are mentioned, the scope of the disclosure is not intended to be limited to particular benefits, uses or objectives. Rather, aspects of the disclosure are intended to be broadly applicable to different technologies, system configurations, networks, and protocols, some of which are illustrated by way of example in the figures and in the following description of the preferred aspects. The detailed description and drawings are merely illustrative of the disclosure rather than limiting, the scope of the disclosure being defined by the appended claims and equivalents thereof.
[0022] Reasoning models (RMs) have garnered a lot of attention and have significantly grown in popularity. RMs are large language models trained to perform complex reasoning tasks. RMs introduce reasoning tokens in addition to input tokens and output tokens. The RMs use the reasoning tokens to “think,” producing a long chain of thought by breaking down the prompt and considering multiple approaches to generate a response. In resource-constrained environments, stringent constraints may be imposed on the computational resources utilized by RMs to perform specific tasks. RM that are unaware of such limitations may experience degraded performance. While the use of small language models (SLMs) may mitigate some efficiency issues, SLMs canSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 6still easily exceed computational budget constraints imposed by the systems in which they operate.
[0023] Conventional approaches for controlling the computational budget primarily address the problem by manually enforcing the RM to adhere to the given budget or by training RMs to generate the shortest possible reasoning traces. However, the conventional approaches may limit the reasoning capabilities of RMs. Manually imposing the computational budget may risk either abruptly interrupting the reasoning process at a critical point or may compel the RM to utilize more budget than is needed, which may also degrade performance.
[0024] Accordingly, aspects of the present disclosure are directed to a dynamic budget-forcing approach that enables models to understand and adhere to computational budget constraints while dynamically adjusting reasoning behavior. In various aspects, the RM may optimize a balance between computational efficiency and reasoning performance, ensuring that the RM can function effectively within predefined resource limits. A two-stage training process may be conducted to initially instruct the RM to count tokens, and subsequently, to bias the RM towards adhering to the computational budget constraints.
[0025] Particular aspects of the subject matter described in this disclosure can be implemented to realize one or more of the following potential advantages. In some examples, the described inference-time compute with token counting and dynamic budget-forcing may be performed without sacrificing performance. For example, described techniques (e.g., determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt and generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens) may optimize the balance between computational efficiency and reasoning performance.
[0026] FIGURE 1 illustrates an example implementation of a system-on-a-chip (SOC) 100, which may include a central processing unit (CPU) 102 or a multi-core CPU, as well as a graphics processing unit (GPU) 104, and / or a neural processing unit (NPU) 108 configured for inference-time compute with token counting and dynamic budget-forcing. Variables (e.g., neural signals and synaptic weights), system parameters Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 7associated with a computational device (e.g., neural network with weights), delays, frequency bin information, and task information may be stored in a memory block associated with the NPU 108, in a memory block associated with the CPU 102, in a memory block associated with the GPU 104, in a memory block associated with a digital signal processor (DSP) 106, in a memory block 118, or may be distributed across multiple blocks. Instructions executed at the CPU 102 may be loaded from a program memory associated with the CPU 102 or may be loaded from a memory block 118.
[0027] The SOC 100 may also include additional processing blocks tailored to specific functions, such as a GPU 104, a DSP 106, a connectivity block 110, which may include fifth generation (5G) connectivity, fourth generation long term evolution (4G LTE) connectivity, Wi-Fi connectivity, USB connectivity, Bluetooth connectivity, and the like, and a multimedia processor 112 that may, for example, detect and recognize gestures. In one implementation, the NPU 108 is implemented in the CPU 102, DSP 106, and / or GPU 104. The SOC 100 may also include a sensor processor 114, image signal processors (ISPs) 116, and / or navigation module 120, which may include a global positioning system.
[0028] The SOC 100 may be based on an ARM, RISC-V (RISC-five), or any reduced instruction set computing (RISC) architecture. In aspects of the present disclosure, the instructions loaded into the general-purpose processor 102 may include code to receive, by a reasoning model, an input prompt and a budget prompt. The instructions loaded into the general-purpose processor 102 may also include code to determine, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt. The instructions loaded into the general-purpose processor 102 may also include code to generate, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens. The instructions loaded into the general-purpose processor 102 may also include code to determine, by the reasoning model, the final response based on the input prompt and the set of tokens. The reasoning model is forced to generate the final response before exceeding the number of remaining tokens.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 8
[0029] Neural networks may be designed with a variety of connectivity patterns. In feed-forward networks, information is passed from lower to higher layers, with each neuron in a given layer communicating to neurons in higher layers. A hierarchical representation may be built up in successive layers of a feed- forward network, as described above. Neural networks may also have recurrent or feedback (also called top-down) connections. In a recurrent connection, the output from a neuron in a given layer may be communicated to another neuron in the same layer. A recurrent architecture may be helpful in recognizing patterns that span more than one of the input data chunks that are delivered to the neural network in a sequence. A connection from a neuron in a given layer to a neuron in a lower layer is called a feedback (or top-down) connection. A network with many feedback connections may be helpful when the recognition of a high-level concept may aid in discriminating the particular low-level features of an input.
[0030] FIGURE 2 is an illustrative block diagram of an example machine learning (ML) model represented by an artificial neural network (ANN) 200. The ANN 200 may receive input data 206 which may include one or more bits of data 202, pre-processed data output from pre-processor 204 (optional), or some combination thereof. Here, data 202 may include training data, verification data, application-related data, or the like, based, for example, on the stage of deployment of the ANN 200. A pre-processor 204 may be included within the ANN 200 in some other implementations. The preprocessor 204 may, for example, process all or a portion of the data 202, which may result in some of the data 202 being changed, replaced, deleted, etc. In some implementations, the pre-processor 204 may add additional data to the data 202.
[0031] The ANN 200 includes at least one first layer 208 of artificial neurons 210 to process input data 206 and provide resulting first layer data via connections or “edges” such as the edges 212 to at least a portion of at least one second layer 214. The second layer 214 processes data received via the edges 212 and provides second layer output data via the edges 216 to at least a portion of at least one third layer 218. The third layer 218 processes data received via the edges 216 and provides third layer output data via the edges 220 to at least a portion of a final layer 222 including one or more neurons to provide output data 224. All or part of the output data 224 may be further processed in some manner by an optional post-processor 226. Thus, in certain examples, the ANN Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 9200 may provide output data 228 that is based on output data 224, post-processed data output from the post-processor 226, or some combination thereof.
[0032] The post-processor 226 may be included within the ANN 200 in some other implementations. The post-processor 226 may, for example, process all or a portion of the output data 224 which may result in the output data 228 being different, at least in part, to the output data 224, as result of data being changed, replaced, deleted, etc. In some implementations, the post-processor 226 may be configured to add additional data to the output data 224. In this example, the second layer 214 and third layer 218 represent intermediate or hidden layers arranged in a hierarchical or other like structure. Although not explicitly shown, there may be one or more further intermediate layers between the second layer 214 and the third layer 218.
[0033] The structure and training of artificial neurons 210 in the various layers may be tailored to specific requirements of an application. Within a given layer such as the first layer 208, second layer 214, or third layer 218 of the ANN 200, some or all of the neurons may be configured to process information provided to the layer and output corresponding transformed information from the layer. For example, transformed information from a layer may represent a weighted sum of the input information associated with or otherwise based on a non-linear activation function or other activation function used to “activate” artificial neurons of a next layer. Artificial neurons in such a layer may be activated by or be responsive to parameters such as the previously described weights and biases of the ANN 200. The weights and biases of the ANN 200 may be adjusted during a training process or during operation of the ANN 200. The weights of the various artificial neurons may control a strength of connections between layers or artificial neurons, while the biases may control a direction of connections between the layers or artificial neurons. An activation function may select or determine whether an artificial neuron transmits its output to the next layer or not in response to its received data.
[0034] Different activation functions may model different types of non-linear relationships. By introducing non-linearity into an ML model, an activation function allows the configuration for the ML model to change in response to identifying or detecting complex patterns and relationships in the input data 206. Some non-Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 10exhaustive example activation functions include a sigmoid based activation function, a hyperbolic tangent (tanh) based activation function, a convolutional activation function, up-sampling, pooling, and a rectified linear unit (ReLU) based activation function.
[0035] Training of an ML model, such as the ANN 200, may be conducted using training data. Training data may include one or more datasets the ANN 200 may use to identify patterns or relationships. Training data may represent various types of information, including written, visual, audio, environmental context, operational properties, etc. During training, the parameters (such as the weights and biases) of artificial neurons 210 may be changed, such as to minimize or otherwise reduce a loss function or a cost function. A training process may repeat multiple times to fine-tune the ANN 200 with each iteration.
[0036] Various ANN model structures are available for consideration. For example, in a feed-forward ANN structure, each artificial neuron 210 in layer 214 receives information from the previous layer (such as, one or more artificial neurons 210 in layer 208) and produces information for the next layer (such as, one or more artificial neurons 210 in layer 218). In a convolutional ANN structure, some layers may be organized into filters that extract features from data, such as the training data or the input data. In a recurrent ANN structure, some layers may have connections that allow for processing of data across time, such as for processing information having a temporal structure, such as time series data forecasting.
[0037] A transformer ANN structure makes use of attention mechanisms that may enable the model to process input sequences in a parallel and efficient manner. An attention mechanism allows the model to focus on different parts of the input sequence at different times. Attention mechanisms may be implemented using a series of layers known as attention layers to compute weighted sums of input features based on a similarity between different elements of the input sequence. A transformer ANN structure may include a series of feed- forward ANN layers whose configurations may change in response to identifying non-linear relationships between the input and output sequences, which may also be referred to as a process of “learning” by the ANN layers. The output of a transformer ANN structure may be obtained by applying a linear transformation to the output of a final attention layer. A transformer ANN structureSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 11may be of particular use for tasks that involve sequence modeling, or other like processing, such as text generation. A large language model may be a particularly useful implementation of a transformer ANN structure.
[0038] FIGURE 3 is a block diagram illustrating an exemplary software architecture 300 that may modularize artificial intelligence (Al) functions. Using the architecture 300, applications may be designed that may cause various processing blocks of an SOC 320 (for example a CPU 322, a DSP 324, a GPU 326, and / or an NPU 328) (which may be similar to SOC 100 of FIGURE 1) to support inference-time compute with token counting and dynamic budget-forcing for an Al application 302, according to aspects of the present disclosure. The architecture 300 may, for example, be included in a computational device, such as a smartphone.
[0039] The Al application 302 may be configured to call functions defined in a user space 304 that may, for example, provide for text, video, and / or sound generation. The Al application 302 may make a request to compiled program code associated with a library defined in an Al function application programming interface (API) 306. This request may ultimately rely on the output of a deep neural network configured to provide an inference response based on input, for example.
[0040] The run-time engine 308, which may be compiled code of a runtime framework, may be further accessible to the Al application 302. The Al application 302 may cause the run-time engine 308, for example, to request an inference at a particular time interval or triggered by an event detected by the user interface of the Al application 302. When caused to provide an inference response, the run-time engine 308 may in turn send a signal to an operating system in an operating system (OS) space 310, such as a Kernel 312, running on the SOC 320. In some examples, the Kernel 312 may be a LINUX Kernel. The operating system, in turn, may cause non-contiguous attention masks to be processed on the CPU 322, the DSP 324, the GPU 326, the NPU 328, or some combination thereof. The CPU 322 may be accessed directly by the operating system, and other processing blocks may be accessed through a driver, such as a driver 314, 316, or 318 for, respectively, the DSP 324, the GPU 326, or the NPU 328. In the exemplary example, the deep neural network may be configured to run on aSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 12combination of processing blocks, such as the CPU 322, the DSP 324, and the GPU 326, or may be run on the NPU 328.
[0041] As described, aspects of the present disclosure are directed to a dynamic budget-forcing approach that enables models to understand and adhere to computational budget constraints while dynamically adjusting reasoning behavior. In various aspects, a reasoning model (RM) may optimize a balance between computational efficiency and reasoning performance, ensuring that the RM can function effectively within predefined resource limits. A two-stage training process may initially instruct the RM to count tokens, and subsequently, bias the RM towards adhering to the computational budget constraints. Inference-time compute techniques may enable a model to dynamically increase computational usage during inference to improve its performance (e.g., accuracy) on complex reasoning problems by allocating more compute resources.
[0042] In order for a model to comply with computational budget constraints in a dynamic fashion, one important task is to estimate how much compute is still available. Such a task may be associated with the ability of a model to count tokens. Accordingly, at training time, an auxiliary task may be added to train the RM to count tokens. The auxiliary task may also train the model to predict the remaining computational budget.
[0043] FIGURE 4A is block diagram illustrating an example base architecture 400 of an RM with adaptive budget-forcing, in accordance with various aspects of the present disclosure. Referring to FIGURE 4A, the example architecture 400 may include an RM 402 and a linear head 404. The example architecture 400 may receive a prompt 406. The prompt 406 may comprise a sequence of characters or textual data (e.g., a sentence) or audio data, for instance. The prompt 406 may be a question or describe a reasoning task or operation, for example. The prompt 406 may be divided into portions or tokens (e.g., words) processed, for instance by a linear layer to generate an embedding 408, which may be provided to the RM 402. The RM 402 may process the embedding 408 to generate additional tokens that may be considered by the RM 402 before determining the text corresponding to the final answer. The additional tokens may be considered as a reasoning trace (may also be referred to as a “chain of thoughts”). The additional tokens may be provided to the linear head 404, which produces the output (e.g., next token) in response to the given prompt (e.g., 406).Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 13
[0044] FIGURE 4B is a block diagram illustrating an architecture 450 for training an RM 402 for adaptive budget-forcing, in accordance with various aspects of the present disclosure. Referring to FIGURE 4B, the RM 402 may be augmented with an auxiliary head 452. The auxiliary head 452 may bias the RM 402 such that the model may leam to count (e.g., count tokens). In some aspects, the auxiliary head 452 may comprise an adapter such as a low-rank adapter (LoRA), for instance.
[0045] A two-stage training process may train the RM 402 for adaptive budgetforcing. Initially, the RM 402 may be trained to count tokens using a supervised fine-tuning (SFT) process. The SFT process may bias the RM 402 towards adhering to the computational budget constraints. The RM 402 may be trained to estimate (e.g., count) the remaining budget by counting backwards the remaining tokens left to produce a reasoning trace before generating a final answer to the prompt (e.g., 406).
[0046] The RM 402 may receive an initial budget prompt 454. The budget prompt 454 may provide an available budget. For example, the budget prompt 454 may indicate “Your available budget is 1,000 tokens.” In some aspects, the budget for each query (e.g., prompt 406) may be uniformly sampled between a minimum amount (e.g., 1,000 tokens) and a maximum amount (e.g., 100,000 tokens).
[0047] The budget prompt 454 may be tokenized and combined with a prompt 406. The combined prompts (e.g., 406 and 454) may be processed to generate an embedding 408. The embedding 408 may be provided to the RM 402. As in FIGURE 4A, the RM 402 may determine the additional tokens of a reasoning trace, which may be provided to the linear head 404 to produce the next token. In addition, the RM 402 may provide the internal states to the auxiliary head 452. The auxiliary head 452 may estimate the remaining budget A. The remaining budget A may represent the number of tokens available to be computed before producing the final answer. In other words, the remaining budget may represent the tokens available for reasoning or “thinking,” before the RM 402 produces a final answer to the prompt 406.
[0048] A regression loss may be computed as Lreg= ||A — A||^, where A representsthe ground truth remaining budget indicated by the difference between the budget prompt 454 (e.g., 1,000 tokens) and the number of tokens previously generated. InSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 14some aspects, the estimated budget may be normalized such that A E [0,1].Furthermore, in some aspects, the auxiliary head 452 may generate a token representing the remaining budget rather than regressing to the remaining budget.
[0049] Reinforcement learning (RL) may be applied to train the RM 402 to dynamically adapt the reasoning behavior of the RM 402 to the remaining budget before producing the final answer to the prompt 406. In some aspects, the RL approach may comprise (but is not limited to) a group relative policy optimization (GRPO) technique, for example. The RL may include an accuracy reward raccand a budget-forcing reward rbf. The accuracy award raccmay bias the RM 402 to produce the correct answer (e.g., y=ygt) and may be given by racc= 2 • n{y = ygt] — 1, where y is the generated answer, ygtis the ground truth answer, H represents an indicator function that is equal to 1 if the condition in the bracket is satisfied or otherwise equal to 0, and raccE {—1, +1}. In some aspects, the reasoning behavior (e.g., budget- forcing) may also be adapted based on a format (e.g., format reward). The format may represent special tokens (e.g., “\think”) that separate the chain of thought from the final answer produced by the RM 402.
[0050] On the other hand, the budget- forcing reward rb fmay be defined to provide a higher reward to correct answers for which the RM 402 used a number of reasoning tokens less than or equal to the ground truth budget (e.g., budget prompt 454). The budget-forcing may be given by:+ 1 if y = ygtand x < 0.52 ■ (1 - x) if y = ygtand x E (0.5; 1]0 i / y = ygtand x E (1; 1.2] max (—1; — logx ) if y = ygtand x > 1.2—2 if y ygtand x < 1..min (logx — 2, — 1 ) if y ygtand x > 1where rbf E {—2, +1} and x is fraction of the budget used by the RM 402 to generate the final answer (e.g., RM used 600 tokens with a 1000 token budget, then x = 600 / 1000 =0.6). In some aspects, the budget-forcing reward may comprise a hyperparameter. The budget-forcing reward rbf may also be implemented as a decaying function between +1 and 0 (or -1), which may only consider the length of the answer irrespective Seyfarth Ref. No. 72178-007114325141555v.lQualcomm Ref. No. 2505078WO 15of the answer being correct or wrong. Such budget-forcing reward may then be added to, or multiplied by the accuracy reward to produce the total reward for the RM 402.
[0051] In the RL training phase, the RM 402 may be forced to comply with the given budget. The budget may be randomly sampled for each prompt. Each question may be interpreted as an episode and the RM may be trained with a sparse reward setting taking into account both accuracy and compliance with the given budget.
[0052] In some aspects, the RM 402 may be directly trained to comply with a given budget without utilizing the auxiliary head 452. For instance, the RM 402 may receive a budget prompt (e.g., 454) and may by trained using RL. The total number of tokens generated may be counted and may be compared with the budget prompt. If the RM 402 complied with the budget, then a reward of + 1 may be given. On the other hand, if the RM 402 has not complied with budget, then a reward of 0 or -1 may be applied. In some aspect, the value of the reward may be a hyperparameter. Such budget related reward may be summed with an accuracy-related reward to provide a total reward for the RM 402.
[0053] FIGURE 5 is a graph illustrating an example reward design 500, in accordance with various aspects of the present disclosure. Referring to FIGURE 5, the example reward design 500 may incentivize short correct answers over longer correct answers. As such, the reward design 500 may encourage greater reasoning efficiency. Reasoning efficiency refers to a measure of the ability of the model to produce the correct answer using the given budget. However, the example reward design 500 may penalize short wrong answers the most. If the RM 402 is unable to solve the reasoning task correctly, the model should be encouraged to use more reasoning tokens.Accordingly, long, wrong answers may be penalized less than short wrong answers. Longer reasoning traces have a higher probability that the RM 402 may successfully solve the reasoning task.
[0054] Once the training phases (e.g., SFT and RL) have been completed, the auxiliary head (e.g., 452 of FIGURE 4B) may be removed, the base architecture 400 may be deployed, and the RM 402 may operate at inference-time without the auxiliary head 452. As such there is no additional overhead on the base architecture 400.Although the example training described may be conducted in two phases (e.g., SFT Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 16and RL), in some aspects, the SFT and RL phases may be combined such that the RM 402 may be trained to count tokens and leam budget awareness in a single reinforcement learning phase.
[0055] In operation, the RM (e.g., RM 402) may receive a prompt and budget prompt. The RM 402 may process the prompt to determine reasoning tokens of a reasoning trace considered before generating a final answer to the prompt. As the RM 402 determines reasoning tokens, the RM 402 may also determine the number of remaining tokens. The remaining tokens may be determined based on the budget prompt and the reasoning tokens generated. The RM 402 may continue generating additional reasoning tokens if there are remaining tokens. That is, the RM 402 may enforce the budget of tokens such that the RM 402 is forced to determine the final answer without exceeding the budget. In some aspects, the RM 402 may generate a budget token after generating additional reasoning tokens where the budget token indicates the remaining budget.
[0056] The disclosed techniques may be applied with applications running a language model that operates on a general chat or complex reasoning model, for instance. The disclosed adaptive budget-forcing may be particularly beneficial for reasoning models running on-device, such as on an edge device (e.g., smartphone or wearable).
[0057] Some additional example applications may comprise (but are not limited to) code generation including complex language generation tasks, writing documentation, and question answering for the generated code. Other applications may include autonomous driving applications having an artificial intelligence (Al) assistant in a vehicle that may handle simple knowledge-based questions without any reasoning requirements and may be provided by an RM backbone, and vehicle troubleshooting issues that may involve reasoning and following a set of complex instructions that depend on the specific malfunctions reported by the user. The reasoning mode may, for instance, be activated to improve the Al assistant’s responses.
[0058] Furthermore, the disclosed techniques may be applied for general on-device Al assistants such as where the on-device Al assistants handle simple knowledge-based questions and perform simple function calls. In the face of more challenging reasoning Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 17questions from a user or handling tasks that involve function calling with specific ordering, a reasoning mode can be seamlessly activated to improve results.
[0059] FIGURE 6 is a flow diagram illustrating a processor-implemented method 600 for adaptive budget-forcing for reasoning models, in accordance with various aspects of the present disclosure. The processor-implemented method 600 may be performed by one or more processors such as the CPU (e.g., 102 / 322), GPU (e.g., 104 / 326), and / or other processing unit (e.g., DSP 106 / 324, NPU 108 / 328), for example.
[0060] Referring to FIGURE 6, at block 602, the one or more processors receive, by a reasoning model, an input prompt and a budget prompt. As described with reference to FIGURE 4A, an example architecture 400 may include an RM 402 and a linear head 404.
[0061] At block 604, the one or more processors determine, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt. As described, for example with reference to FIGURE 4B, the RM 402 may receive an initial budget prompt 454. The budget prompt 454 may provide an available budget. For example, the budget prompt 454 may indicate “Your available budget is 1,000 tokens.”
[0062] At block 606, the one or more processors generate, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens. For example, as described, the RM 402 may process the embedding 408 to generate additional tokens that may be considered by the RM 402 before determining the text corresponding to the final answer. The additional tokens may be considered as a reasoning trace (may also be referred to as a “chain of thoughts”). The RM 402 may continue generating additional reasoning tokens if there are remaining tokens. In some aspects, the RM 402 may also generate a budget token after generating additional reasoning tokens where the budget token indicates the remaining budget.
[0063] At block 608, the one or more processors determine, by the reasoning model, the final response based on the input prompt and the set of tokens. The reasoning model is forced to generate the final response before exceeding the number of remaining Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 18tokens. For instances, as described, the RM 402 may enforce the budget of tokens such that the RM 402 is forced to determine the final answer without exceeding the budget.Example Aspects
[0064] Aspect 1 : An apparatus, comprising: at least one memory; and at least one processor coupled to the at least one memory, the at least one processor configured to: receive, by a reasoning model, an input prompt and a budget prompt; determine, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt; generate, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; and determine, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
[0065] Aspect 2: The apparatus of Aspect 1, wherein the at least one processor is further configured to: update, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; and generate, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
[0066] Aspect 3: The apparatus of Aspect 1 or 2, wherein the budget prompt indicates an inference-time compute allowed by the reasoning model before producing the final response.
[0067] Aspect 4: The apparatus of any preceding Aspect, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.
[0068] Aspect 5: The apparatus of any preceding Aspect, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.
[0069] Aspect 6: The apparatus of any preceding Aspect, wherein the auxiliary head generates a budget token representing the remaining budget.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 19
[0070] Aspect 7: The apparatus of any preceding Aspect, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answers determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.
[0071] Aspect 8: A processor-implemented method performed by one or more processor, the processor-implemented method comprising: receiving, by a reasoning model, an input prompt and a budget prompt; determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt; generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; and determining, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
[0072] Aspect 9: The processor- implemented method of Aspect 8, further comprising: updating, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; and generating, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
[0073] Aspect 10: The processor-implemented method of Aspect 8 or 9, wherein the budget prompt indicates an inference-time compute allowed by the reasoning model before producing the final response.
[0074] Aspect 11 : The processor-implemented method of any of Aspects 8-10, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.
[0075] Aspect 12: The processor-implemented method of any of Aspects 8-11, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.
[0076] Aspect 13: The processor-implemented method of any of Aspects 8-12, wherein the auxiliary head generates a budget token representing the remaining budget.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 20
[0077] Aspect 14: The processor-implemented method of any of Aspects 8-13, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answers determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.
[0078] Aspect 15: An apparatus, comprising: means for receiving, by a reasoning model, an input prompt and a budget prompt; means for determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt; means for generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; and means for determining, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
[0079] Aspect 16: The apparatus of Aspect 15, further comprising: means for updating, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; and means for generating, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
[0080] Aspect 17: The apparatus of Aspect 15 or 16, wherein the budget prompt indicates an inference-time compute allowed by the reasoning model before producing the final response.
[0081] Aspect 18: The apparatus of any of Aspects 15-17, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.
[0082] Aspect 19: The apparatus of any of Aspects 15-18, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.
[0083] Aspect 20: The apparatus of any of Aspects 15-19, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answersSeyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 21determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.
[0084] In one aspect, an apparatus includes receiving means, means for determining, by the reasoning model, a number of remaining tokens, means for generating, by the reasoning model, a set of tokens, and / or means for determining, by the reasoning model, the final response. The receiving means, means for determining, by the reasoning model, a number of remaining tokens, means for generating, by the reasoning model, a set of tokens, and / or means for determining, by the reasoning model, the final response may, for example, be the CPU (e.g., 102, 322), the GPU (e.g., 104, 326), and / or other processing unit (e.g., DSP 324, NPU 328), and / or memory 118 configured to perform the functions recited. In another configuration, the aforementioned means may be any module or any apparatus configured to perform the functions recited by the aforementioned means.
[0085] The various operations of methods described above may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and / or software component(s) and / or module(s), including, but not limited to, a circuit, an application specific integrated circuit (ASIC), or processor. Generally, where there are operations illustrated in the figures, those operations may have corresponding counterpart means-plus-function components with similar numbering.
[0086] As used, the term “determining” encompasses a wide variety of actions. For example, “determining” may include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database, or another data structure), ascertaining and the like. Additionally, “determining” may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory) and the like. Furthermore, “determining” may include resolving, selecting, choosing, establishing, and the like.
[0087] As used, a phrase referring to “at least one of’ a list of items refers to any combination of those items, including single members. As an example, “at least one of: a, b, or c” is intended to cover: a, b, c, a-b, a-c, b-c, and a-b-c.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 22
[0088] The various illustrative logical blocks, modules and circuits described in connection with the present disclosure may be implemented or performed with a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array signal (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components or any combination thereof designed to perform the functions described. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any commercially available processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
[0089] The steps of a method or algorithm described in connection with the present disclosure may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in any form of storage medium that is known in the art. Some examples of storage media that may be used include random access memory (RAM), read only memory (ROM), flash memory, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, a hard disk, a removable disk, a CD-ROM and so forth. A software module may comprise a single instruction, or many instructions, and may be distributed over several different code segments, among different programs, and across multiple storage media. A storage medium may be coupled to a processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor.
[0090] The methods disclosed comprise one or more steps or actions for achieving the described method. The method steps and / or actions may be interchanged with one another 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 specific steps and / or actions may be modified without departing from the scope of the claims.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 23
[0091] The functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in hardware, an example hardware configuration may comprise a processing system in a device. The processing system may be implemented with a bus architecture. The bus may include any number of interconnecting buses and bridges depending on the specific application of the processing system and the overall design constraints. The bus may link together various circuits including a processor, machine-readable media, and a bus interface. The bus interface may be used to connect a network adapter, among other things, to the processing system via the bus. The network adapter may be used to implement signal processing functions. For certain aspects, a user interface (e.g., keypad, display, mouse, joystick, etc.) may also be connected to the bus. The bus may also link various other circuits such as timing sources, peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further.
[0092] The processor may be responsible for managing the bus and general processing, including the execution of software stored on the machine-readable media. The processor may be implemented with one or more general-purpose and / or specialpurpose processors. Examples include microprocessors, microcontrollers, DSP processors, and other circuitry that can execute software. Software shall be construed broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Machine-readable media may include, by way of example, random access memory (RAM), flash memory, read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable Read-only memory (EEPROM), registers, magnetic disks, optical disks, hard drives, or any other suitable storage medium, or any combination thereof. The machine-readable media may be embodied in a computer-program product. The computer-program product may comprise packaging materials.
[0093] In a hardware implementation, the machine-readable media may be part of the processing system separate from the processor. However, as those skilled in the art will readily appreciate, the machine-readable media, or any portion thereof, may be external to the processing system. By way of example, the machine-readable media Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 24may include a transmission line, a carrier wave modulated by data, and / or a computer product separate from the device, all which may be accessed by the processor through the bus interface. Alternatively, or in addition, the machine-readable media, or any portion thereof, may be integrated into the processor, such as the case may be with cache and / or general register files. Although the various components discussed may be described as having a specific location, such as a local component, they may also be configured in various ways, such as certain components being configured as part of a distributed computing system.
[0094] The processing system may be configured as a general-purpose processing system with one or more microprocessors providing the processor functionality and external memory providing at least a portion of the machine-readable media, all linked together with other supporting circuitry through an external bus architecture.Alternatively, the processing system may comprise one or more neuromorphic processors for implementing the neuron models and models of neural systems described. As another alternative, the processing system may be implemented with an application specific integrated circuit (ASIC) with the processor, the bus interface, the user interface, supporting circuitry, and at least a portion of the machine-readable media integrated into a single chip, or with one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gated logic, discrete hardware components, or any other suitable circuitry, or any combination of circuits that can perform the various functionality described throughout this disclosure. Those skilled in the art will recognize how best to implement the described functionality for the processing system depending on the particular application and the overall design constraints imposed on the overall system.
[0095] The machine-readable media may comprise a number of software modules. The software modules include instructions that, when executed by the processor, cause the processing system to perform various functions. The software modules may include a transmission module and a receiving module. Each software module may reside in a single storage device or be distributed across multiple storage devices. By way of example, a software module may be loaded into RAM from a hard drive when a triggering event occurs. During execution of the software module, the processor may load some of the instructions into cache to increase access speed. One or more cache Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 25lines may then be loaded into a general register file for execution by the processor. When referring to the functionality of a software module below, it will be understood that such functionality is implemented by the processor when executing instructions from that software module. Furthermore, it should be appreciated that aspects of the present disclosure result in improvements to the functioning of the processor, computer, machine, or other system implementing such aspects.
[0096] If implemented in software, the functions may be stored or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage medium may be any available medium that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Additionally, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared (IR), radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray® disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Thus, in some aspects, computer-readable media may comprise non-transitory computer-readable media (e.g., tangible media). In addition, for other aspects computer-readable media may comprise transitory computer- readable media (e.g., a signal). Combinations of the above should also be included within the scope of computer-readable media.
[0097] Thus, certain aspects may comprise a computer program product for performing the operations presented. For example, such a computer program product may comprise a computer-readable medium having instructions stored (and / or encoded) thereon, the instructions being executable by one or more processors to perform the Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 26operations described. For certain aspects, the computer program product may include packaging material.
[0098] Further, it should be appreciated that modules and / or other appropriate means for performing the methods and techniques described can be downloaded and / or otherwise obtained by a user terminal and / or base station as applicable. For example, such a device can be coupled to a server to facilitate the transfer of means for performing the methods described. Alternatively, various methods described can be provided via storage means (e.g., RAM, ROM, a physical storage medium such as a compact disc (CD) or floppy disk, etc.), such that a user terminal and / or base station can obtain the various methods upon coupling or providing the storage means to the device. Moreover, any other suitable technique for providing the methods and techniques described to a device can be utilized.
[0099] It is to be understood that the claims are not limited to the precise configuration and components illustrated above. Various modifications, changes, and variations may be made in the arrangement, operation, and details of the methods and apparatus described above without departing from the scope of the claims.Seyfarth Ref. No. 72178-007114325141555v.1
Claims
Qualcomm Ref. No. 2505078WO 27CLAIMS WHAT IS CLAIMED IS:
1. An apparatus, comprising:at least one memory; andat least one processor coupled to the at least one memory, the at least one processor configured to:receive, by a reasoning model, an input prompt and a budget prompt; determine, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt;generate, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; anddetermine, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
2. The apparatus of claim 1, wherein the at least one processor is further configured to:update, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; andgenerate, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
3. The apparatus of claim 1, wherein the budget prompt indicates an inference-time compute allowed by the reasoning model before producing the final response.
4. The apparatus of claim 1, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.
5. The apparatus of claim 4, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 286. The apparatus of claim 5, wherein the auxiliary head generates a budget token representing the remaining budget.
7. The apparatus of claim 4, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answers determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.
8. A processor- implemented method performed by one or more processor, the processor-implemented method comprising:receiving, by a reasoning model, an input prompt and a budget prompt; determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt; generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; and determining, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
9. The processor-implemented method of claim 8, further comprising:updating, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; andgenerating, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
10. The processor-implemented method of claim 8, wherein the budget prompt indicates an inference-time compute allowed by the reasoning model before producing the final response.
11. The processor- implemented method of claim 8, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 2912. The processor- implemented method of claim 11, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.
13. The processor- implemented method of claim 12, wherein the auxiliary head generates a budget token representing the remaining budget.
14. The processor- implemented method of claim 11, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answers determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.
15. An apparatus, comprising:means for receiving, by a reasoning model, an input prompt and a budget prompt;means for determining, by the reasoning model, a number of remaining tokens permitted before generating a final response to the input prompt based on the budget prompt;means for generating, by the reasoning model, a set of tokens including at least one reasoning token based on the input prompt and the number of remaining tokens; and means for determining, by the reasoning model, the final response based on the input prompt and the set of tokens, the reasoning model being forced to generate the final response before exceeding the number of remaining tokens.
16. The apparatus of claim 15, further comprising:means for updating, by the reasoning model, the number of remaining tokens based on a count of tokens in the set of tokens; andmeans for generating, by the reasoning model, additional reasoning tokens based on the input prompt and the updated number of remaining tokens.
17. The apparatus of claim 15, wherein the budget prompt indicates an inferencetime compute allowed by the reasoning model before producing the final response.Seyfarth Ref. No. 72178-007114325141555v.1Qualcomm Ref. No. 2505078WO 3018. The apparatus of claim 15, wherein the reasoning model is trained for adaptive budget-forcing based on a model accuracy, a remaining token count, and a format.
19. The apparatus of claim 18, wherein the reasoning model is trained to estimate a remaining budget using an auxiliary head based on the budget prompt.
20. The apparatus of claim 18, wherein the reasoning model is trained using a reinforcement learning process that incentivizes correct answers determined using fewer reasoning tokens or penalizes incorrect answers determined using fewer of the reasoning tokens.Seyfarth Ref. No. 72178-007114325141555v.1
