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"use strict";2var __create = Object.create;3var __defProp = Object.defineProperty;4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;5var __getOwnPropNames = Object.getOwnPropertyNames;6var __getProtoOf = Object.getPrototypeOf;7var __hasOwnProp = Object.prototype.hasOwnProperty;8var __export = (target, all) => {9 for (var name in all)10 __defProp(target, name, { get: all[name], enumerable: true });11};12var __copyProps = (to, from, except, desc) => {13 if (from && typeof from === "object" || typeof from === "function") {14 for (let key of __getOwnPropNames(from))15 if (!__hasOwnProp.call(to, key) && key !== except)16 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });17 }18 return to;19};20var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(21 // If the importer is in node compatibility mode or this is not an ESM22 // file that has been converted to a CommonJS file using a Babel-23 // compatible transform (i.e. "__esModule" has not been set), then set24 // "default" to the CommonJS "module.exports" for node compatibility.25 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,26 mod27));28var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);29var testServer_exports = {};30__export(testServer_exports, {31 TestServerDispatcher: () => TestServerDispatcher,32 runTestServer: () => runTestServer,33 runUIMode: () => runUIMode34});35module.exports = __toCommonJS(testServer_exports);36var import_util = __toESM(require("util"));37var import_server = require("playwright-core/lib/server");38var import_utils = require("playwright-core/lib/utils");39var import_utilsBundle = require("playwright-core/lib/utilsBundle");40var import_configLoader = require("../common/configLoader");41var import_list = __toESM(require("../reporters/list"));42var import_reporters = require("./reporters");43var import_sigIntWatcher = require("./sigIntWatcher");44var import_testRunner = require("./testRunner");45const originalDebugLog = import_utilsBundle.debug.log;46const originalStdoutWrite = process.stdout.write;47const originalStderrWrite = process.stderr.write;48class TestServer {49 constructor(configLocation, configCLIOverrides) {50 this._configLocation = configLocation;51 this._configCLIOverrides = configCLIOverrides;52 }53 async start(options) {54 this._dispatcher = new TestServerDispatcher(this._configLocation, this._configCLIOverrides);55 return await (0, import_server.startTraceViewerServer)({ ...options, transport: this._dispatcher.transport });56 }57 async stop() {58 await this._dispatcher?.stop();59 }60}61class TestServerDispatcher {62 constructor(configLocation, configCLIOverrides) {63 this._serializer = require.resolve("./uiModeReporter");64 this._closeOnDisconnect = false;65 this._testRunner = new import_testRunner.TestRunner(configLocation, configCLIOverrides);66 this.transport = {67 onconnect: () => {68 },69 dispatch: (method, params) => this[method](params),70 onclose: () => {71 if (this._closeOnDisconnect)72 (0, import_utils.gracefullyProcessExitDoNotHang)(0);73 }74 };75 this._dispatchEvent = (method, params) => this.transport.sendEvent?.(method, params);76 this._testRunner.on(import_testRunner.TestRunnerEvent.TestFilesChanged, (testFiles) => this._dispatchEvent("testFilesChanged", { testFiles }));77 }78 async _wireReporter(messageSink) {79 return await (0, import_reporters.createReporterForTestServer)(this._serializer, messageSink);80 }81 async _collectingReporter() {82 const report = [];83 return {84 reporter: await (0, import_reporters.createReporterForTestServer)(this._serializer, (e) => report.push(e)),85 report86 };87 }88 async initialize(params) {89 this._serializer = params.serializer || require.resolve("./uiModeReporter");90 this._closeOnDisconnect = !!params.closeOnDisconnect;91 await this._testRunner.initialize({92 ...params93 });94 this._setInterceptStdio(!!params.interceptStdio);95 }96 async ping() {97 }98 async open(params) {99 if ((0, import_utils.isUnderTest)())100 return;101 (0, import_utilsBundle.open)("vscode://file/" + params.location.file + ":" + params.location.line).catch((e) => console.error(e));102 }103 async resizeTerminal(params) {104 this._testRunner.resizeTerminal(params);105 }106 async checkBrowsers() {107 return { hasBrowsers: this._testRunner.hasSomeBrowsers() };108 }109 async installBrowsers() {110 await this._testRunner.installBrowsers();111 }112 async runGlobalSetup(params) {113 await this.runGlobalTeardown();114 const { reporter, report } = await this._collectingReporter();115 this._globalSetupReport = report;116 const { status } = await this._testRunner.runGlobalSetup([reporter, new import_list.default()]);117 return { report, status };118 }119 async runGlobalTeardown() {120 const { status } = await this._testRunner.runGlobalTeardown();121 const report = this._globalSetupReport || [];122 this._globalSetupReport = void 0;123 return { status, report };124 }125 async startDevServer(params) {126 await this.stopDevServer({});127 const { reporter, report } = await this._collectingReporter();128 const { status } = await this._testRunner.startDevServer(reporter, "out-of-process");129 return { report, status };130 }131 async stopDevServer(params) {132 const { status } = await this._testRunner.stopDevServer();133 const report = this._devServerReport || [];134 this._devServerReport = void 0;135 return { status, report };136 }137 async clearCache(params) {138 await this._testRunner.clearCache();139 }140 async listFiles(params) {141 const { reporter, report } = await this._collectingReporter();142 const { status } = await this._testRunner.listFiles(reporter, params.projects);143 return { report, status };144 }145 async listTests(params) {146 const { reporter, report } = await this._collectingReporter();147 const { status } = await this._testRunner.listTests(reporter, params);148 return { report, status };149 }150 async runTests(params) {151 const wireReporter = await this._wireReporter((e) => this._dispatchEvent("report", e));152 const { status } = await this._testRunner.runTests(wireReporter, {153 ...params,154 doNotRunDepsOutsideProjectFilter: true155 });156 return { status };157 }158 async watch(params) {159 await this._testRunner.watch(params.fileNames);160 }161 async findRelatedTestFiles(params) {162 return this._testRunner.findRelatedTestFiles(params.files);163 }164 async stopTests() {165 await this._testRunner.stopTests();166 }167 async stop() {168 this._setInterceptStdio(false);169 await this._testRunner.stop();170 }171 async closeGracefully() {172 await this._testRunner.closeGracefully();173 }174 _setInterceptStdio(interceptStdio) {175 if (process.env.PWTEST_DEBUG)176 return;177 if (interceptStdio) {178 if (import_utilsBundle.debug.log === originalDebugLog) {179 import_utilsBundle.debug.log = (...args) => {180 const string = import_util.default.format(...args) + "\n";181 return originalStderrWrite.apply(process.stderr, [string]);182 };183 }184 const stdoutWrite = (chunk) => {185 this._dispatchEvent("stdio", chunkToPayload("stdout", chunk));186 return true;187 };188 const stderrWrite = (chunk) => {189 this._dispatchEvent("stdio", chunkToPayload("stderr", chunk));190 return true;191 };192 process.stdout.write = stdoutWrite;193 process.stderr.write = stderrWrite;194 } else {195 import_utilsBundle.debug.log = originalDebugLog;196 process.stdout.write = originalStdoutWrite;197 process.stderr.write = originalStderrWrite;198 }199 }200}201async function runUIMode(configFile, configCLIOverrides, options) {202 const configLocation = (0, import_configLoader.resolveConfigLocation)(configFile);203 return await innerRunTestServer(configLocation, configCLIOverrides, options, async (server, cancelPromise) => {204 await (0, import_server.installRootRedirect)(server, [], { ...options, webApp: "uiMode.html" });205 if (options.host !== void 0 || options.port !== void 0) {206 await (0, import_server.openTraceInBrowser)(server.urlPrefix("human-readable"));207 } else {208 const channel = await installedChromiumChannelForUI(configLocation, configCLIOverrides);209 const page = await (0, import_server.openTraceViewerApp)(server.urlPrefix("precise"), "chromium", {210 headless: (0, import_utils.isUnderTest)() && process.env.PWTEST_HEADED_FOR_TEST !== "1",211 persistentContextOptions: {212 handleSIGINT: false,213 channel214 }215 });216 page.on("close", () => cancelPromise.resolve());217 }218 });219}220async function installedChromiumChannelForUI(configLocation, configCLIOverrides) {221 const config = await (0, import_configLoader.loadConfig)(configLocation, configCLIOverrides).catch((e) => null);222 if (!config)223 return void 0;224 if (config.projects.some((p) => (!p.project.use.browserName || p.project.use.browserName === "chromium") && !p.project.use.channel))225 return void 0;226 for (const channel of ["chromium", "chrome", "msedge"]) {227 if (config.projects.some((p) => p.project.use.channel === channel))228 return channel;229 }230 return void 0;231}232async function runTestServer(configFile, configCLIOverrides, options) {233 const configLocation = (0, import_configLoader.resolveConfigLocation)(configFile);234 return await innerRunTestServer(configLocation, configCLIOverrides, options, async (server) => {235 console.log("Listening on " + server.urlPrefix("precise").replace("http:", "ws:") + "/" + server.wsGuid());236 });237}238async function innerRunTestServer(configLocation, configCLIOverrides, options, openUI) {239 const testServer = new TestServer(configLocation, configCLIOverrides);240 const cancelPromise = new import_utils.ManualPromise();241 const sigintWatcher = new import_sigIntWatcher.SigIntWatcher();242 process.stdin.on("close", () => (0, import_utils.gracefullyProcessExitDoNotHang)(0));243 void sigintWatcher.promise().then(() => cancelPromise.resolve());244 try {245 const server = await testServer.start(options);246 await openUI(server, cancelPromise);247 await cancelPromise;248 } finally {249 await testServer.stop();250 sigintWatcher.disarm();251 }252 return sigintWatcher.hadSignal() ? "interrupted" : "passed";253}254function chunkToPayload(type, chunk) {255 if (chunk instanceof Uint8Array)256 return { type, buffer: chunk.toString("base64") };257 return { type, text: chunk };258}259// Annotate the CommonJS export names for ESM import in node:2600 && (module.exports = {261 TestServerDispatcher,262 runTestServer,263 runUIMode264});265 