Skip to content

Main content

Transformer Ffn Expansion Width Factor Tool

Calculate transformer ffn expansion width factor from explicit caller-supplied inputs.

Loading tool…

Description

Return aligned feed-forward expansion width.

Language-model bookkeeping separates scores, probabilities, dimensions, capacity and positional transforms. A local ranking, padding or coordinate operation can illustrate a model component without running a model, sampling a token, fitting calibration or demonstrating output quality.

Return aligned feed-forward expansion width.

When to use this tool

Use Transformer Ffn Expansion Width Factor when checking the stated model-dimension, ranking, probability-prefix or local transform convention.

How to use the tool and how it works

  1. Enter modelWidth, expansion, alignment. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read rawWidth, alignedWidth, actualExpansion. Use the output convention below.

Return aligned feed-forward expansion width. Require positive whole modelWidth/alignment and expansion > 0; raw = width*expansion, aligned rounds upward to an alignment multiple, actualExpansion = aligned/modelWidth.1

Input fieldMeaning and unitsAccepted input
modelWidthModel WidthRequired. Safe integer; minimum 1.
expansionExpansionRequired. Finite number; strictly above 0.
alignmentAlignmentRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
rawWidthRaw WidthRequired. Finite number.
alignedWidthAligned WidthRequired. Safe integer.
actualExpansionActual ExpansionRequired. Finite number.
json
{
  "input": {
    "modelWidth": 128,
    "expansion": 4,
    "alignment": 64
  },
  "output": {
    "rawWidth": 512,
    "alignedWidth": 512,
    "actualExpansion": 4
  }
}

Limitations and assumptions

  • This is dimension bookkeeping, not a trained transformer, parameter count, memory estimate or recommended architecture.
  • 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

Use a complete implementation with verified tensor/token conventions and appropriate model evaluation when actual inference, memory, sampling or quality results are required.

References

  1. Calculation and input contract: artificial-intelligence/transformer-ffn-expansion-width-factor — tool.io

Similar or alternative tools