tritium demo mingpt
You (or your agent) write Pseudocode (Tritium token @tritium).
Tritium CLI (or HTTPS) converts it to Python, C, or Rust.
Install: see help.
Code: python · c · rust
minGPT transformer block → Python / C / Rust $ NAME='algo.mingpt_block' $ tritium generate "$NAME" --lang python $ tritium generate "$NAME" --lang c $ tritium generate "$NAME" --lang rust # NAMED $ PSEUDO='fn mingpt(x): y = mingpt_block(x) return y' $ tritium -c "$PSEUDO" --lang python $ tritium -c "$PSEUDO" --lang c $ tritium -c "$PSEUDO" --lang rust # UNNAMED $ PSEUDO='fn transformer_block(x): nrm = layer_norm(x) attn = multi_head_attention(nrm) h = residual_add(x, attn) nrm2 = layer_norm(h) mlp = mlp_gelu(nrm2) y = residual_add(h, mlp) return y' $ tritium -c "$PSEUDO" --lang python $ tritium -c "$PSEUDO" --lang c $ tritium -c "$PSEUDO" --lang rust $ NAME='mingpt_block∘layer_norm∘gelu_tanh' $ tritium generate "$NAME" --lang python $ tritium generate "$NAME" --lang c $ tritium generate "$NAME" --lang rust → python.html → c.html → rust.html usage: completion_tokens=0