translate.py defines a TinyTranslator with a small nn.Transformer and runs greedy decoding the way language_translation/main.py::greedy_decode does. Key details:
PE table is sinusoidal, built once, max_len=64.
start_token=1, end_token=2; decoding stops when end_token is sampled.
Model is run in eval mode with dropout=0.0.
Seed must be set before model construction so weight initialization is deterministic.
Task
run_case mirrors greedy_decode exactly and returns {"tokens": list[int], "length": int}.
Required output
Write /app/solution/modal_app.py with module-level app and run_case Modal Function.
Capability contract
Expose the workflow as a single Modal remote function: define run_case as an @app.function so the harness can invoke it with run_case.remote(case).