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
1import defineFunction from "../defineFunction";2import ParseError from "../ParseError";3import {assertNodeType} from "../parseNode";4 5// \@char is an internal function that takes a grouped decimal argument like6// {123} and converts into symbol with code 123. It is used by the *macro*7// \char defined in macros.js.8defineFunction({9 type: "textord",10 names: ["\\@char"],11 props: {12 numArgs: 1,13 allowedInText: true,14 },15 handler({parser}, args) {16 const arg = assertNodeType(args[0], "ordgroup");17 const group = arg.body;18 let number = "";19 for (let i = 0; i < group.length; i++) {20 const node = assertNodeType(group[i], "textord");21 number += node.text;22 }23 let code = parseInt(number);24 let text;25 if (isNaN(code)) {26 throw new ParseError(`\\@char has non-numeric argument ${number}`);27 // If we drop IE support, the following code could be replaced with28 // text = String.fromCodePoint(code)29 } else if (code < 0 || code >= 0x10ffff) {30 throw new ParseError(`\\@char with invalid code point ${number}`);31 } else if (code <= 0xffff) {32 text = String.fromCharCode(code);33 } else { // Astral code point; split into surrogate halves34 code -= 0x10000;35 text = String.fromCharCode((code >> 10) + 0xd800,36 (code & 0x3ff) + 0xdc00);37 }38 return {39 type: "textord",40 mode: parser.mode,41 text: text,42 };43 },44});45 