GizStackGizStack
View .mdOpen in ChatGPTOpen in Claude

gizai/tasks/program

a model that an outside program serves, one process a job, on the worker's card. The worker's own models give their memory on the card back first (Gpu.release: to host memory), so the program has the card alone while it runs, and their next job brings them back. A model that runs rarely, and whose code is not Gizlang, shares a card so and holds nothing on it between jobs.

gizlang
import * as Program from "gizai/tasks/program";

Functions

service

gizlang
function service(spec: string): Hosting.Service throws string

The service of spec (ID=OPERATION:COMMAND). A job of model ID runs COMMAND with the job's folder as its one argument; input.json there holds the job's input (an uploaded file is {"$inputFile": {name, contentType, path}}). The program writes its results into the folder and prints their names, one a line.

Effects: fail, alloc.

Constants

FLAG

gizlang
const FLAG = "--program"

The worker flag of such a model, once for each: --program ID=OPERATION:COMMAND.