
DALL-E autoregressive image-token generation (hmdale)
Source:R/geron_w4a_native.R
morie_geron_dalle.RdPer-step scoring is delegated to
morie_geron_dalle_autoregressive_token; this wrapper runs the
generation loop and reshapes into the token grid.
Usage
morie_geron_dalle(
text,
model,
n_image_tokens = 4,
temperature = 1,
top_k = NULL,
image_vocab = NULL,
grid = NULL
)Examples
skewed <- function(ctx) c(0, 5)
morie_geron_dalle(0, skewed, n_image_tokens = 4)
#> $image_tokens
#> [1] 1 1 1 1
#>
#> $token_grid
#> [,1] [,2]
#> [1,] 1 1
#> [2,] 1 1
#>
#> $log_likelihood
#> [1] -0.02686139
#>
#> $token_logprobs
#> [1] -0.006715348 -0.006715348 -0.006715348 -0.006715348
#>
#> $perplexity
#> [1] 1.006738
#>
#> $context
#> [1] 0 1 1 1 1
#>
#> $prompt
#> [1] 0
#>
#> $n_steps
#> [1] 4
#>
#> $vocab_size
#> [1] 2
#>
#> $grid
#> [1] 2 2
#>
#> $temperature
#> [1] 1
#>
#> $estimate
#> [1] -0.02686139
#>
#> $n
#> [1] 4
#>
#> $method
#> [1] "autoregressive image-token generation; per-step scoring delegated to grdal"
#>