COBOL → Python Translator

Qwen2.5-Coder-1.5B QLoRA · Unsloth Training loss 2.14 → 0.13

1.5B
Parameters
125
Training steps
0.13
Final loss
94%
Loss reduction
Example 1 — Arithmetic computation
COBOL
COMPUTE WS-TAX = WS-PRICE * WS-TAX-RATE
Python
from decimal import Decimal
ws_tax = Decimal(str(ws_price)) * Decimal(str(ws_tax_rate))
Example 2 — String move
COBOL
MOVE WS-CUSTOMER-NAME TO WS-OUTPUT-NAME
Python
ws_output_name = ws_customer_name
Example 3 — Conditional logic
COBOL
IF WS-BALANCE > ZERO
   PERFORM CREDIT-ROUTINE
END-IF
Python
if ws_balance > 0:
    credit_routine()
Example 4 — Loop
COBOL
PERFORM VARYING WS-IDX FROM 1 BY 1
    UNTIL WS-IDX > WS-MAX
    ADD 1 TO WS-TOTAL
END-PERFORM
Python
for ws_idx in range(1, ws_max + 1):
    ws_total += 1