Day 0 Deployment of Open-Source MoE Models on AMD GPUs

    This article walks through Day 0 deployment of a new open-source sparse MoE model on AMD GPUs. It explains why same-day inference support matters, how total versus activated parameters affect memory and compute, and how to prepare the environment baseline. It then covers starting from an upstream prebuilt image, launching a single-GPU server, scaling with tensor parallelism, tuning for low latency, managing long-context strategies for repository-level coding, running locally on client hardware, and a pre-launch acceptance checklist.

    1. Why Day 0 Support Matters for Open-Source Model Adoption

    In the open-source LLM ecosystem, there is often a gap between the release of model weights and their support in inference frameworks. Day 0 support means that within the same window in which a model becomes publicly available, mainstream inference backends have already completed operator coverage, memory management, and parallelism adaptation, so users can start serving immediately without waiting for community patches. For engineering teams, the value is not about being first to try a new model. It is about compressing model selection, benchmarking, and launch planning into a single week, instead of being forced back to the previous generation of weights because the framework lags behind.

    The latest open-source MoE release followed exactly this cadence: two precision variants, each with roughly 35 billion total parameters and about 3 billion activated parameters per forward pass, were ready at the same time and could be deployed directly on AMD GPU platforms. For engineering, the implication is clear: evaluation, canary rollout, and capacity planning can all move forward on the same pipeline.

    2. Key Model Characteristics and Engineering Implications

    The model uses a sparse mixture-of-experts (MoE) architecture with all weights open. Sparse activation reduces compute directly: although all expert weights must reside in memory, each token passes through only a few experts, so the compute cost is close to that of a 3B dense model.

    One common misconception needs clarification: a small activated parameter count does not mean a small memory footprint. Memory usage is determined by total parameters, weight precision, and the KV Cache, while compute and memory-access pressure are driven mainly by activated parameters. This leads to two practical conclusions:

    • Memory capacity determines whether the model fits and how long a context you can serve.
    • Activated scale determines per-token latency and the upper bound on concurrent throughput.

    On the capability side, the series places stronger emphasis on agentic coding, matching or outperforming larger dense models (around the 27B parameter class) on several widely used coding and reasoning benchmarks, while retaining solid multimodal perception and reasoning. For teams using AI coding tools, this means repository-level code understanding, cross-file edits, and multi-turn tool calls can run on smaller serving instances.

    3. Environment Baseline Before Deployment

    Most Day 0 deployment failures are not model problems but environment drift. Pin the following baseline before you start:

    1. GPU driver and heterogeneous compute stack versions are explicit and aligned with what the inference image requires.
    2. The container runtime is available, with permission for device passthrough and shared memory configuration.
    3. Model weights are pre-downloaded to a local cache directory to avoid repeated pulls at startup.
    4. Enough system shared memory is reserved to prevent IPC failures under multi-process tensor parallelism.

    A sample checklist:

    1. # Confirm the accelerator and driver are visible
    2. rocm-smi
    3. # Confirm the container runtime and device nodes
    4. ls -l /dev/kfd /dev/dri

    If the device nodes are missing, the container will later behave as if the framework cannot see the accelerator, rather than raising a clear model error, which makes troubleshooting costly.

    4. Step 1: Start with the Upstream Prebuilt Image

    For Day 0 scenarios, building the inference framework yourself is not recommended. An upstream prebuilt image hands operator and communication-library adaptation to the maintainers, letting you focus on serving parameters. A typical launch looks like this (example; adjust parameters to your environment):

    1. docker run -d -it \
    2. --ipc=host \
    3. --network=host \
    4. --privileged \
    5. --device=/dev/kfd \
    6. --device=/dev/dri \
    7. --group-add video \
    8. --cap-add SYS_PTRACE \
    9. --security-opt seccomp=unconfined \
    10. --shm-size 32G \
    11. -v ~/.cache/huggingface:/root/.cache/huggingface \
    12. --name moe-serving \
    13. <upstream-sglang-rocm-image:tag>

    A few parameters deserve explanation:

    • --ipc=host and a large --shm-size: tensor parallelism passes activations through inter-process shared memory, and the default 64MB causes initialization to fail outright.
    • --device=/dev/kfd and --device=/dri: the former is the heterogeneous compute channel and the latter is the render/device node; missing either makes the device invisible.
    • Mounting the weight cache directory: keeping large weights on the host means no re-download when the container is rebuilt.
    • Image tags differ across accelerator generations, so select based on the target hardware generation rather than simply taking the latest.

    5. Step 2: Launch the Inference Service

    Single-GPU deployment is the easiest way to verify the pipeline end to end:

    1. python -m sglang.launch_server \
    2. --model-path <local-path>/Qwen3.6-35B-A3B \
    3. --tensor-parallel-size 1 \
    4. --context-length 262144 \
    5. --host 0.0.0.0 --port 30000

    After startup, watch three kinds of logs: whether weight loading completes fully, the actual number of tokens the KV Cache can allocate, and whether CUDA/ROCm graph capture succeeds. The third is optional on some backends; disabling it speeds up cold start at the cost of some decode throughput.

    If a single GPU cannot hold the weights and KV Cache at the target context length, there are three standard options: lower the context limit, switch to lower-precision weights, or move to multi-GPU tensor parallelism.

    6. Step 3: Multi-GPU Tensor Parallelism and Low-Latency Tuning

    Interactive coding is sensitive to both time to first token (TTFT) and decode speed. Tensor parallelism splits each layer’s weights across GPUs, significantly reducing per-GPU memory-access pressure, but it adds communication overhead, so more parallelism is not always better: choose a value that divides the number of attention heads and matches intra-node interconnect bandwidth.

    1. python -m sglang.launch_server \
    2. --model-path <local-path>/Qwen3.6-35B-A3B \
    3. --tensor-parallel-size 2 \
    4. --context-length 262144 \
    5. --host 0.0.0.0 --port 30000

    Try tuning options in this order of expected benefit:

    1. Batching and scheduling parameters: they determine throughput and tail latency under concurrency.
    2. KV Cache precision and paging strategy: the biggest gains appear in long-context scenarios.
    3. Prefix caching: in repository-level tasks, system prompts and code context repeat heavily, so hit rates are usually substantial.
    4. Graph capture and quantized operators: they affect steady-state decode performance.

    Any tuning should be benchmarked against your own input distribution rather than copying someone else’s latency numbers.

    7. Context Strategy for Repository-Level Coding

    Long context cuts both ways: it enables cross-file understanding but makes the KV Cache the main memory consumer. A more robust practice is to layer the context: put stable project conventions and directory structure in a reusable prefix, place the retrieved snippets for the current task at the tail, and define explicit truncation and recycling policies. Combined with prefix caching, this keeps repeated computation low without sacrificing useful information.

    8. From Data Center to Local Devices

    Because activated parameters are only about 3B, the model also fits on local client hardware such as integrated GPUs and high-performance APU platforms. Localization keeps data on-premises and enables offline use, at the cost of limited memory and bandwidth, which usually requires shorter contexts and more conservative concurrency. A single serving interface can hide the cloud-versus-local difference so upper-layer coding tools switch transparently.

    9. Pre-Launch Acceptance Checklist

    • Functionality: multi-turn tool calls, long-file edits, and structured output remain stable.
    • Capacity: TTFT, decode rate, and memory watermark at the target concurrency.
    • Stability: no memory fragmentation or cache hit-rate decay over long runs.
    • Observability: connect to a general logging service and monitoring alerts, with thresholds on latency and error rate.
    • Rollback: keep the previous generation of weights and image tags so a failed canary can be reverted quickly.

    10. Conclusion

    The essence of Day 0 support is moving from “the model is available” to “the model is operable.” Once sparse MoE weights, the upstream inference image, and stable serving parameters are aligned, teams can achieve results close to a larger dense model at a modest compute cost and choose flexibly between cloud and local deployment. For developers and system architects building the next generation of agentic workflows, the lowest-risk path is to make the environment baseline and serving pipeline solid first, then move on to tuning and scaling.