Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03k
1import ascending from "./ascending.js";2import {ascendingDefined, compareDefined} from "./sort.js";3 4export default function rank(values, valueof = ascending) {5 if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");6 let V = Array.from(values);7 const R = new Float64Array(V.length);8 if (valueof.length !== 2) V = V.map(valueof), valueof = ascending;9 const compareIndex = (i, j) => valueof(V[i], V[j]);10 let k, r;11 values = Uint32Array.from(V, (_, i) => i);12 // Risky chaining due to Safari 14 https://github.com/d3/d3-array/issues/12313 values.sort(valueof === ascending ? (i, j) => ascendingDefined(V[i], V[j]) : compareDefined(compareIndex));14 values.forEach((j, i) => {15 const c = compareIndex(j, k === undefined ? j : k);16 if (c >= 0) {17 if (k === undefined || c > 0) k = j, r = i;18 R[j] = r;19 } else {20 R[j] = NaN;21 }22 });23 return R;24}25 