
PrefixLM suffix negative log-likelihood (Kamath Eq 9.11)
Source:R/kamath_llm2_native.R
morie_kamath_ch9_simvlm_prefixlm.RdSummed -log p over the suffix, averaged over sequences. T_p is a
0-BASED prefix length, so the suffix starts at column T_p.
Examples
morie_kamath_ch9_simvlm_prefixlm(NULL, matrix(c(0.5, 0.5, 0.5,
0.25, 0.25, 0.5), 2), 1)
#> $estimate
#> [1] 2.079442
#>
#> $per_sequence
#> [1] 2.079442 2.079442
#>
#> $prefix_length
#> [1] 1
#>
#> $n_suffix_tokens
#> [1] 2
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "PrefixLM suffix negative log-likelihood (Kamath Eq 9.11)"
#>