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
readonly.test.ts195 linesDownload Raw Back to tests
1// @ts-ignore TS61332import { expect, test } from "vitest";3 4import * as z from "zod/v3";5import { util } from "../helpers/util.js";6 7enum testEnum {8  A = 0,9  B = 1,10}11 12const schemas = [13  z.string().readonly(),14  z.number().readonly(),15  z.nan().readonly(),16  z.bigint().readonly(),17  z.boolean().readonly(),18  z.date().readonly(),19  z.undefined().readonly(),20  z.null().readonly(),21  z.any().readonly(),22  z.unknown().readonly(),23  z.void().readonly(),24  z.function().args(z.string(), z.number()).readonly(),25 26  z.array(z.string()).readonly(),27  z.tuple([z.string(), z.number()]).readonly(),28  z.map(z.string(), z.date()).readonly(),29  z.set(z.promise(z.string())).readonly(),30  z.record(z.string()).readonly(),31  z.record(z.string(), z.number()).readonly(),32  z.object({ a: z.string(), 1: z.number() }).readonly(),33  z.nativeEnum(testEnum).readonly(),34  z.promise(z.string()).readonly(),35] as const;36 37test("flat inference", () => {38  util.assertEqual<z.infer<(typeof schemas)[0]>, string>(true);39  util.assertEqual<z.infer<(typeof schemas)[1]>, number>(true);40  util.assertEqual<z.infer<(typeof schemas)[2]>, number>(true);41  util.assertEqual<z.infer<(typeof schemas)[3]>, bigint>(true);42  util.assertEqual<z.infer<(typeof schemas)[4]>, boolean>(true);43  util.assertEqual<z.infer<(typeof schemas)[5]>, Date>(true);44  util.assertEqual<z.infer<(typeof schemas)[6]>, undefined>(true);45  util.assertEqual<z.infer<(typeof schemas)[7]>, null>(true);46  util.assertEqual<z.infer<(typeof schemas)[8]>, any>(true);47  util.assertEqual<z.infer<(typeof schemas)[9]>, Readonly<unknown>>(true);48  util.assertEqual<z.infer<(typeof schemas)[10]>, void>(true);49  util.assertEqual<z.infer<(typeof schemas)[11]>, (args_0: string, args_1: number, ...args_2: unknown[]) => unknown>(50    true51  );52  util.assertEqual<z.infer<(typeof schemas)[12]>, readonly string[]>(true);53 54  util.assertEqual<z.infer<(typeof schemas)[13]>, readonly [string, number]>(true);55  util.assertEqual<z.infer<(typeof schemas)[14]>, ReadonlyMap<string, Date>>(true);56  util.assertEqual<z.infer<(typeof schemas)[15]>, ReadonlySet<Promise<string>>>(true);57  util.assertEqual<z.infer<(typeof schemas)[16]>, Readonly<Record<string, string>>>(true);58  util.assertEqual<z.infer<(typeof schemas)[17]>, Readonly<Record<string, number>>>(true);59  util.assertEqual<z.infer<(typeof schemas)[18]>, { readonly a: string; readonly 1: number }>(true);60  util.assertEqual<z.infer<(typeof schemas)[19]>, Readonly<testEnum>>(true);61  util.assertEqual<z.infer<(typeof schemas)[20]>, Promise<string>>(true);62});63 64// test("deep inference", () => {65//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[0]>, string>(true);66//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[1]>, number>(true);67//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[2]>, number>(true);68//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[3]>, bigint>(true);69//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[4]>, boolean>(true);70//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[5]>, Date>(true);71//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[6]>, undefined>(true);72//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[7]>, null>(true);73//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[8]>, any>(true);74//   util.assertEqual<75//     z.infer<(typeof deepReadonlySchemas_0)[9]>,76//     Readonly<unknown>77//   >(true);78//   util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[10]>, void>(true);79//   util.assertEqual<80//     z.infer<(typeof deepReadonlySchemas_0)[11]>,81//     (args_0: string, args_1: number, ...args_2: unknown[]) => unknown82//   >(true);83//   util.assertEqual<84//     z.infer<(typeof deepReadonlySchemas_0)[12]>,85//     readonly string[]86//   >(true);87//   util.assertEqual<88//     z.infer<(typeof deepReadonlySchemas_0)[13]>,89//     readonly [string, number]90//   >(true);91//   util.assertEqual<92//     z.infer<(typeof deepReadonlySchemas_0)[14]>,93//     ReadonlyMap<string, Date>94//   >(true);95//   util.assertEqual<96//     z.infer<(typeof deepReadonlySchemas_0)[15]>,97//     ReadonlySet<Promise<string>>98//   >(true);99//   util.assertEqual<100//     z.infer<(typeof deepReadonlySchemas_0)[16]>,101//     Readonly<Record<string, string>>102//   >(true);103//   util.assertEqual<104//     z.infer<(typeof deepReadonlySchemas_0)[17]>,105//     Readonly<Record<string, number>>106//   >(true);107//   util.assertEqual<108//     z.infer<(typeof deepReadonlySchemas_0)[18]>,109//     { readonly a: string; readonly 1: number }110//   >(true);111//   util.assertEqual<112//     z.infer<(typeof deepReadonlySchemas_0)[19]>,113//     Readonly<testEnum>114//   >(true);115//   util.assertEqual<116//     z.infer<(typeof deepReadonlySchemas_0)[20]>,117//     Promise<string>118//   >(true);119 120//   util.assertEqual<121//     z.infer<typeof crazyDeepReadonlySchema>,122//     ReadonlyMap<123//       ReadonlySet<readonly [string, number]>,124//       {125//         readonly a: {126//           readonly [x: string]: readonly any[];127//         };128//         readonly b: {129//           readonly c: {130//             readonly d: {131//               readonly e: {132//                 readonly f: {133//                   readonly g?: {};134//                 };135//               };136//             };137//           };138//         };139//       }140//     >141//   >(true);142// });143 144test("object freezing", () => {145  expect(Object.isFrozen(z.array(z.string()).readonly().parse(["a"]))).toBe(true);146  expect(Object.isFrozen(z.tuple([z.string(), z.number()]).readonly().parse(["a", 1]))).toBe(true);147  expect(148    Object.isFrozen(149      z150        .map(z.string(), z.date())151        .readonly()152        .parse(new Map([["a", new Date()]]))153    )154  ).toBe(true);155  expect(156    Object.isFrozen(157      z158        .set(z.promise(z.string()))159        .readonly()160        .parse(new Set([Promise.resolve("a")]))161    )162  ).toBe(true);163  expect(Object.isFrozen(z.record(z.string()).readonly().parse({ a: "b" }))).toBe(true);164  expect(Object.isFrozen(z.record(z.string(), z.number()).readonly().parse({ a: 1 }))).toBe(true);165  expect(Object.isFrozen(z.object({ a: z.string(), 1: z.number() }).readonly().parse({ a: "b", 1: 2 }))).toBe(true);166  expect(Object.isFrozen(z.promise(z.string()).readonly().parse(Promise.resolve("a")))).toBe(true);167});168 169test("async object freezing", async () => {170  expect(Object.isFrozen(await z.array(z.string()).readonly().parseAsync(["a"]))).toBe(true);171  expect(Object.isFrozen(await z.tuple([z.string(), z.number()]).readonly().parseAsync(["a", 1]))).toBe(true);172  expect(173    Object.isFrozen(174      await z175        .map(z.string(), z.date())176        .readonly()177        .parseAsync(new Map([["a", new Date()]]))178    )179  ).toBe(true);180  expect(181    Object.isFrozen(182      await z183        .set(z.promise(z.string()))184        .readonly()185        .parseAsync(new Set([Promise.resolve("a")]))186    )187  ).toBe(true);188  expect(Object.isFrozen(await z.record(z.string()).readonly().parseAsync({ a: "b" }))).toBe(true);189  expect(Object.isFrozen(await z.record(z.string(), z.number()).readonly().parseAsync({ a: 1 }))).toBe(true);190  expect(191    Object.isFrozen(await z.object({ a: z.string(), 1: z.number() }).readonly().parseAsync({ a: "b", 1: 2 }))192  ).toBe(true);193  expect(Object.isFrozen(await z.promise(z.string()).readonly().parseAsync(Promise.resolve("a")))).toBe(true);194});195 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai