ggerganov / ggml

Tensor library for machine learning
MIT License
11.25k stars 1.05k forks source link

Unexpected behavior for GGML_MEAN #1005

Open JohannesGaessler opened 2 weeks ago

JohannesGaessler commented 2 weeks ago

The usual behavior for the "mean" operation in numerical frameworks is a reduction of a tensor to a single value. However, in GGML this operation instead calculates the mean per row. This is I think unexpected behavior and the naming is also inconsistent with GGML_SUM (per tensor) and GGML_SUM_ROWS (per row).