This is some template code where you can use to serve vLLM and solve AI Mathematical Olympaid 3.
Please read the Kaggle discussions post for more context.
Run uv sync to install packages in .venv
uv run modal deploy inference.py
When deployed, you can visit to see available models
https://<handle>--example-gpt-oss-inference-serve.modal.run/v1/models
You will need to save the url to env.json. It should look something like
{
"REMOTE_VLLM_URL": "https://<handle>--example-gpt-oss-inference-serve.modal.run/v1"
}
uv run python3 kaggle.py
You should see problems being solved.
The same code could be used on Kaggle.
How to upload to Kaggle
- File > Editor Type > Script
- Paste
kaggle.pyover - File > Editor Type > Notebook
- (follow the following instructions depending which GPU do you want to use)
To run with Kaggle H100 GPU (which you make make a submission with)
- Session options > Accelerator > GPU H100
- Internet off
To run with external H100 GPU
- Add-ons > Secrets > Add Secret > Label: REMOTE_VLLM_URL, Value: (copy the URL over)
- Session options > Accelerator > None
- Internet on