WO2024253871A1 - Computer memory access for machine learning models - Google Patents
Computer memory access for machine learning models Download PDFInfo
- Publication number
- WO2024253871A1 WO2024253871A1 PCT/US2024/030905 US2024030905W WO2024253871A1 WO 2024253871 A1 WO2024253871 A1 WO 2024253871A1 US 2024030905 W US2024030905 W US 2024030905W WO 2024253871 A1 WO2024253871 A1 WO 2024253871A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network weight
- value
- bits
- matrix
- multiplication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0495—Quantised networks; Sparse networks; Compressed networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
Definitions
- Machine learning models often involve performing matrix operations, such as matrix multiplication, which require accessing network weight values stored in computer memory.
- matrix operations such as matrix multiplication
- FIG. 1 schematically illustrates multiplication of an input vector against a matrix of network weight values retrieved from computer memory.
- FIG. 2 illustrates an example method for computer memory access.
- FIG. 3 schematically illustrates retrieval of network weight values from computer memory.
- FIG. 4A schematically illustrates an example organizational system for storing network weight values in computer memon .
- FIG. 4B schematically illustrates example compute logic for performing matrix vector multiplication using the organizational system of FIG. 4A.
- FIG. 5 schematically illustrates another example organizational system for storing network weight values in computer memon'
- FIG. 6 schematically shows an example computing system.
- execution of a machine learning model often includes a number of steps in which an input vector is multiplied against a matrix of values retrieved from computer memory. This is schematically shown with respect to FIG. 1, illustrating execution of a machine learning model 100. As shown, execution of the model includes multiplication of an input vector 102 by a matrix of network weight values 104, to give a set of resulting values 106.
- the network weight values are retrieved from computer memory 108. Such retrieval is not instantaneous. Over a number of processing steps, in which different input vectors are multiplied against different matrices of network weight values, the aggregate time spent fetching weight values from computer memoiy can create a significant performance barrier. In other words, the overall speed of the machine learning model (e.g., expressed as inferences per second) is in some examples limited by the significant throughput used for reading network weight values from computer memoi '. For instance, conventional methods often retrieve and process the entire network weight value from memory, resulting in unnecessary data transfer and increased computational overhead.
- each of these approaches is applied ahead of time (e.g., prior to receiving an input vector as part of model execution), with no regard to the input vector that will be multiplied against the network weight values.
- This can significantly affect the accuracy of the machine learning model. For instance, instead of multiplying values of the input vector by the actual network weight values, they are instead multiplied by representations of the network weight values that have been shortened to a smaller number of bits, which can affect the result of the multiplication. This is referred to as “quantization error” and can, in some cases, affect the output of the machine learning model - e.g., causing the model’s response to a user’s input query to be less relevant and less satisfactory.
- the present disclosure is directed to techniques for computer memory access, in which quantization is dynamically applied to network weight values based on corresponding values of the input vector.
- the techniques described herein may be applied on-the-fly during execution of the machine learning model, as compared to other approaches that are performed ahead of time.
- the manner in which quantization is applied to any given network weight value can be adjusted based on the corresponding vector value that will be multiplied against the network weight value - e.g., based on the size of the vector value, and/or based on the relative difference between the vector value and other vector values of the input vector.
- quantization applied to the network weight value can result in relatively more quantization error - e.g., even a small change in the network weight value can have a large effect on the resulting value when multiplied against a large vector value.
- little to no quantization is applied to the netw ork weight value when it is to be multiplied by a corresponding vector value that is a relatively large number (e.g., as compared to other values in the same vector).
- a computing system may determine a representation quantity (R) of bits that should be retrieved from computer memory as a representation of the network weight value. This may differ from a stored quantity (S) of bits used to store the network weight value in the computer memory. For instance, R may be relatively higher than the R values for other network weight values in cases where the corresponding vector value is relatively higher, and the corresponding vector values for the other network weight values are relatively lower, which serves to reduce quantization error as described above. However, in some cases R may be significantly less than S, or even reduced to zero, when quantization is relatively less likely to have a significant effect on the vector-matrix product - e.g., because the corresponding vector value is relatively low. or equal to zero.
- FIG. 2 illustrates an example method 200 for computer memory access.
- Method 200 may be performed by any suitable computing system of one or more computing devices. Any computing device performing steps of method 200 may have any suitable capabilities, hardware configuration, and form factor. Steps of method 200 may be initiated, terminated, or repeated at any suitable time, and in response to any suitable condition. In some examples, method 200 is implemented by computing system 600 described below with respect to FIG. 6.
- Method 200 is primarily described as being performed during execution of a machine learning model.
- the machine learning model is a transformer-based language model.
- the techniques described herein may be applied to any suitable type of machine learning model, in which input vectors are multiplied against matrices of values retrieved from computer memory.
- Non-limiting examples of additional machine learning (ML) and/or artificial intelligence (Al) techniques that may benefit from the techniques described herein will be provided below with respect to FIG. 6.
- ML machine learning
- Al artificial intelligence
- the techniques for dynamic quantization described herein need not be specifically implemented only in scenarios involving execution of a machine learning model. Rather, the techniques described herein are applicable in a variety of scenarios where matrices of values are retrieved from computer memory for multiplication against input vectors, where retrieval of the data from memory creates a performance barrier.
- method 200 includes receiving an input vector for multiplication with a matrix of network weight values.
- an input vector 102 is received for multiplication with a matrix of network weight values 104, during execution of a machine learning model 100.
- each network value of the matrix of network weight values is stored in computer memon using the stored quantity S of bits.
- S may be the same for each network weight value of the matrix.
- each network weight value may be stored using eight bits, or another suitable number.
- S may differ for different network weight values - e.g., some values may be stored in memory using relatively more bits of data than other values.
- the input vector may take any suitable form and include any suitable number of vector values.
- the actual vector values of the vector may have any suitable size and may encode or otherwise represent any suitable information.
- the input vector is an input to a machine learning model, or an intermediary set of values produced during execution of the machine learning model, or is unrelated to execution of a machine learning model.
- the machine learning model is a transformer-based language model.
- the input vector may represent tokens and/or words of a natural language input, encoded as the values X(l) - X(N) of an input vector X having N values.
- the input vector may represent attention values for one token of an input prompt, expressing the relevance or "‘connectedness’" of other tokens in the same prompt. For instance, in the prompt “the boy runs to the store,” the words “boy” and “runs” are relatively more connected than the words “boy” and “store,” and this may be encoded by the values of the input vector.
- input vectors may take the form of intermediate result vectors inside hidden layers of a transformer-based language model.
- the input vector is processed in one or more processing steps during execution of a machine learning model. For example, this may include iteratively processing the input vector through a plurality of encoder and decoder layers.
- processing of an input vector often involves multiplication of the input vector by one or more matrices of values retrieved from computer memory, such as network weight values learned and refined during model training.
- the matrix of values multiplied by the input vector may include any suitable number of values (e.g., arranged in any suitable number of discreet, rows, columns, and/or other groupings), each having any suitable size, and the matrix values may encode or otherwise represent any suitable information.
- the resulting values 108 after the input vector is multiplied by the matrix values may take any suitable form, and include any suitable number of different values.
- the resulting values may similarly be expressed as a one-dimensional output vector.
- the resulting values are in some examples output as a result of the model (e.g.. decoded as a response to the input prompt), output for continued processing by the model (e.g., used as a subsequent input vector for multiplication against a subsequent matrix of values in a next network layer), and/or used for any other suitable purpose.
- method 200 includes, for a network weight value of the matrix of network weight values, determining a representation quantity R of bits to be used for representing the network weight value during multiplication with a corresponding vector value of the input vector. As discussed above, this is determined based at least in part on a magnitude of the corresponding vector value. For example, when multiplied by a relatively larger vector value, any quantization applied to a network weight value is relatively more likely to have a larger impact on the resulting value than would be the case if the network weight value was multiplied by a relatively smaller vector value.
- quantization error can be reduced by determining the value of R for a given network weight value based at least in part on the magnitude of the corresponding vector value (e.g., X[i]) to be multiplied against the network weight value.
- R may be proportional to the magnitude of the corresponding vector value - e.g., in situations where the vector value is relatively large, quantization error may be reduced by setting R relatively high. In some cases, no quantization is performed, meaning R is equal to the number of bits S used to store the network weight value.
- R When the value of the input vector is relatively smaller, R can be reduced to reduce the amount of data retrieved from computer memory. In a case where the corresponding vector value of the input vector is equal to zero, then R may be set to zero, and no bits of the network weight value need to be retrieved from memory. This provides the technical benefits of reducing consumption of computational resources (e.g., no electrical power is spent retrieving the zero bits from memory) and faster network performance (e.g., no time is spent retrieving the zero bits from memory’).
- determining R for a given network weight value in some cases refers to determining R for each network weight value in a same matrix row - e.g.. all weight values in the same row are represented using the same quantity of bits, based at least in part on the magnitude of the vector value to be multiplied by the matrix row.
- each network weight value stored in the same matrix column, or other suitable grouping may have the same value of R.
- R may be calculated by a configurable formula that considers at least the value of the corresponding vector value (e g., X[i]) as an input.
- the configurable formula may additionally consider any variety of other suitable information, as will be described below.
- the value of R is determined based at least in part on a difference between the corresponding vector value and other vector values of the input vector. For instance, if all vector values of the input vector are relatively homogeneous, then the R values for each network weight value multiplied by the input vector may be the same, or similar. However, if there is more diversity' in the vector values of the input vector, then R values may be correspondingly adjusted. For instance, if one vector value is significantly lower than other vector values of the input vector, then any network weight values to be multiplied with the relatively lower vector value may have relatively lower values of R. Similarly, R may be relatively larger when the corresponding vector value is relatively higher than an average vector value of the input vector.
- This provides the technical benefits of improving network performance while preserving accuracy - e.g., relatively more bits are retrieved in cases where quantization is more likely to affect the calculation result, while time and power are conserved by reducing the number of bits retrieved for less impactful input vector values.
- R is further determined based at least in part on a power consumption policy of the computing device being used to execute the machine learning model.
- a power consumption policy of the computing device being used to execute the machine learning model.
- retrieving relatively more data from memory consumes relatively more electrical power.
- values of R may be set relatively lower. This can potentially increase quantization error, but improves the speed of the machine learning model, and reduces the power consumption associated with executing the machine learning model.
- R may be determined based at least in part on a power consumption policy that is automatically applied contextually (e.g., when a portable device is using battery’ power), and/or user definable (e.g., the user may switch the device between different performance or power saving modes).
- a power consumption policy that is automatically applied contextually (e.g., when a portable device is using battery’ power), and/or user definable (e.g., the user may switch the device between different performance or power saving modes).
- a power consumption policy may be applied based on an identity 7 of a human user interacting with the machine learning model.
- a service that charges for access to a machine learning model may grant paid users access to a powder consumption policy that prioritizes model performance and accuracy over power consumption.
- free or trial users may be restricted to a power consumption policy that prioritizes energy efficiency over model accuracy.
- R may be determined based on any or all of: user-definable settings (e.g., a power consumption setting, an accuracy 7 target setting), device hardware characteristics (e.g., mobile devices and/or devices with less powerful hardware may use less quantization by default), a current user identity (e.g., user is a free subscriber vs paid subscriber, user is an administrator with elevated privileges), and/or a device power state (e.g., plugged in vs running on battery).
- user-definable settings e.g., a power consumption setting, an accuracy 7 target setting
- device hardware characteristics e.g., mobile devices and/or devices with less powerful hardware may use less quantization by default
- a current user identity e.g., user is a free subscriber vs paid subscriber, user is an administrator with elevated privileges
- a device power state e.g., plugged in vs running on battery.
- heuristics that may be considered w hen determining R for any given network weight value.
- any or all of the following heuristics may be implemented as part of a heuristic-based function that determines R for a given network weight value, based on the corresponding vector value:
- the R value for each row of the matrix M may be relatively low, as any quantization error in M will likely only cause a small change in the resulting values.
- R may be increased for the matrix row to be multiplied with the larger vector values and decreased for matrix rows to be multiplied with smaller matrix values.
- the computing sy stem determines a number of bits to be used for representing the network weight value during multiplication with the input vector.
- method 200 includes retrieving R bits of the network weight value for multiplication with the corresponding vector value.
- FIG. 3 This is schematically illustrated with respect to FIG. 3, showing an example computer memory 300 storing a network weight value 302A.
- the network weight value is stored as eight bits, one of which is labeled as data bit 304.
- S is equal to eight.
- FIG. 3 is not intended to be an accurate representation of how data is stored or organized in computer memory, but rather is intended to be a simplified conceptual explanation of dynamic quantization.
- the techniques described herein are applicable to any suitable type of computer memory, including dynamic random access memory (DRAM), flash memory, static random access memory (SRAM), and/or other suitable memory types.
- DRAM dynamic random access memory
- SRAM static random access memory
- the computing system determines that the network weight value should be quantized, and sets R to five.
- the computing system retneves five bits as a retrieved value 306A, which represents the stored value 302A while using fewer bits than are stored in computer memory 7 .
- R is a smaller number of bits than S, and thus at least some bits of the network weight value are stored in the computer memory 7 and not retrieved for multiplication with the corresponding vector value.
- the S bits stored in memory may be shortened to R retrieved bits in any suitable way.
- the S bits may simply be truncated - e.g., the R most significant bits of the network weight value may be retrieved as stored, and any additional bits are not considered.
- some degree of rounding may be used - e.g., bits 1 through R of the stored network value may be retrieved unmodified, w hile the value of bits (R+l) through S may be rounded up, rounded down, or filled with a middle value depending on the scenario.
- R may be used for each network weight value, and/or each matrix row (or column) of network weight values.
- the computing system determines a second representation quantity (R’) of bits to be used for representing a second network weight value during multiplication with a second corresponding vector value of the input vector.
- R' may be determined based at least in part on a magnitude of the second corresponding vector value. For example, when the corresponding vector value used to determine R is smaller than the second corresponding vector value used to determine R’, then R may 7 be a smaller number of bits than R’.
- either or both of R and R’ may be equal to S, in which case all stored bits of the network weight value are retrieved for multiplication.
- This further provides a technical benefit as discussed above - e.g., by dynamically tuning the number of bits retrieved for different netw ork w eight values based on their corresponding input vector values, the computing system can reduce consumption of resources and improve performance of the model while still preserving accuracy.
- FIG. 3 This is also schematically illustrated with respect to FIG. 3, in which computer memory 300 additionally stores a second network weight value 302B.
- second network weight value 302B is also stored using eight bits (e.g., S is equal to eight).
- the computing system determines R’ bits of the second stored netw ork w eight value for retrieval as a retrieved value 306B, representing the second network weight value.
- R’ is equal to S, and thus every bit used to store the second network weight value in computer memory is retrieved for multiplication with the second corresponding vector value.
- the network w eight values in a particular column of the matrix will be stored inside a same memory 7 row or memory 7 page in computer memory 7 .
- the values of the matrix are read from computer memory row-by- row; such that network weight values in a same row of the matrix are stored in a same memory row of the computer memory. This beneficially improves the ability of the computing system to retrieve data from computer memory 7 as described herein, resulting in an improvement to the performance of the machine learning model.
- the present disclosure primarily describes network matrix values as being stored in memory “rows,” although it will be understood that the techniques described herein may additionally or alternatively be used to read network weight values from memory pages - e.g., rather than reading memory row-by-row, the memory may be read page-by- page.
- FIG. 4A schematically illustrates one non-limiting example system for organizing data bits in computer memory.
- FIG. 4A is highly simplified and intended only to serve as a conceptual representation of how data may be organized in computer memory.
- FIG. 4A shows another example computer memory 400, storing two rows of data 400A and 400B.
- the bits stored in computer memory 400 are based on the matrix of network weight values 104 shown in FIG. 1. As shown in FIG.
- the matrix of network weight values are stored such that the values in a same row in the matrix are stored in a same memory row of the computer memoi ' - e.g., the first row of matrix 104 includes values M(l,l)- M(l,4), which are each included in memory row 402 A.
- the memory rows are organized beginning with the most significant bits for each network weight value, and ending with the least significant bits for each network weight value.
- the stored network weight values are quantized using int8 quantization, and thus are each stored using eight bits.
- the memory' row begins with bit 7 for each network weight value in the same matrix row, corresponding to the most significant bit for each network weight value.
- row 402A begins with bit 404. which is the most significant bit for matrix value M(l,l), followed by the most significant bits for matrix values M(l,2)-M(l,4).
- memory row 402A ends with bit 406, which is the least significant bit for matrix value M(l,4).
- the R bits used to represent each network weight value in the same matrix row are the first bits in the computer memory row.
- the computing system may then read out the data bits by reading the memory row until R bits for each network weight value have been retrieved, and then the computing system may' move on to network weight values of the next matrix row, stored in the next memory' row.
- row 402B includes network weight values M(2,l)-M(2,4). each held in the same row of matrix 104. This beneficially enables the computing system to implement the techniques described herein while still using incremental addressing.
- each memory row may still begin with the most significant bits for the network weight values in the same matrix row (e.g., bit 15), and end with the least significant bits (e.g., bit 0).
- the specific scenario shown in FIG. 4A includes four different network weight values for each row in the matrix.
- the computer memory only includes two memory rows, corresponding to the first two rows of matrix 104. It will be understood that this is only done for the sake of visual clarity.
- the computer memory may include different memory rows for each matrix row of the matrix of network weight values, and may include any number of additional memory row s for storing any other suitable data.
- the approach shown in FIG 4A may be used regardless of whether the bits are expressed using standard int8 (where bit 7 is the sign bit), and for unsigned int8 (where bit 7 represents the multiplication factor for 2 A 7).
- multiple matrix row's of network weight values may be stored in the same memory' row - e.g., if the matrix row size is smaller than the memory row size.
- FIG. 4B shows an example diagram 450 for compute logic usable to perform the matrix-vector multiplication, when bits are stored in memory as shown in FIG. 4A.
- the number of multipliers changes from N (the number of values in the input vector row), to K (the number of columns in the matrix of values), where N and K will be the same in some examples.
- the compute logic uses K small 2- input adders.
- the compute section may optionally include different multipliers for different quantization values (e.g., 4 bits vs 8 bits). This can enable the computing system to select an appropriate multiplier depending on the quantization determined for each row of the matrix, which can conserve electrical power in the compute section when relatively more quantization is applied for a specific row'.
- the bits for the network w'eight values are stored in computer memory' using a floating-point representation (e.g., FP32, FP16, FP8... ).
- FIG. 5 schematically illustrates another example system for organizing bits in computer memory, in which FP16 is used. As with FIGS. 3 and 4A. it will be understood that FIG. 5 is highly simplified and intended only as a conceptual representation of how data may be organized in computer memory.
- FIG. 5 schematically shows an example computer memory' 500, which again includes two memory row s 502A and 502B corresponding to network weight values held in the first two rows of matrix 104.
- the memory rows are organized such that each memory row begins with sign bits for each network value stored in the memory row, followed by exponent bits for each network value stored in the memory' row, and ending with mantissa bits for each network value stored in the memory row .
- This beneficially improves the speed and efficiency of memory access by again reducing the amount of unnecessary data that is read from each row, depending on the R value determined for that row.
- row 502A begins with bit 504, which is a sign bit for netw ork w eight value M(l,l), and is followed by sign bits for values M(l,2)-M(l,4).
- the memory row' includes a bit 506, which is a first exponent bit for value M(1 , 1). This is followed by additional exponent bits for each network weight value (e.g., exponent bits 4, 3. 2, 1, and 0 for each network weight value).
- the memory row includes a bit 508, which is a first mantissa bit for value M(l,l). This is followed by additional mantissa bits for each network weight value (e.g., mantissa bits 9-0 for each netyvork weight value).
- the computing system only reads every’ exponent bit for a given network weight value if any mantissa bits for that matrix row of network weight values must be retrieved.
- the computing system need not read any mantissa bits (e.g., only sign and exponent bits are read, or the entire row is pruned and represented by zero)
- the computing system is beneficially able to read less than all exponent bits for a given network weight value. This provides the technical benefit of improving the speed of model execution.
- the methods and processes described herein may be tied to a computing system of one or more computing devices.
- such methods and processes may be implemented as an executable computer-application program, a network-accessible computing service, an application-programming interface (API), a library, or a combination of the above and/or other compute resources.
- API application-programming interface
- FIG. 6 schematically shows a simplified representation of a computing system 600 configured to provide any to all of the compute functionality’ described herein.
- Computing system 600 may take the form of one or more personal computers, network-accessible server computers, tablet computers, home-entertainment computers, gaming devices, mobile computing devices, mobile communication devices (e.g., smart phone), virtual/augmented/mixed reality’ computing devices, wearable computing devices, Internet of Things (loT) devices, embedded computing devices, and/or other computing devices.
- Computing system 600 includes a logic subsystem 602 and a storage subsystem 604.
- Computing system 600 may optionally include a display subsystem 606, input subsystem 608, communication subsystem 610. and/or other subsystems not shown in FIG. 6.
- Logic subsystem 602 includes one or more physical devices configured to execute instructions.
- the logic subsystem may be configured to execute instructions that are part of one or more applications, services, or other logical constructs.
- the logic subsystem may include one or more hardware processors configured to execute software instructions. Additionally, or alternatively, the logic subsystem may include one or more hardware or firmware devices configured to execute hardware or firmware instructions.
- Processors of the logic subsystem may be single-core or multi-core, and the instructions executed thereon may be configured for sequential, parallel, and/or distributed processing. Individual components of the logic subsystem optionally may be distributed among two or more separate devices, which may be remotely located and/or configured for coordinated processing. Aspects of the logic subsystem may be virtualized and executed by remotely-accessible, networked computing devices configured in a cloud-computing configuration.
- Storage subsystem 604 includes one or more physical devices configured to temporarily and/or permanently hold computer information such as data and instructions executable by the logic subsystem. When the storage subsystem includes two or more devices, the devices may be collocated and/or remotely located. Storage subsystem 604 may include volatile, nonvolatile, dynamic, static, read/write, read-only, random-access, sequential-access, location- addressable, file-addressable, and/or content-addressable devices. Storage subsystem 604 may include removable and/or built-in devices. When the logic subsystem executes instructions, the state of storage subsystem 604 may be transformed - e g., to hold different data.
- logic subsystem 602 and storage subsystem 604 may be integrated together into one or more hardware-logic components.
- Such hardware-logic components may include program- and application-specific integrated circuits (PASIC / ASICs), program- and application-specific standard products (PSSP / ASSPs), system-on-a-chip (SOC), and complex programmable logic devices (CPLDs), for example.
- PASIC / ASICs program- and application-specific integrated circuits
- PSSP / ASSPs program- and application-specific standard products
- SOC system-on-a-chip
- CPLDs complex programmable logic devices
- the logic subsystem and the storage subsystem may cooperate to instantiate one or more logic machines.
- the term "machine”’ is used to collectively refer to the combination of hardware, firmware, software, instructions, and/or any other components cooperating to provide computer functionality. In other words, “machines” are never abstract ideas and always have a tangible form.
- a machine may be instantiated by a single computing device, or a machine may include two or more sub-components instantiated by two or more different computing devices.
- a machine includes a local component (e.g., software application executed by a computer processor) cooperating with a remote component (e.g., cloud computing sendee provided by a network of server computers).
- Machines may be implemented using any suitable combination of state-of-the-art and/or future machine learning (ML), artificial intelligence (Al), and/or natural language processing (NLP) techniques.
- ML state-of-the-art and/or future machine learning (ML), artificial intelligence (Al), and/or natural language processing (NLP) techniques.
- Non-limiting examples of techniques that may be incorporated in an implementation of one or more machines include support vector machines, multi-layer neural networks, convolutional neural networks (e.g., including spatial convolutional networks for processing images and/or videos, temporal convolutional neural networks for processing audio signals and/or natural language sentences, and/or any other suitable convolutional neural networks configured to convolve and pool features across one or more temporal and/or spatial dimensions), recurrent neural networks (e.g., long short-term memory networks), associative memories (e.g., lookup tables, hash tables, Bloom Filters, Neural Turing Machine and/or Neural Random Access Memory), word embedding models (e.g., GloVe or Word2Vec), unsupen ised spatial and/or clustering methods (e.g., nearest neighbor algorithms, topological data analysis, and/or k-means clustering), graphical models (e.g., (hidden) Markov models, Markov random fields, (hidden) conditional random fields, and/or Al knowledge bases
- the methods and processes described herein may be implemented using one or more differentiable functions, wherein a gradient of the differentiable functions may be calculated and/or estimated with regard to inputs and/or outputs of the differentiable functions (e.g., with regard to training data, and/or with regard to an objective function).
- a gradient of the differentiable functions may be calculated and/or estimated with regard to inputs and/or outputs of the differentiable functions (e.g., with regard to training data, and/or with regard to an objective function).
- Such methods and processes may be at least partially determined by a set of trainable parameters. Accordingly, the trainable parameters for a particular method or process may be adjusted through any suitable training procedure, in order to continually improve functioning of the method or process.
- Non-limiting examples of training procedures for adjusting trainable parameters include supervised training (e.g., using gradient descent or any other suitable optimization method), zero-shot, few-shot, unsupervised learning methods (e.g., classification based on classes derived from unsupervised clustering methods), reinforcement learning (e.g., deep Q learning based on feedback) and/or generative adversarial neural network training methods, belief propagation, RANSAC (random sample consensus), contextual bandit methods, maximum likelihood methods, and/or expectation maximization.
- supervised training e.g., using gradient descent or any other suitable optimization method
- unsupervised learning methods e.g., classification based on classes derived from unsupervised clustering methods
- reinforcement learning e.g., deep Q learning based on feedback
- generative adversarial neural network training methods e.g., belief propagation, RANSAC (random sample consensus), contextual bandit methods, maximum likelihood methods, and/or expectation maximization.
- a plurality of methods, processes, and/or components of systems described herein may be trained simultaneously with regard to an objective function measuring performance of collective functioning of the plurality' of components (e.g., with regard to reinforcement feedback and/or with regard to labelled training data). Simultaneously training the plurality of methods, processes, and/or components may improve such collective functioning.
- one or more methods, processes, and/or components may be trained independently of other components (e.g., offline training on historical data).
- Language models may utilize vocabulary’ features to guide sampling/searching for words for recognition of speech.
- a language model may be at least partially defined by a statistical distribution of words or other vocabulary features.
- a language model may be defined by a statistical distribution of n-grams, defining transition probabilities between candidate words according to vocabulary' statistics.
- the language model may be further based on any other appropriate statistical features, and/or results of processing the statistical features with one or more machine learning and/or statistical algorithms (e.g., confidence values resulting from such processing).
- a statistical model may constrain what words may be recognized for an audio signal, e.g., based on an assumption that words in the audio signal come from a particular vocabulary.
- the language model may be based on one or more neural networks previously trained to represent audio inputs and words in a shared latent space, e.g., a vector space learned by one or more audio and/or word models (e.g., wav21etter and/or word2vec).
- finding a candidate word may include searching the shared latent space based on a vector encoded by the audio model for an audio input, in order to find a candidate word vector for decoding with the word model.
- the shared latent space may be utilized to assess, for one or more candidate words, a confidence that the candidate word is featured in the speech audio.
- the language model may be used in conjunction with an acoustical model configured to assess, for a candidate word and an audio signal, a confidence that the candidate word is included in speech audio in the audio signal based on acoustical features of the word (e.g., mel-frequency cepstral coefficients, formants, etc.).
- the language model may incorporate the acoustical model (e.g., assessment and/or training of the language model may be based on the acoustical model).
- the acoustical model defines a mapping between acoustic signals and basic sound units such as phonemes, e.g., based on labelled speech audio.
- the acoustical model may be based on any suitable combination of state-of-the-art or future machine learning (ML) and/or artificial intelligence (Al) models, for example: deep neural networks (e.g., long short-term memory, temporal convolutional neural network, restricted Boltzmann machine, deep belief network), hidden Markov models (HMM), conditional random fields (CRF) and/or Markov random fields, Gaussian mixture models, and/or other graphical models (e.g., deep Bayesian network).
- Audio signals to be processed with the acoustic model may be pre-processed in any suitable manner, e.g., encoding at any suitable sampling rate, Fourier transform, band-pass filters, etc.
- the acoustical model may be trained to recognize the mapping between acoustic signals and sound units based on training with labelled audio data.
- the acoustical model may be trained based on labelled audio data comprising speech audio and corrected text, in order to learn the mapping between the speech audio signals and sound units denoted by the corrected text. Accordingly, the acoustical model may be continually improved to improve its utility for correctly recognizing speech audio.
- the language model may incorporate any suitable graphical model, e.g., a hidden Markov model (HMM) or a conditional random field (CRF).
- HMM hidden Markov model
- CRF conditional random field
- the graphical model may utilize statistical features (e.g., transition probabilities) and/or confidence values to determine a probability of recognizing a word, given the speech audio and/or other words recognized so far. Accordingly, the graphical model may utilize the statistical features, previously trained machine learning models, and/or acoustical models to define transition probabilities between states represented in the graphical model.
- display subsystem 606 may be used to present a visual representation of data held by storage subsystem 604. This visual representation may take the form of a graphical user interface (GUI).
- GUI graphical user interface
- Display subsystem 606 may include one or more display devices utilizing virtually any type of technology.
- display subsystem may include one or more virtual-, augmented-, or mixed reality displays.
- input subsystem 608 may comprise or interface with one or more input devices.
- An input device may include a sensor device or a user input device. Examples of user input devices include a keyboard, mouse, touch screen, or game controller.
- the input subsystem may comprise or interface with selected natural user input (NUI) componentry. Such componentry may be integrated or peripheral, and the transduction and/or processing of input actions may be handled on- or off-board.
- NUI componentry may include a microphone for speech and/or voice recognition; an infrared, color, stereoscopic, and/or depth camera for machine vision and/or gesture recognition; a head tracker, eye tracker, accelerometer, and/or gyroscope for motion detection and/or intent recognition.
- communication subsystem 610 may be configured to communicatively couple computing system 600 with one or more other computing devices.
- Communication subsystem 610 may include wired and/or wireless communication devices compatible with one or more different communication protocols.
- the communication subsystem may be configured for communication via personal-, local- and/or wide-area networks.
- the methods and processes disclosed herein may be configured to give users and/or any other humans control over any private and/or potentially sensitive data.
- data Whenever data is stored, accessed, and/or processed, the data may be handled in accordance with privacy and/or security standards.
- users or other stakeholders may designate how the data is to be used and/or stored.
- user data Whenever user data is collected for any purpose, the user data may only be collected with the utmost respect for user privacy (e.g., user data may be collected only when the user owning the data provides affirmative consent, and/or the user owning the data may be notified whenever the user data is collected).
- the user may opt-in and/or opt-out of data collection at any time. After data has been collected, users may issue a command to delete the data, and/or restrict access to the data. All potentially sensitive data optionally may be encrypted and/or, when feasible, anonymized, to further protect user privacy. Users may designate portions of data, metadata, or statistics/results of processing data for release to other parties, e.g., for further processing.
- Data that is private and/or confidential may be kept completely private, e.g., only decrypted temporarily for processing, or only decrypted for processing on a user device and otherwise stored in encrypted form. Users may hold and control encryption keys for the encrypted data. Alternately or additionally, users may designate a trusted third party to hold and control encry ption keys for the encry pted data, e.g., so as to provide access to the data to the user according to a suitable authentication protocol.
- the ML and/or Al components may make decisions based at least partially on training of the components with regard to training data. Accordingly, the ML and/or Al components may be trained on diverse, representative datasets that include sufficient relevant data for diverse users and/or populations of users. In particular, training data sets may be inclusive with regard to different human individuals and groups, so that as ML and/or Al components are trained, their performance is improved with regard to the user experience of the users and/or populations of users.
- ML and/or Al components may additionally be trained to make decisions so as to minimize potential bias towards human individuals and/or groups.
- Al systems when Al systems are used to assess any qualitative and/or quantitative information about human individuals or groups, they may be trained so as to be invariant to differences between the individuals or groups that are not intended to be measured by the qualitative and/or quantitative assessment, e.g., so that any decisions are not influenced in an unintended fashion by differences among individuals and groups.
- ML and/or Al components may be designed to provide context as to how they operate, so that implementers of ML and/or Al systems can be accountable for decisions/assessments made by the systems.
- ML and/or Al systems may be configured for replicable behavior, e.g., when they make pseudo-random decisions, random seeds may be used and recorded to enable replicating the decisions later.
- data used for training and/or testing ML and/or Al systems may be curated and maintained to facilitate future investigation of the behavior of the ML and/or Al systems with regard to the data.
- ML and/or Al systems may be continually monitored to identify potential bias, errors, and/or unintended outcomes.
- a method for computer memory access comprises: during execution of a machine learning model, receiving an input vector for multiplication with a matrix of network weight values, wherein each network weight value of the matrix of network weight values is stored in computer memory using a stored quantity (S) of bits; for a network weight value of the matrix of network weight values, determining a representation quantity (R) of bits to be used for representing the network weight value during multiplication with a corresponding vector value of the input vector, based at least in part on a magnitude of the corresponding vector value; and retrieving R bits of the network weight value from the computer memory for multiplication with the corresponding vector value.
- S stored quantity
- R representation quantity
- R is a smaller number of bits than S, such that at least some bits of the network weight value are stored in the computer memory and not retrieved for multiplication with the corresponding vector value.
- the method further comprises, for a second network weight value of the matrix of network weight values, determining a second representation quantity’ (R’) of bits to be used for representing the second network weight value during multiplication with a second corresponding vector value of the input vector, based at least in part on a magnitude of the second corresponding vector value.
- the corresponding vector value is smaller than the second corresponding vector value, and wherein R is a smaller number of bits than R’. In this example or any other example.
- R’ is equal to S, such that all stored bits of the second network weight value are retrieved for multiplication w ith the second corresponding vector value.
- the corresponding vector value of the input vector is equal to zero, and R is equal to zero.
- R is further determined based at least in part on a difference between the corresponding vector value and other vector values of the input vector.
- R is relatively larger based at least in part on determining that the corresponding vector value is relatively higher than an average vector value of the input vector.
- R is further determined based at least in part on a power consumption policy of the computing device.
- the matrix of network weight values are stored in the computer memory such that network weight values in a same row of the matrix are stored in a same memory row or memory page of the computer memory.
- the same memoiy' row or memory' page is organized beginning with most significant bits for each network weight value, and ending with least significant bits for each network weight value.
- the same memory row or memory page is organized beginning with sign bits, followed by exponent bits, and ending with mantissa bits for each network value stored in the same memoi ' row or memory page.
- the machine learning model is a transformer-based language model.
- the input vector represents tokens of a natural language input.
- the input vector represents intermediate result vectors inside hidden layers of the transformer-based language model.
- the computer memory' includes one or more of dynamic random-access memoiy (DRAM), flash memory, and static random-access memory (SRAM).
- DRAM dynamic random-access memoiy
- SRAM static random-access memory
- a computing system comprises: a logic subsystem; and a storage subsystem including computer memory', the storage subsystem holding instructions executable by the logic subsystem to: during execution of a machine learning model, receive an input vector for multiplication with a matrix of network weight values, wherein each network weight value of the matrix of network weight values is stored in the computer memory using a stored quantity (S) of bits; for a net vork weight value of the matrix of netyvork weight values, determine a representation quantity' (R) of bits to be used for representing the network weight value during multiplication with a corresponding vector value of the input vector, based at least in part on a magnitude of the corresponding vector value; and retrieve R bits of the network weight value from the computer memory for multiplication with the input vector.
- S stored quantity
- R representation quantity'
- R is a smaller number of bits than S, such that at least some bits of the network weight value are stored in the computer memory and not retrieved for multiplication with the corresponding vector value.
- the instructions are further executable to, for a second network weight value of the matrix of network weight values, determine a second representation quantity' (R’) of bits to be used for representing the second netyvork yveight value during multiplication with a second corresponding vector value of the input vector, based at least in part on a magnitude of the second corresponding vector value, wherein the corresponding vector value is smaller than the second corresponding vector value, and wherein R is a smaller number of bits than R’.
- a method for computer memory access comprises: during execution of a machine learning model, receiving an input vector for multiplication with a matrix of network weight values, wherein each network weight value of the matrix of network weight values is stored in computer memory 7 using a stored quantity (S) of bits; for a network weight value of the matrix of network weight values, determining a representation quantity (R) of bits to be used for representing the network weight value during multiplication with a first corresponding vector value of the input vector, based at least in part on a magnitude of the first corresponding vector value, wherein R is a smaller number of bits than S; retrieving R bits of the network weight value from the computer memory for multiplication with the first corresponding vector value, such that at least some bits of the network weight value are stored in the computer memory and not retrieved for multiplication with the first corresponding vector value; and retrieving S bits of a second network weight value from the computer memory for multiplication with a second corresponding vector value of the input vector, the second corresponding vector value being larger than the first corresponding vector
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Pure & Applied Mathematics (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Databases & Information Systems (AREA)
- Algebra (AREA)
- Neurology (AREA)
- Complex Calculations (AREA)
Abstract
Description
Claims
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP24734659.6A EP4724915A1 (en) | 2023-06-09 | 2024-05-24 | Computer memory access for machine learning models |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/332,683 | 2023-06-09 | ||
| US18/332,683 US20240411691A1 (en) | 2023-06-09 | 2023-06-09 | Computer memory access for machine learning models |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024253871A1 true WO2024253871A1 (en) | 2024-12-12 |
Family
ID=91585906
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2024/030905 Ceased WO2024253871A1 (en) | 2023-06-09 | 2024-05-24 | Computer memory access for machine learning models |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20240411691A1 (en) |
| EP (1) | EP4724915A1 (en) |
| WO (1) | WO2024253871A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11900244B1 (en) * | 2019-09-30 | 2024-02-13 | Amazon Technologies, Inc. | Attention-based deep reinforcement learning for autonomous agents |
| US12531129B1 (en) * | 2025-06-27 | 2026-01-20 | Mythic, Inc. | Systems and methods for implementing a feedback-informed memory programming of an integrated circuit |
-
2023
- 2023-06-09 US US18/332,683 patent/US20240411691A1/en active Pending
-
2024
- 2024-05-24 WO PCT/US2024/030905 patent/WO2024253871A1/en not_active Ceased
- 2024-05-24 EP EP24734659.6A patent/EP4724915A1/en active Pending
Non-Patent Citations (6)
| Title |
|---|
| "Floating point bit-sequential arithmetic units", 15 July 1988, LEHIGH UNIVERSITY, article BLAKER DAVID MARK: "Floating point bit-sequential arithmetic units", pages: 1 - 80, XP093207793 * |
| BILANIUK OLEXA ET AL: "Bit-Slicing FPGA Accelerator for Quantized Neural Networks", 2019 IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS (ISCAS), IEEE, 26 May 2019 (2019-05-26), pages 1 - 5, XP033574086, ISSN: 2158-1525, ISBN: 978-1-7281-3320-1, [retrieved on 20190429], DOI: 10.1109/ISCAS.2019.8702332 * |
| BURIC MISHA R. ET AL: "Bit-Serial Inner Product Processors in VLSI", 31 January 1981 (1981-01-31), pages 155 - 164, XP055875769, Retrieved from the Internet <URL:https://core.ac.uk/download/pdf/33117943.pdf> * |
| CHANGHUN LEE ET AL: "OWQ: Lessons learned from activation outliers for weight quantization in large language models", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 4 June 2023 (2023-06-04), XP091529515 * |
| JI LIN ET AL: "AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 1 June 2023 (2023-06-01), XP091526528 * |
| TIM DETTMERS ET AL: "SpQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compression", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 5 June 2023 (2023-06-05), XP091530781 * |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4724915A1 (en) | 2026-04-15 |
| US20240411691A1 (en) | 2024-12-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11216459B2 (en) | Multi-layer semantic search | |
| CN111951805B (en) | A text data processing method and device | |
| CN112487182B (en) | Training method of text processing model, text processing method and device | |
| US20230021555A1 (en) | Model training based on parameterized quantum circuit | |
| US9807473B2 (en) | Jointly modeling embedding and translation to bridge video and language | |
| EP3841529B1 (en) | Scalable and compressive neural network data storage system | |
| US10943068B2 (en) | N-ary relation prediction over text spans | |
| CN112580369A (en) | Sentence repeating method, method and device for training sentence repeating model | |
| CN112633419A (en) | Small sample learning method and device, electronic equipment and storage medium | |
| WO2024253871A1 (en) | Computer memory access for machine learning models | |
| US12299392B2 (en) | Text processing method and apparatus for error correction of a plurality of types of non-words and real words | |
| CN112307243B (en) | Method and apparatus for retrieving images | |
| JP7651006B2 (en) | Method and apparatus for generating a caption generator and method and apparatus for outputting a caption - Patents.com | |
| KR20210152569A (en) | Image processing method, image processing apparatus, electronic device and storage medium | |
| CN110263218B (en) | Video description text generation method, device, device and medium | |
| US20170161275A1 (en) | System and method for incorporating new terms in a term-vector space from a semantic lexicon | |
| WO2020151175A1 (en) | Method and device for text generation, computer device, and storage medium | |
| EP4699012A1 (en) | Using fixed-weight language models to create and interact with a retrieval index | |
| CN114840734A (en) | Training method of multi-modal representation model, cross-modal retrieval method and device | |
| KR20240132702A (en) | Method for multi-modal embedding and system thereof | |
| WO2024076446A1 (en) | Computerized question answering based on evidence chains | |
| CN117852542A (en) | Multimodal named entity recognition method, device, storage medium and electronic device | |
| JP7596559B2 (en) | Neural network with feedforward spatial transformation units | |
| CN117917702A (en) | A data processing method and related equipment | |
| CN112307738B (en) | Method and apparatus for processing text |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24734659 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2024734659 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2024734659 Country of ref document: EP Effective date: 20260109 |
|
| ENP | Entry into the national phase |
Ref document number: 2024734659 Country of ref document: EP Effective date: 20260109 |
|
| ENP | Entry into the national phase |
Ref document number: 2024734659 Country of ref document: EP Effective date: 20260109 |
|
| ENP | Entry into the national phase |
Ref document number: 2024734659 Country of ref document: EP Effective date: 20260109 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2024734659 Country of ref document: EP |


