Skip to content

Instantly share code, notes, and snippets.

@nickovchinnikov
Last active June 9, 2024 13:20
Show Gist options
  • Save nickovchinnikov/cf00995257fc6a30875969081510f278 to your computer and use it in GitHub Desktop.
Save nickovchinnikov/cf00995257fc6a30875969081510f278 to your computer and use it in GitHub Desktop.
inference
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"During inference, the model generates the sequence one token at a time, using the previously predicted tokens as input:\n",
"\n",
"$$\\hat{x}_t = f(\\hat{x}_{t-1}, \\dots, \\hat{x}_{t-n})$$\n",
"\n",
"where $f$ is the AR model, and $\\hat{x}_{t-1}, \\hat{x}_{t-2}, \\ldots, \\hat{x}_{t-n}$ are the previously predicted tokens. \n",
"\n",
"Using sum notation and AR model definition this can be written as:\n",
"\n",
"$$\\hat{x}_t = b + \\sum_{i=1}^n \\varphi_i \\hat{x}_{t-i}$$"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment