## Diagram: Draft Model Iteration and Rejection Sampling
### Overview
The image is a diagram illustrating a process involving a draft model, a target model, and recursive rejection sampling to generate an output token. The process is divided into iterations, with feedback loops and probability assessments at each stage.
### Components/Axes
* **Columns (Left to Right):**
* Draft Iteration & Input Token
* Draft Model & Probability
* Draft Token
* Target Model & Probability
* Recursive Rejection Sampling
* Output Token
* **Rows:** Represent iterations, visually separated by colored backgrounds (yellow, blue, orange, green).
* **Labels:**
* "draft iteration"
* "input token"
* "draft model probability"
* "draft token"
* "target model probability"
* "recursive rejection sampling"
* "output token"
* "draft model"
* "target model"
* "SBS" (located between the draft model probability and draft token columns)
* "feedback output tokens for each iteration" (located at the bottom of the draft model column)
* **Tokens:** Represented by numbered boxes (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10).
* **Probabilities:** Represented by "p" and "q" values with subscripts (p0, p1, p2, p3, p4, p5, p6, q0, q1, q2, q3, q4, q5, q6, q7, q8, q9).
* **Acceptance/Rejection Indicators:** Green checkmarks indicate acceptance, red "X" marks indicate rejection.
### Detailed Analysis
**Column 1: Draft Iteration & Input Token**
* Iteration 1 (Yellow): Input token 0.
* Iteration 2 (Blue): Input tokens 1, 2, 3.
* Iteration 3 (Orange): Input tokens 4, 5, 6.
**Column 2: Draft Model & Probability**
* The "draft model" block processes the input tokens.
* Each input token generates a draft model probability (p0, p1, p2, p3, p4, p5, p6).
**Column 3: Draft Token**
* The "SBS" (likely standing for "Sample-Based Search") block connects the draft model probabilities to draft tokens.
* Iteration 1 (Yellow): Draft token 1.
* Iteration 2 (Blue): Draft tokens 4, 5, 6.
* Iteration 3 (Orange): Draft tokens 7, 8, 9.
**Column 4: Target Model & Probability**
* The "target model" block processes the draft tokens.
* Each draft token generates a target model probability (q0, q1, q2, q3, q4, q5, q6, q7, q8, q9).
**Column 5: Recursive Rejection Sampling**
* Iteration 1 (Yellow):
* Token 0 is accepted (green checkmark) and leads to token 1.
* Probabilities q0 and p0 are compared.
* Iteration 2 (Blue):
* Token 4 is rejected (red "X").
* Token 5 is accepted (green checkmark).
* Probabilities q1, p1, q1', and p1' are compared.
* Iteration 3 (Orange):
* Token 7 is rejected (red "X").
* Token 8 is accepted (green checkmark).
* Probabilities q5, p5, q5', and p5' are compared.
* Token 10 is sampled based on q8.
**Column 6: Output Token**
* The final output tokens are 1, 5, 8, and 10.
### Key Observations
* The diagram illustrates an iterative process where a draft model generates candidate tokens, which are then evaluated by a target model.
* Recursive rejection sampling is used to refine the token selection based on the probabilities generated by both models.
* The "SBS" block appears to be a crucial component in connecting the draft model probabilities to the draft tokens.
* The feedback loop, indicated by "feedback output tokens for each iteration," suggests that the output tokens influence subsequent iterations.
### Interpretation
The diagram depicts a sophisticated approach to token generation, likely within a natural language processing or machine learning context. The use of a draft model allows for efficient generation of candidate tokens, while the target model provides a more refined evaluation. Recursive rejection sampling ensures that the selected tokens align with the desired probability distribution. The feedback loop enables the model to learn and adapt over time, improving the quality of the generated tokens. The process aims to generate a sequence of tokens that are both plausible (according to the draft model) and desirable (according to the target model). The SBS component likely plays a role in selecting the most promising candidate tokens from the draft model's output.