Description
Return exact trainable parameter count for two low-rank factors.
A low-rank update represents a weight change as the product of two smaller matrices, with a scaling convention applied to that product. Counting their entries and evaluating one updated weight are distinct operations; neither trains an adapter or checks the quality of an adapted model.
Return exact trainable parameter count for two low-rank factors.
When to use this tool
Use Artificial Intelligence: LoRA Layer Trainable Parameter Count when checking a low-rank update entry or its stated matrix-parameter count.
How to use the tool and how it works
- Enter inputDimension, outputDimension, rank. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Return exact trainable parameter count for two low-rank factors. Require input/output dimensions 1..1e9 and whole rank 1..min(dimensions); trainableParameters = rank*(inputDimension+outputDimension), serialized as decimal text.1
LoRA represents a weight update using low-rank factors. These helpers cover one factor-product entry or its parameter count, rather than training an adapter or selecting an effective rank.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| inputDimension | Input Dimension | Required. Safe integer. |
| outputDimension | Output Dimension | Required. Safe integer. |
| rank | Rank | Required. Safe integer. Calculation range: 1 through Math.min(inputDimension, outputDimension, inclusive. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the returned operation-specific members listed below. | Required. Object. |
| result.trainableParameters | Exact decimal-integer text for rank*(inputDimension+outputDimension), excluding bias and optimizer state. | Calculated result member: string. |
{
"input": {
"inputDimension": 8,
"outputDimension": 12,
"rank": 2
},
"output": {
"result": {
"trainableParameters": "40"
}
}
} Limitations and assumptions
- This excludes biases, base weights and additional adapter parameters; no model allocation or training is executed.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect the full adapter configuration, matrix orientation, rank and scaling convention for implementation-specific training or inference.
References
-
Calculation and input contract: artificial-intelligence/lora-layer-trainable-parameter-count — tool.io
-
LoRA: Low-Rank Adaptation of Large Language Models — Edward J. Hu and coauthors
Similar or alternative tools
- LoRA Update One Weight Entry Term
Return one rank-scaled low-rank update entry.
- Artificial Intelligence: Kv Cache Token Byte Count Tool
Count exact dense key-plus-value cache bytes for supplied token/layer/KV-head geometry; excludes batching, alignment, metadata, quantization overhead and allocator fragmentation.