Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.js170 linesDownload Raw Back to dev
1/**2 * @import {3 *   Code,4 *   Effects,5 *   State,6 *   TokenType7 * } from 'micromark-util-types'8 */9 10import {factorySpace} from 'micromark-factory-space'11import {markdownLineEnding} from 'micromark-util-character'12import {codes, constants, types} from 'micromark-util-symbol'13 14/**15 * Parse titles.16 *17 * ###### Examples18 *19 * ```markdown20 * "a"21 * 'b'22 * (c)23 * "a24 * b"25 * 'a26 *     b'27 * (a\)b)28 * ```29 *30 * @param {Effects} effects31 *   Context.32 * @param {State} ok33 *   State switched to when successful.34 * @param {State} nok35 *   State switched to when unsuccessful.36 * @param {TokenType} type37 *   Type of the whole title (`"a"`, `'b'`, `(c)`).38 * @param {TokenType} markerType39 *   Type for the markers (`"`, `'`, `(`, and `)`).40 * @param {TokenType} stringType41 *   Type for the value (`a`).42 * @returns {State}43 *   Start state.44 */45export function factoryTitle(effects, ok, nok, type, markerType, stringType) {46  /** @type {NonNullable<Code>} */47  let marker48 49  return start50 51  /**52   * Start of title.53   *54   * ```markdown55   * > | "a"56   *     ^57   * ```58   *59   * @type {State}60   */61  function start(code) {62    if (63      code === codes.quotationMark ||64      code === codes.apostrophe ||65      code === codes.leftParenthesis66    ) {67      effects.enter(type)68      effects.enter(markerType)69      effects.consume(code)70      effects.exit(markerType)71      marker = code === codes.leftParenthesis ? codes.rightParenthesis : code72      return begin73    }74 75    return nok(code)76  }77 78  /**79   * After opening marker.80   *81   * This is also used at the closing marker.82   *83   * ```markdown84   * > | "a"85   *      ^86   * ```87   *88   * @type {State}89   */90  function begin(code) {91    if (code === marker) {92      effects.enter(markerType)93      effects.consume(code)94      effects.exit(markerType)95      effects.exit(type)96      return ok97    }98 99    effects.enter(stringType)100    return atBreak(code)101  }102 103  /**104   * At something, before something else.105   *106   * ```markdown107   * > | "a"108   *      ^109   * ```110   *111   * @type {State}112   */113  function atBreak(code) {114    if (code === marker) {115      effects.exit(stringType)116      return begin(marker)117    }118 119    if (code === codes.eof) {120      return nok(code)121    }122 123    // Note: blank lines can’t exist in content.124    if (markdownLineEnding(code)) {125      // To do: use `space_or_tab_eol_with_options`, connect.126      effects.enter(types.lineEnding)127      effects.consume(code)128      effects.exit(types.lineEnding)129      return factorySpace(effects, atBreak, types.linePrefix)130    }131 132    effects.enter(types.chunkString, {contentType: constants.contentTypeString})133    return inside(code)134  }135 136  /**137   *138   *139   * @type {State}140   */141  function inside(code) {142    if (code === marker || code === codes.eof || markdownLineEnding(code)) {143      effects.exit(types.chunkString)144      return atBreak(code)145    }146 147    effects.consume(code)148    return code === codes.backslash ? escape : inside149  }150 151  /**152   * After `\`, at a special character.153   *154   * ```markdown155   * > | "a\*b"156   *      ^157   * ```158   *159   * @type {State}160   */161  function escape(code) {162    if (code === marker || code === codes.backslash) {163      effects.consume(code)164      return inside165    }166 167    return inside(code)168  }169}170 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai