Download definitions/softmax/softmax_fp32.json from l3lab/KernelShift: direct link, hf CLI and curl.
- Browser
- Download file 954 Bytes
-
https://huggingface.co/datasets/l3lab/KernelShift/resolve/main/definitions/softmax/softmax_fp32.json
- Command line
-
hf download hf://datasets/l3lab/KernelShift/definitions/softmax/softmax_fp32.json
-
curl -L -o softmax_fp32.json https://huggingface.co/datasets/l3lab/KernelShift/resolve/main/definitions/softmax/softmax_fp32.json
954 Bytes
| { | |
| "name": "softmax_fp32", | |
| "op_type": "softmax", | |
| "description": "1-D softmax, float32 in and out: y = exp(x - max(x)) / sum(exp(x - max(x))) over a vector of length N (e.g. one attention row or one vocabulary of logits). N varies per workload. Judged by SQNR against the baseline: outputs are about 1/N, below the default absolute tolerance. Baseline: KleidiAI kai_softmax_f32_f32_1d_sve_fexpa (SVE FEXPA exponential, any vector length).", | |
| "tags": [ | |
| "status:active", | |
| "baseline-solution:kleidiai", | |
| "correctness:sqnr" | |
| ], | |
| "axes": { | |
| "N": { | |
| "type": "var" | |
| } | |
| }, | |
| "inputs": { | |
| "x": { | |
| "shape": [ | |
| "N" | |
| ], | |
| "dtype": "float32" | |
| } | |
| }, | |
| "outputs": { | |
| "y": { | |
| "shape": [ | |
| "N" | |
| ], | |
| "dtype": "float32" | |
| } | |
| }, | |
| "reference": "import numpy as np\n\n\ndef run(x):\n x = x.astype(np.float64)\n e = np.exp(x - x.max())\n return (e / e.sum()).astype(np.float32)\n" | |
| } | |