
NExT-GPT any-to-any pipeline (Kamath Ch 9)
Source:R/kamath_llm2_native.R
morie_kamath_nextgpt_any2any.Rdencoders -> llm -> decoders, with every contract checked. No input may be silently dropped.
Usage
morie_kamath_nextgpt_any2any(
inputs_by_modality,
encoders,
llm,
decoders,
output_modalities = NULL
)Examples
f <- morie_kamath_ragas_faithfulness(c("the sky is blue", "the sky is green",
"grass grows"), "the sky is blue today and grass grows")
morie_kamath_nextgpt_any2any(list(img = 1, txt = 2), list(img = function(v) v *
10, txt = function(v) v * 100), function(f) sum(unlist(f)),
list(aud = function(s) s + 1))
#> $outputs
#> $outputs$aud
#> [1] 211
#>
#>
#> $features
#> $features$img
#> [1] 10
#>
#> $features$txt
#> [1] 200
#>
#>
#> $llm_state
#> [1] 210
#>
#> $input_modalities
#> [1] "img" "txt"
#>
#> $output_modalities
#> [1] "aud"
#>
#> $estimate
#> [1] 1
#>
#> $n
#> [1] 3
#>
#> $method
#> [1] "NExT-GPT any-to-any encode / LLM / decode pipeline"
#>