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
complex.test.ts71 linesDownload Raw Back to tests
1import { expect, test } from "vitest";2import * as z from "zod/v3";3 4const crazySchema = z.object({5  tuple: z.tuple([6    z.string().nullable().optional(),7    z.number().nullable().optional(),8    z.boolean().nullable().optional(),9    z.null().nullable().optional(),10    z.undefined().nullable().optional(),11    z.literal("1234").nullable().optional(),12  ]),13  merged: z14    .object({15      k1: z.string().optional(),16    })17    .merge(z.object({ k1: z.string().nullable(), k2: z.number() })),18  union: z.array(z.union([z.literal("asdf"), z.literal(12)])).nonempty(),19  array: z.array(z.number()),20  // sumTransformer: z.transformer(z.array(z.number()), z.number(), (arg) => {21  //   return arg.reduce((a, b) => a + b, 0);22  // }),23  sumMinLength: z.array(z.number()).refine((arg) => arg.length > 5),24  intersection: z.intersection(z.object({ p1: z.string().optional() }), z.object({ p1: z.number().optional() })),25  enum: z.intersection(z.enum(["zero", "one"]), z.enum(["one", "two"])),26  nonstrict: z.object({ points: z.number() }).nonstrict(),27  numProm: z.promise(z.number()),28  lenfun: z.function(z.tuple([z.string()]), z.boolean()),29});30 31// const asyncCrazySchema = crazySchema.extend({32//   // async_transform: z.transformer(33//   //   z.array(z.number()),34//   //   z.number(),35//   //   async (arg) => {36//   //     return arg.reduce((a, b) => a + b, 0);37//   //   }38//   // ),39//   async_refine: z.array(z.number()).refine(async (arg) => arg.length > 5),40// });41 42test("parse", () => {43  const input = {44    tuple: ["asdf", 1234, true, null, undefined, "1234"],45    merged: { k1: "asdf", k2: 12 },46    union: ["asdf", 12, "asdf", 12, "asdf", 12],47    array: [12, 15, 16],48    // sumTransformer: [12, 15, 16],49    sumMinLength: [12, 15, 16, 98, 24, 63],50    intersection: {},51    enum: "one",52    nonstrict: { points: 1234 },53    numProm: Promise.resolve(12),54    lenfun: (x: string) => x.length,55  };56 57  const result = crazySchema.parse(input);58 59  // Verify the parsed result structure60  expect(result.tuple).toEqual(input.tuple);61  expect(result.merged).toEqual(input.merged);62  expect(result.union).toEqual(input.union);63  expect(result.array).toEqual(input.array);64  expect(result.sumMinLength).toEqual(input.sumMinLength);65  expect(result.intersection).toEqual(input.intersection);66  expect(result.enum).toEqual(input.enum);67  expect(result.nonstrict).toEqual(input.nonstrict);68  expect(result.numProm).toBeInstanceOf(Promise);69  expect(typeof result.lenfun).toBe("function");70});71 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai