Typedef GenieSampler_UserDataCallback_t

Typedef Documentation

typedef void (*GenieSampler_UserDataCallback_t)(const uint32_t logitsSize, const void *logits, const uint32_t numTokens, int32_t *tokens, const void *userData)

A client-defined callback function to set sampler process implementation.

Param logitsSize

[in] Size of output logits in logits array

Param logits

[in] Output logits from engine execution

Param numTokens

[in] Number of tokens to be returned.

Param userData

[in] Void pointer to add user data pertaining to callback function.

Param tokens

[out] pointer to array of tokens based on numTokens argument passed in input