Skip to contents

set_repeat_penalty sets the repeat penalty related to the model in the workflow.

Usage

set_repeat_penalty(workflow_obj, repeat_penalty)

Arguments

workflow_obj

an ai_workflow object created by ai_workflow() in the first place.

repeat_penalty

the repeat penalty value used by the model. A value of 1 means there is no penalty. A value higher than 1 means there is increased penalty on repetition of tokens.

Details

Set the repeat_penalty to be used by the model in the workflow.

Examples

my_workflow <- ai_workflow() |> 
set_model(model_name="llama3:8b-instruct-q5_0") |> 
set_repeat_penalty(1.3)