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
1/**2 * @import {Code} from 'micromark-util-types'3 */4 5/**6 * Check whether the character code represents an ASCII alpha (`a` through `z`,7 * case insensitive).8 *9 * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.10 *11 * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)12 * to U+005A (`Z`).13 *14 * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)15 * to U+007A (`z`).16 *17 * @param code18 * Code.19 * @returns {boolean}20 * Whether it matches.21 */22export const asciiAlpha = regexCheck(/[A-Za-z]/);23 24/**25 * Check whether the character code represents an ASCII alphanumeric (`a`26 * through `z`, case insensitive, or `0` through `9`).27 *28 * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha29 * (see `asciiAlpha`).30 *31 * @param code32 * Code.33 * @returns {boolean}34 * Whether it matches.35 */36export const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);37 38/**39 * Check whether the character code represents an ASCII atext.40 *41 * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in42 * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),43 * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F44 * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E45 * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE46 * (`{`) to U+007E TILDE (`~`).47 *48 * See:49 * **\[RFC5322]**:50 * [Internet Message Format](https://tools.ietf.org/html/rfc5322).51 * P. Resnick.52 * IETF.53 *54 * @param code55 * Code.56 * @returns {boolean}57 * Whether it matches.58 */59export const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);60 61/**62 * Check whether a character code is an ASCII control character.63 *64 * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)65 * to U+001F (US), or U+007F (DEL).66 *67 * @param {Code} code68 * Code.69 * @returns {boolean}70 * Whether it matches.71 */72export function asciiControl(code) {73 return (74 // Special whitespace codes (which have negative values), C0 and Control75 // character DEL76 code !== null && (code < 32 || code === 127)77 );78}79 80/**81 * Check whether the character code represents an ASCII digit (`0` through `9`).82 *83 * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to84 * U+0039 (`9`).85 *86 * @param code87 * Code.88 * @returns {boolean}89 * Whether it matches.90 */91export const asciiDigit = regexCheck(/\d/);92 93/**94 * Check whether the character code represents an ASCII hex digit (`a` through95 * `f`, case insensitive, or `0` through `9`).96 *97 * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex98 * digit, or an ASCII lower hex digit.99 *100 * An **ASCII upper hex digit** is a character in the inclusive range U+0041101 * (`A`) to U+0046 (`F`).102 *103 * An **ASCII lower hex digit** is a character in the inclusive range U+0061104 * (`a`) to U+0066 (`f`).105 *106 * @param code107 * Code.108 * @returns {boolean}109 * Whether it matches.110 */111export const asciiHexDigit = regexCheck(/[\dA-Fa-f]/);112 113/**114 * Check whether the character code represents ASCII punctuation.115 *116 * An **ASCII punctuation** is a character in the inclusive ranges U+0021117 * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT118 * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT119 * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).120 *121 * @param code122 * Code.123 * @returns {boolean}124 * Whether it matches.125 */126export const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);127 128/**129 * Check whether a character code is a markdown line ending.130 *131 * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN132 * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).133 *134 * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE135 * RETURN (CR) are replaced by these virtual characters depending on whether136 * they occurred together.137 *138 * @param {Code} code139 * Code.140 * @returns {boolean}141 * Whether it matches.142 */143export function markdownLineEnding(code) {144 return code !== null && code < -2;145}146 147/**148 * Check whether a character code is a markdown line ending (see149 * `markdownLineEnding`) or markdown space (see `markdownSpace`).150 *151 * @param {Code} code152 * Code.153 * @returns {boolean}154 * Whether it matches.155 */156export function markdownLineEndingOrSpace(code) {157 return code !== null && (code < 0 || code === 32);158}159 160/**161 * Check whether a character code is a markdown space.162 *163 * A **markdown space** is the concrete character U+0020 SPACE (SP) and the164 * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).165 *166 * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is167 * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL168 * SPACE (VS) characters, depending on the column at which the tab occurred.169 *170 * @param {Code} code171 * Code.172 * @returns {boolean}173 * Whether it matches.174 */175export function markdownSpace(code) {176 return code === -2 || code === -1 || code === 32;177}178 179// Size note: removing ASCII from the regex and using `asciiPunctuation` here180// In fact adds to the bundle size.181/**182 * Check whether the character code represents Unicode punctuation.183 *184 * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,185 * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`186 * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`187 * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII188 * punctuation (see `asciiPunctuation`).189 *190 * See:191 * **\[UNICODE]**:192 * [The Unicode Standard](https://www.unicode.org/versions/).193 * Unicode Consortium.194 *195 * @param code196 * Code.197 * @returns198 * Whether it matches.199 */200export const unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);201 202/**203 * Check whether the character code represents Unicode whitespace.204 *205 * Note that this does handle micromark specific markdown whitespace characters.206 * See `markdownLineEndingOrSpace` to check that.207 *208 * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,209 * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),210 * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).211 *212 * See:213 * **\[UNICODE]**:214 * [The Unicode Standard](https://www.unicode.org/versions/).215 * Unicode Consortium.216 *217 * @param code218 * Code.219 * @returns220 * Whether it matches.221 */222export const unicodeWhitespace = regexCheck(/\s/);223 224/**225 * Create a code check from a regex.226 *227 * @param {RegExp} regex228 * Expression.229 * @returns {(code: Code) => boolean}230 * Check.231 */232function regexCheck(regex) {233 return check;234 235 /**236 * Check whether a code matches the bound regex.237 *238 * @param {Code} code239 * Character code.240 * @returns {boolean}241 * Whether the character code matches the bound regex.242 */243 function check(code) {244 return code !== null && code > -1 && regex.test(String.fromCharCode(code));245 }246}