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# mri [](https://github.com/lukeed/mri/actions)2 3> Quickly scan for CLI flags and arguments4 5This is a [fast](#benchmarks) and lightweight alternative to [`minimist`](https://github.com/substack/minimist) and [`yargs-parser`](https://github.com/yargs/yargs-parser).6 7It only exists because I find that I usually don't need most of what `minimist` and `yargs-parser` have to offer. However, `mri` is similar _enough_ that it might function as a "drop-in replacement" for you, too!8 9See [Comparisons](#comparisons) for more info.10 11## Install12 13```sh14$ npm install --save mri15```16 17## Usage18 19```sh20$ demo-cli --foo --bar=baz -mtv -- hello world21```22 23```js24const mri = require('mri');25 26const argv = process.argv.slice(2);27 28mri(argv);29//=> { _: ['hello', 'world'], foo:true, bar:'baz', m:true, t:true, v:true }30 31mri(argv, { boolean:['bar'] });32//=> { _: ['baz', 'hello', 'world'], foo:true, bar:true, m:true, t:true, v:true }33 34mri(argv, {35 alias: {36 b: 'bar',37 foo: ['f', 'fuz']38 }39});40//=> { _: ['hello', 'world'], foo:true, f:true, fuz:true, b:'baz', bar:'baz', m:true, t:true, v:true }41```42 43## API44 45### mri(args, options)46Return: `Object`47 48#### args49Type: `Array`<br>50Default: `[]`51 52An array of arguments to parse. For CLI usage, send `process.argv.slice(2)`. See [`process.argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) for info.53 54#### options.alias55Type: `Object`<br>56Default: `{}`57 58An object of keys whose values are `String`s or `Array<String>` of aliases. These will be added to the parsed output with matching values.59 60#### options.boolean61Type: `Array|String`<br>62Default: `[]`63 64A single key (or array of keys) that should be parsed as `Boolean`s.65 66#### options.default67Type: `Object`<br>68Default: `{}`69 70An `key:value` object of defaults. If a default is provided for a key, its type (`typeof`) will be used to cast parsed arguments.71 72```js73mri(['--foo', 'bar']);74//=> { _:[], foo:'bar' }75 76mri(['--foo', 'bar'], {77 default: { foo:true, baz:'hello', bat:42 }78});79//=> { _:['bar'], foo:true, baz:'hello', bat:42 }80```81 82> **Note:** Because `--foo` has a default of `true`, its output is cast to a Boolean. This means that `foo=true`, making `'bar'` an extra argument (`_` key).83 84#### options.string85Type: `Array|String`<br>86Default: `[]`87 88A single key (or array of keys) that should be parsed as `String`s.89 90#### options.unknown91Type: `Function`<br>92Default: `undefined`93 94Callback that is run when a parsed flag has not been defined as a known key or alias. Its only parameter is the unknown flag itself; eg `--foobar` or `-f`.95 96Once an unknown flag is encountered, parsing will terminate, regardless of your return value.97 98> **Note:** `mri` _only_ checks for unknown flags if `options.unknown` **and** `options.alias` are populated. Otherwise, everything will be accepted.99 100 101## Comparisons102 103#### minimist104 105- `mri` is 5x faster (see [benchmarks](#benchmarks))106- Numerical values are cast as `Number`s when possible107 - A key (and its aliases) will always honor `opts.boolean` or `opts.string`108- Short flag groups are treated as `Boolean`s by default:109 ```js110 minimist(['-abc', 'hello']);111 //=> { _:[], a:'', b:'', c:'hello' }112 113 mri(['-abc', 'hello']);114 //=> { _:[], a:true, b:true, c:'hello' }115 ```116- The `opts.unknown` behaves differently:117 - Unlike `minimist`, `mri` will not continue continue parsing after encountering an unknown flag118- Missing `options`:119 - `opts.stopEarly`120 - `opts['--']`121- Ignores newlines (`\n`) within args (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L69-L80))122- Ignores slashBreaks within args (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L147-L157))123- Ignores dot-nested flags (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L180-L197))124 125#### yargs-parser126 127- `mri` is 40x faster (see [benchmarks](#benchmarks))128- Numerical values are cast as `Number`s when possible129 - A key (and its aliases) will always honor `opts.boolean` or `opts.string`130- Missing `options`:131 - `opts.array`132 - `opts.config`133 - `opts.coerce`134 - `opts.count`135 - `opts.envPrefix`136 - `opts.narg`137 - `opts.normalize`138 - `opts.configuration`139 - `opts.number`140 - `opts['--']`141- Missing [`parser.detailed()`](https://github.com/yargs/yargs-parser#requireyargs-parserdetailedargs-opts) method142- No [additional configuration](https://github.com/yargs/yargs-parser#configuration) object143- Added [`options.unknown`](#optionsunknown) feature144 145 146## Benchmarks147 148> Running Node.js v10.13.0149 150```151Load Times:152 nopt 3.179ms153 yargs-parser 2.137ms154 minimist 0.746ms155 mri 0.517ms156 157Benchmark:158 minimist x 328,747 ops/sec ±1.09% (89 runs sampled)159 mri x 1,622,801 ops/sec ±0.94% (92 runs sampled)160 nopt x 888,223 ops/sec ±0.22% (92 runs sampled)161 yargs-parser x 30,538 ops/sec ±0.81% (91 runs sampled)162```163 164## License165 166MIT © [Luke Edwards](https://lukeed.com)167 