← Back to C-Kernel-Engine Docs Doxygen Source Documentation
Loading...
Searching...
No Matches
ckernel_repetition_penalty_checked.h
Go to the documentation of this file.
1#ifndef CKERNEL_REPETITION_PENALTY_CHECKED_H
2#define CKERNEL_REPETITION_PENALTY_CHECKED_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7/* Apply the Transformers sign-dependent repetition rule to the final row.
8 * Repeated IDs in history are penalized once. Rejected calls preserve output. */
10 const float *values, size_t values_elements,
11 size_t rows, size_t channels, size_t row_stride,
12 const int32_t *history, size_t history_elements, size_t history_count,
13 size_t penalty_numerator, size_t penalty_denominator,
14 float *output, size_t output_elements);
15
16#endif
int ck_repetition_penalty_last_row_checked_f32(const float *values, size_t values_elements, size_t rows, size_t channels, size_t row_stride, const int32_t *history, size_t history_elements, size_t history_count, size_t penalty_numerator, size_t penalty_denominator, float *output, size_t output_elements)