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.
03.1k
1let crypto = require('crypto')2 3let { urlAlphabet } = require('./url-alphabet/index.cjs')4 5const POOL_SIZE_MULTIPLIER = 1286let pool, poolOffset7 8let fillPool = bytes => {9 if (bytes < 0 || bytes > 1024) throw new RangeError('Wrong ID size')10 if (!pool || pool.length < bytes) {11 pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)12 crypto.randomFillSync(pool)13 poolOffset = 014 } else if (poolOffset + bytes > pool.length) {15 crypto.randomFillSync(pool)16 poolOffset = 017 }18 poolOffset += bytes19}20 21let random = bytes => {22 fillPool((bytes |= 0))23 return pool.subarray(poolOffset - bytes, poolOffset)24}25 26let customRandom = (alphabet, defaultSize, getRandom) => {27 let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 128 29 30 let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)31 32 return (size = defaultSize) => {33 if (size <= 0) return ''34 let id = ''35 while (true) {36 let bytes = getRandom(step)37 let i = step38 while (i--) {39 id += alphabet[bytes[i] & mask] || ''40 if (id.length === size) return id41 }42 }43 }44}45 46let customAlphabet = (alphabet, size = 21) =>47 customRandom(alphabet, size, random)48 49let nanoid = (size = 21) => {50 fillPool((size |= 0))51 let id = ''52 for (let i = poolOffset - size; i < poolOffset; i++) {53 id += urlAlphabet[pool[i] & 63]54 }55 return id56}57 58module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }59 