# ternary-compress Threshold small gradient coordinates and reconstruct retained signs with their mean absolute magnitude. Supply a nonnegative per-row threshold. Inputs in order: grad, threshold. Outputs in order: code, decoded, scale. Import this module into a Blyx program and call fd_ternary_compress(rows, width) to emit a StableHLO module on standard output. Supply positive fixed dimensions within the documented Flightdeck shape limits.