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
README.md172 linesDownload Raw Back to defu
1# 🌊 defu2 3Assign default properties, recursively. Lightweight and Fast.4 5[![npm version][npm-version-src]][npm-version-href]6[![npm downloads][npm-downloads-src]][npm-downloads-href]7[![bundle][bundle-src]][bundle-href]8[![Codecov][codecov-src]][codecov-href]9[![License][license-src]][license-href]10 11## Install12 13Install package:14 15```bash16# yarn17yarn add defu18# npm19npm install defu20# pnpm21pnpm install defu22```23 24## Usage25 26```js27import { defu } from "defu";28 29const options = defu(object, ...defaults);30```31 32Leftmost arguments have more priority when assigning defaults.33 34### Arguments35 36- **object (Object):** The destination object.37- **source (Object):** The source object.38 39```js40import { defu } from "defu";41 42console.log(defu({ a: { b: 2 } }, { a: { b: 1, c: 3 } }));43// => { a: { b: 2, c: 3 } }44```45 46### Using with CommonJS47 48```js49const { defu } = require("defu");50```51 52## Custom Merger53 54Sometimes default merging strategy is not desirable. Using `createDefu` we can create a custom instance with different merging strategy.55 56This function accepts `obj` (source object), `key` and `value` (current value) and should return `true` if applied custom merging.57 58**Example:** Sum numbers instead of overriding59 60```js61import { createDefu } from "defu";62 63const ext = createDefu((obj, key, value) => {64  if (typeof obj[key] === "number" && typeof value === "number") {65    obj[key] += value;66    return true;67  }68});69 70ext({ cost: 15 }, { cost: 10 }); // { cost: 25 }71```72 73## Function Merger74 75Using `defuFn`, if user provided a function, it will be called with default value instead of merging.76 77It can be useful for default values manipulation.78 79**Example:** Filter some items from defaults (array) and add 20 to the count default value.80 81```js82import { defuFn } from "defu";83 84defuFn(85  {86    ignore: (val) => val.filter((item) => item !== "dist"),87    count: (count) => count + 20,88  },89  {90    ignore: ["node_modules", "dist"],91    count: 10,92  },93);94/*95 {96    ignore: ['node_modules'],97    count: 3098  }99  */100```101 102**Note:** if the default value is not defined, the function defined won't be called and kept as value.103 104## Array Function Merger105 106`defuArrayFn` is similar to `defuFn` but **only applies to array values defined in defaults**.107 108**Example:** Filter some items from defaults (array) and add 20 to the count default value.109 110```js111import { defuArrayFn } from "defu";112 113defuArrayFn(114  {115    ignore: (val) => val.filter((i) => i !== "dist"),116    count: () => 20,117  },118  {119    ignore: ["node_modules", "dist"],120    count: 10,121  },122);123/*124  {125    ignore: ['node_modules'],126    count: () => 20127  }128  */129```130 131**Note:** the function is called only if the value defined in defaults is an aray.132 133### Remarks134 135- `object` and `defaults` are not modified136- Nullish values ([`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) and [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)) are skipped. Please use [defaults-deep](https://www.npmjs.com/package/defaults-deep) or [omit-deep](http://npmjs.com/package/omit-deep) or [lodash.defaultsdeep](https://www.npmjs.com/package/lodash.defaultsdeep) if you need to preserve or different behavior.137- Assignment of `__proto__` and `constructor` keys will be skipped to prevent security issues with object pollution.138- Will concat `array` values (if default property is defined)139 140```js141console.log(defu({ array: ["b", "c"] }, { array: ["a"] }));142// => { array: ['b', 'c', 'a'] }143```144 145## Type146 147We expose `Defu` as a type utility to return a merged type that follows the rules that defu follows.148 149```js150import type { Defu } from 'defu'151 152type Options = Defu<{ foo: 'bar' }, [{}, { bar: 'baz' }, { something: 42 }]>153// returns { foo: 'bar', bar: 'baz', 'something': 42 }154```155 156## License157 158MIT. Made with 💖159 160<!-- Refs -->161 162[npm-version-src]: https://img.shields.io/npm/v/defu?style=flat&colorA=18181B&colorB=F0DB4F163[npm-version-href]: https://npmjs.com/package/defu164[npm-downloads-src]: https://img.shields.io/npm/dm/defu?style=flat&colorA=18181B&colorB=F0DB4F165[npm-downloads-href]: https://npmjs.com/package/defu166[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/defu/main?style=flat&colorA=18181B&colorB=F0DB4F167[codecov-href]: https://codecov.io/gh/unjs/defu168[bundle-src]: https://img.shields.io/bundlephobia/minzip/defu?style=flat&colorA=18181B&colorB=F0DB4F169[bundle-href]: https://bundlephobia.com/result?p=defu170[license-src]: https://img.shields.io/github/license/unjs/defu.svg?style=flat&colorA=18181B&colorB=F0DB4F171[license-href]: https://github.com/unjs/defu/blob/main/LICENSE172 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai