GLM 5.3 Flash on AMD MI300X in Microsoft Foundry
In this guide, we’ll help you choose the right optimized template and show you how to connect your deployment to your favorite coding harness.
Available deployment templates
Following the success of GLM 5.2 FP8, we're now adding GLM 5.3 Flash to the Hugging Face catalog, with three ready-to-deploy optimized templates for AMD MI300X. Each supports native tool calling, reasoning, and a 512K context window. Choose the configuration that best matches your workload:
- TP4 + EP on 4 x AMD MI300X For compact chat, coding, and agent deployments, offering strong short-request concurrency and sustained generation of longer responses on the smallest AMD footprint.
- TP2 + DP4 + EP on 8 x AMD MI300X Deploy 4 replicas. For concurrent API traffic with shorter prompts and concise responses, prioritizing request throughput and responsiveness (TTFT).
- TP4 + DP2 + EP on 8 x AMD MI300X Deploy 2 replicas with higher memory headroom. For high-throughput conversational APIs and document or agent workloads that process longer prompts or repeatedly reuse shared context.
The clearest benefit of moving to eight GPUs is higher aggregate throughput for conversational traffic. In our ShareGPT benchmark, TP4 + DP2 delivered approximately 1.8× the output throughput of the four-GPU configuration, while reducing average time to first token from 11.3 to 5.2 seconds. Other workloads show smaller gains, making the four-GPU template a strong starting point when its capacity meets your needs.
Deploy a shared coding agent for your team
Let’s put these deployment options into practice. Imagine you’re rolling out GLM 5.3 Flash as a coding agent for your engineering staff. Several developers will use it at the same time to explore large repositories, implement features, and debug issues, with requests that can include substantial code context and long conversation histories.
For this scenario, we’ll choose TP4 + DP2 + EP on 8 x AMD MI300X. As outlined above, this template provides two replicas with more memory per replica, balancing throughput for simultaneous users with headroom for long-context requests.
Let’s deploy the model, then connect the team to the shared model deployment in Microsoft Foundry. We’ll use Codex as the example agent harness, but any harness that speaks the OpenAI Chat Completions API or the Responses API can point at a model deployed on Microsoft Foundry.
Step 1: Deploy GLM 5.3 Flash
- Open Microsoft Foundry and select your project.
- Go to Discover -> Models, and filter Collection by Hugging Face and Deployment options by Managed compute.
- Select
zai-org--glm-5.3-flashand choose Deploy. - Choose the TP4 + DP2 + EP on 8 x AMD MI300X deployment template for this shared coding-agent scenario, acknowledge the estimated billing, and click Deploy.
You’ll need the deployment name at the next step.
The deployment is ready when its state becomes Succeeded. The deployment usually takes 15–20 minutes, but might take up to an hour whilst looking for instances when demand is high.
Step 2: Connect the model to Codex
With the shared deployment ready, connect each developer’s Codex client to it using the configuration below. Codex allows you to define custom profiles to connect to custom model providers through the Responses API.
Let’s create a custom profile at ~/.codex/microsoft-foundry.config.toml with:
model = "zai-org--glm-53-flash"
model_provider = "microsoft-foundry"
model_reasoning_effort = "high"
[model_providers.microsoft-foundry]
name = "Microsoft Foundry"
base_url = "MICROSOFT_FOUNDRY_OPENAI_ENDPOINT"
env_key = "MICROSOFT_FOUNDRY_API_KEY"
wire_api = "responses"
The value of model must be the deployment name, which may differ from the model name shown in the catalog. We suggest setting the model reasoning effort to high but you can set it to low, high or max.
Navigate to Microsoft Foundry home page in your project to fetch the API key and the Azure OpenAI endpoint url.
Set it in the same shell where you will run Codex:
export MICROSOFT_FOUNDRY_API_KEY="<API-KEY>"
export MICROSOFT_FOUNDRY_OPENAI_ENDPOINT="<OPENAI_ENDPOINT>"
Step 3: Test it
Finally, to test Codex with the open-model on Microsoft Foundry you can e.g., clone a repository and start codex with the previously created profile.
git clone https://github.com/huggingface/transformers.git
cd transformers/
codex --profile microsoft-foundry