Skip to main content

Module frames

Module frames 

Source
Expand description

ZMQ message framing on the frontend–engine sockets.

  • Input (frontend ROUTER to engine DEALER): [type, payload, aux...]. type is one byte so the engine dispatches without decoding: ADD carries a TokenizedGenerateReqInput whose tensors may reference the aux frames; ABORT carries a msgpack list of request ids; CONTROL carries a ControlRequest.
  • Output (engine PUSH to frontend PULL): a BatchTokenIDOutSlim message, a ControlOutput (told apart by its tag), or the single frame ENGINE_CORE_DEAD when the engine exits.

Enums§

EngineOutput
A message on the engine’s output socket.
EngineRequest
A message on the engine’s input socket.

Constants§

ENGINE_CORE_DEAD
The frame an engine sends on its output socket when it shuts down; the frontend then treats the engine as dead.
REQ_TYPE_ABORT
Type byte of an ABORT message.
REQ_TYPE_ADD
Type byte of an ADD message.
REQ_TYPE_CONTROL
Type byte of a CONTROL message.

Functions§

engine_identity
The ZMQ routing identity of engine engine_index: its index as two little-endian bytes.