Skip to contents

Returns a gemma module which can then be prompted.

Usage

gemma(tokenizer, compressed_weights, model, ...)

Value

Returns a gemma module interface to an underlying C++ class.

Examples

if (FALSE) {
m = gemma(
  tokenizer="~/Scratch/gemma/tokenizer.spm",
  compressed_weights="~/Scratch/gemma/2b-it-sfp.sbs",
  model="2b-it",
  multiturn="1"
)

m$print_config()

m$prompt("What are top 5 places I should visit in Durham, NC?")

m$prompt("Which of the previous locations are best for kids?")

m$prompts
m$responses
}