GO

google/gemma-2-9b-it

text-generationtransformersgemma9.2B params · updated Aug 2024

Mainframe serving

Can a COBOL transaction program call this checkpoint, and under which transport? The model returns evidence; the host keeps the decision.

Export status
Directly exportable
Standard PyTorch or Transformers weights; the export runs clean
Recommended pattern
Pattern 02
API gateway
Latency class
15–50 ms
ONNX artifact
TBD
Screening note

Served by an inference service inside an enclave under an executed agreement. Identifiers are tokenized at the boundary.

Unstructured text in, recommendation out — served off-platform behind the de-identifying gateway

Tokenized egress over mTLS; executed agreement required

  • Standard architecture Gemma2ForCausalLM with transformers weights
osai-screening/1.0.0 · verdict 19ded370b1c55348…
Serving controlskill switch offshadow onconfidence floor 0.85GET /serving-status

Promotion gates

GateWhat it checksState
Structural checkGraph loads; node inputs, outputs and shapes resolveNot run
Numerical paritySame inputs agree with the source framework within 1e-4Not run
Eight-bit quantisationINT8 weights with parity re-run afterwardsNot run
Shadow cycleFull cycle scored against live traffic with no influence on outcomesNot run

Interface contract

The copybook is generated, versioned and never hand-edited on either side. Entry point SCORE_GEMMA_2_9B_IT.

Generated copybookmodel record · contract
      * GENERATED BY osai-copybook-gen/1.0.0 — DO NOT EDIT (STANDARD S2)
      * COPYBOOK FOR google/gemma-2-9b-it
      * REVISION 11c9b309abf7  PATTERN 02  ENTRY SCORE_GEMMA_2_9B_IT
       01  SCORE-GEMMA-2-9B-IT-REQUEST.
           05  REQ-RECORD-ID          PIC X(12).
           05  REQ-TEXT-LEN           PIC S9(4) COMP-5.
           05  REQ-TEXT               PIC X(4000).
       01  SCORE-GEMMA-2-9B-IT-RESPONSE.
           05  RESP-SCORE             COMP-1.
           05  RESP-CONFIDENCE        COMP-1.
           05  RESP-LABEL             PIC X(16).
           05  RESP-MODEL-VERSION     PIC X(16).
           05  RESP-STATUS            PIC S9(4) COMP-5.
SCORE-GEMMA-2-9B-IT-REQUEST / OsaiRequest4014 bytes
COBOLCKindOffsetBytesNote
REQ-RECORD-IDrecord_idalnum(12)012caller correlation key, logged with the inference
REQ-TEXT-LENtext_lenbinary16122bytes used in REQ-TEXT
REQ-TEXTtextalnum(4000)144000de-identified text; tokenized inside the graph
SCORE-GEMMA-2-9B-IT-RESPONSE / OsaiResponse42 bytes
COBOLCKindOffsetBytesNote
RESP-SCOREscorefloat3204model output; evidence, not a decision
RESP-CONFIDENCEconfidencefloat3244compared against the confidence floor by the host
RESP-LABELlabelalnum(16)816e.g. REVIEW or APPROVED — never DENY
RESP-MODEL-VERSIONmodel_versionalnum(16)2416revision that produced the score (standard S4)
RESP-STATUSstatusbinary164020 scored · 4 below floor · 8 transport or runtime failure — 4 and 8 fall through to host rules
CLAIMPROC.cob — the callergenerated by the screening service
       IDENTIFICATION DIVISION.
       PROGRAM-ID. OSAICALL.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
           COPY OSAICPY.
       77  CONFIDENCE-FLOOR     COMP-1 VALUE 0.85.
       PROCEDURE DIVISION.
           EXEC CICS LINK PROGRAM('BAQEXEC')
             COMMAREA(SCORE-GEMMA-2-9B-IT-REQUEST)
             LENGTH(LENGTH OF SCORE-GEMMA-2-9B-IT-REQUEST)
             RESP(WS-CICS-RESP)
           END-EXEC
           IF WS-CICS-RESP NOT = DFHRESP(NORMAL)
             MOVE 8 TO RESP-STATUS
           END-IF
           EVALUATE TRUE
             WHEN RESP-STATUS NOT = 0
               PERFORM APPLY-EXISTING-HOST-RULES
             WHEN RESP-CONFIDENCE < CONFIDENCE-FLOOR
               PERFORM APPLY-EXISTING-HOST-RULES
             WHEN RESP-LABEL = 'REVIEW'
               PERFORM HOLD-FOR-REVIEW
             WHEN OTHER
               PERFORM CONTINUE-ADJUDICATION
           END-EVALUATE
           PERFORM WRITE-AUDIT-RECORD
           GOBACK.

The C-ABI wrapper is on the Usage tab under “C bridge”. Test the bridge on a workstation with GnuCOBOL before it reaches an LPAR — struct packing and numeric conversion are what actually break, and they are identical on both targets.

Standards this deployment inherits

Download ML-BOM
S1Models ship as ONNX artifacts. No ML framework runtime is installed on z/OS.
S2The copybook is the interface contract — generated, versioned, never hand-edited on either side.
S3Latency class selects the pattern. Team preference and vendor enthusiasm do not.
S4Every inference is logged with the record state and model version that produced it.
S5PHI leaves the platform only tokenized, over mTLS, to an endpoint under an executed BAA.
S6A model influences payment only after a full shadow cycle and with a tested fallback path.