Skip to content

Main content

Embedding Cosine Temperature Logit Term Tool

Calculate embedding cosine temperature logit term from explicit caller-supplied inputs.

Loading tool…

Description

Return embedding cosine and its temperature-scaled logit.

Log probabilities, logits, guidance scales and sequence scores use different conventions. Temperature changes logit scale, an additive bias changes odds, and a sequence-length penalty changes ranking. One supplied scalar contribution can be checked independently of a complete probability distribution or model-generation process.

Return embedding cosine and its temperature-scaled logit.

When to use this tool

Use Embedding Cosine Temperature Logit Term when checking the stated probability, score, guidance or scale contribution.

How to use the tool and how it works

  1. Enter first, second, temperature. Follow any array-alignment requirements below. 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 cosine, logit. Use the output convention below.

Return embedding cosine and its temperature-scaled logit. Require aligned nonzero vectors and temperature > 0; cosine = dot/(normFirst*normSecond), logit = cosine/temperature.1

Input fieldMeaning and unitsAccepted input
firstFirstRequired. Array of finite number; maximum items 256.
secondSecondRequired. Array of finite number; maximum items 256.
temperatureTemperatureRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
cosineCosineRequired. Finite number.
logitLogitRequired. Finite number.
json
{
  "input": {
    "first": [
      1,
      0
    ],
    "second": [
      1,
      1
    ],
    "temperature": 0.5
  },
  "output": {
    "cosine": 0.7071067811865475,
    "logit": 1.414213562373095
  }
}

Limitations and assumptions

  • No learned scale, calibration or embedding inference occurs; vectors and compatible meaning are supplied.
  • 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 the full distribution and model-specific decoding or training objective for normalized probabilities, preference optimization or actual generation.

References

  1. Calculation and input contract: artificial-intelligence/embedding-cosine-temperature-logit-term — tool.io

Similar or alternative tools