AI Infrastructure
Code completion agents are transforming how developers write software, automating everything from inline suggestions to full function generation. These AI-powered systems rely on open source large language models fine-tuned specifically for code understanding, but the models alone are only half the equation. Running them at production scale requires robust AI infrastructure that handles CPU and GPU compute, fast cold starts, and secure execution.

Code completion agents are transforming how developers write software, automating everything from inline suggestions to full function generation. These AI-powered systems rely on open source large language models fine-tuned specifically for code understanding, but the models alone are only half the equation. Running them at production scale requires robust AI infrastructure that handles CPU and GPU compute, fast cold starts, and secure execution. This guide examines seven options for building code completion agents in 2026: Modal as the serverless compute platform purpose-built for deploying these models, plus six selected open-weight code models from the Qwen and IBM Granite families, chosen with an emphasis on deployability for code-completion agents.
Modal delivers serverless compute specifically designed for AI workloads, providing the foundation for deploying any of the open source code models covered in this guide. The platform handles container orchestration, GPU scheduling, and auto-scaling so teams can focus on building code completion agents rather than managing infrastructure.
Modal maintains SOC 2 Type II certification and supports HIPAA-compliant workloads on Enterprise plans via a BAA. The platform uses gVisor-based sandboxing for compute isolation, TLS 1.3 for public APIs, and encryption for data in transit and at rest.
Modal's GPU memory snapshots can reduce cold starts significantly for initialization-heavy models by skipping setup work such as imports and JIT compilation. The platform powers cloud infrastructure for over 10,000 teams, including companies running production AI workloads at scale.
Best For: Teams deploying open source code models who need production-grade infrastructure with automatic scaling, broad GPU availability, and enterprise security compliance.
Qwen3-Coder-Next represents a significant architectural advancement in code models, using a Mixture-of-Experts (MoE) design that activates only 3B of its 80B total parameters per forward pass. This sparse activation pattern delivers performance competitive with much larger dense models while dramatically reducing compute requirements.
Qwen3-Coder-Next was trained with reinforcement learning on executable tasks, giving it strong capabilities for tool use, debugging, and iterative problem-solving. This makes it particularly well-suited for autonomous coding agents that need to interact with development environments.
The sparse MoE architecture pairs well with Modal's scale-to-zero model: only 3B parameters are activated per forward pass, which can reduce compute per token versus dense 80B inference. On Modal, billing is based on the compute resources used, such as GPU, CPU, memory, and storage. Deploy Qwen3-Coder-Next on H100 GPUs through Modal Inference for production code completion endpoints.
Best For: Production coding agents requiring whole-repository context and agentic workflows, where compute efficiency matters.
Qwen3-Coder-30B-A3B-Instruct brings the instruction-tuning advantages of the Qwen3-Coder family to a model with 3.3B active parameters. This configuration offers a balance between the cutting-edge capabilities of Qwen3-Coder-Next and more accessible hardware requirements.
The instruction-tuned nature of this model makes it particularly effective for code completion scenarios where precise adherence to user instructions matters, such as generating code that follows specific style guidelines or architectural patterns.
Run Qwen3-Coder-30B-A3B-Instruct on A100 or H100 GPUs using Modal's GPU options. The model's instruction-following capabilities make it well-suited for building chat-style coding assistants.
Best For: Teams building interactive coding assistants that need strong instruction-following with reasonable GPU requirements.
Qwen2.5-Coder-32B established itself as a benchmark leader upon release in September 2024, achieving 92.7% on HumanEval Instruct and 90.2% on MBPP Instruct. With broad public availability since its September 2024 release, it represents a mature, well-studied option.
The model has extensive community evaluation and usage since its September 2024 release, with documented behaviors that make it predictable in practice.
Qwen2.5-Coder-32B can fit on an A100 80GB GPU for shorter-context BF16 inference in many setups, while long-context or higher-throughput serving typically benefits from quantization, tensor parallelism, or multiple GPUs. Use Modal's Volumes to cache model weights for faster cold starts across deployments.
Best For: Teams prioritizing proven benchmark performance and production stability over cutting-edge features.
Qwen2.5-Coder-14B occupies the middle ground in the Qwen2.5-Coder family, offering strong code generation capabilities with more moderate resource requirements than the 32B variant.
In BF16, Qwen2.5-Coder-14B fits comfortably on an L40S while maintaining competitive code generation quality. On Modal's A10 it requires quantization or offloading and a constrained context, since BF16 weights alone are roughly 29GB versus the A10's 24GB of VRAM. This makes it practical for teams that need better performance than the 7B model but don't require the full capabilities of the 32B variant.
Deploy Qwen2.5-Coder-14B on Modal's L40S GPUs for cost-effective BF16 inference, or on the A10 with quantization and a reduced context. The model pairs well with dynamic batching to maximize throughput.
Best For: Teams seeking a balance between code quality and compute costs, particularly for moderate-volume production workloads.
Qwen2.5-Coder-7B demonstrates that smaller models can achieve remarkable results, with its instruction-tuned variant reaching 88.4% on HumanEval Instruct at just 7.61B parameters. Community evaluations note it 'absolutely outperforms' larger models in its class.
The benchmark figures above refer to Qwen2.5-Coder-7B-Instruct; the base Qwen2.5-Coder-7B scores lower on both HumanEval and MBPP.
The small footprint makes Qwen2.5-Coder-7B accessible on consumer-grade GPUs and ideal for experimentation. On Modal, it runs efficiently on A10 GPUs, making it the most cost-effective option for teams exploring code completion.
Qwen2.5-Coder-7B is ideal for getting started with Modal's free tier, allowing teams to experiment with code completion agents before scaling to larger models.
Best For: Solo developers, hobby projects, and teams needing fast iteration cycles with minimal compute costs.
IBM Granite 4.1-30B brings enterprise governance features to open source code completion, with strong benchmark performance and enhanced capabilities for tool calling and agentic workflows.
Granite 4.1-30B is designed with enterprise requirements in mind, including clear IBM backing and Apache-2.0 licensing. The enhanced tool calling capabilities post-4.1 update make it well-suited for integration with existing enterprise tool ecosystems.
Deploy Granite 4.1-30B on Modal Enterprise, which supports HIPAA-compliant workloads via a BAA. The combination of Modal's security features and Granite's IBM provenance creates a strong foundation for enterprise deployments.
Best For: Enterprise teams evaluating open Apache-2.0 models with IBM provenance, where regulated-industry suitability depends on deployment controls, compliance posture, governance processes, and support arrangements.
Modal's architecture is specifically engineered for machine learning inference and training. The platform's custom container runtime, scheduler, and file system are optimized for the unique demands of CPU and GPU compute, fast cold starts, and dynamic scaling that code completion agents require.
Modal supports open-source and custom model deployment patterns, including models served from Hugging Face repos or Modal Volumes, covering the models in this guide. Whether you're running Qwen2.5-Coder-7B on an A10 or Qwen3-Coder-Next on H100 clusters, the same Modal SDK handles deployment, scaling, and monitoring. Compatibility depends on the specific model, engine, quantization, and hardware target, and the vLLM inference example shows how to deploy these models.
For code completion agents with variable traffic patterns, Modal's scale-to-zero architecture eliminates idle costs. Sparse MoE models like Qwen3-Coder-Next improve inference efficiency, and on Modal teams pay only for the compute resources they use, such as GPUs, CPU, memory, and storage.
Modal states that it powers cloud infrastructure for over 10,000 teams, spanning production AI use cases across language models, fine-tuning, batch processing, sandboxed code, and coding agents. Companies like Ramp use Modal to power Inspect, an internal background coding agent; Modal reports that roughly half of merged pull requests across Ramp's frontend and backend repos are started by Inspect.
Modal's code-first SDK eliminates infrastructure configuration overhead, with support for Python, TypeScript, and Go. Teams define compute requirements, container images, and scaling behavior directly in code. Explore the documentation to get started with deploying your first code completion model.
Selecting the optimal model depends on your specific requirements:
For teams building production code completion agents, Modal provides the infrastructure layer that makes any of these models viable at scale. Start with Qwen2.5-Coder-7B on Modal's free tier to experiment, then scale to larger models as your requirements grow.
Open source code models like Qwen2.5-Coder and Granite 4.1 offer transparency, customization potential, and strong benchmark performance. Qwen2.5-Coder-32B achieves 92.7% on HumanEval Instruct, competitive with proprietary alternatives. Running these models on infrastructure like Modal gives teams full control over their code completion systems.
Parameter count influences both capability and compute cost. Qwen2.5-Coder-7B needs roughly 15GB or more of VRAM for BF16 weights alone, with 8GB-class GPUs requiring quantized variants, while its instruction-tuned variant achieves 88.4% HumanEval. Larger models like Qwen2.5-Coder-32B offer higher benchmarks but are typically served on A100 80GB GPUs. MoE architectures like Qwen3-Coder-Next offer a middle path, with only 3B active parameters despite 80B total.
Yes. All covered model weights are available under Apache-2.0 licenses, according to their Hugging Face model cards, which permit fine-tuning. Modal's training infrastructure supports fine-tuning workflows with access to multi-node GPU clusters. The Qwen2.5-Coder family was specifically designed with fine-tuning in mind.
Hardware requirements vary by model. Qwen2.5-Coder-7B runs on consumer GPUs, with roughly 15GB or more of VRAM needed for BF16 weights alone. Qwen2.5-Coder-32B and Granite 4.1-30B are typically served on A100 80GB GPUs, with long-context or high-throughput serving often needing quantization or multiple GPUs. Qwen3-Coder-Next requires 46GB minimum with quantization. Modal handles GPU provisioning automatically, so teams don't need to manage hardware directly.
Modal provides fast cold starts, scale-to-zero economics, and broad GPU availability from T4 through H100 and B200. The platform handles container orchestration, GPU scheduling, and auto-scaling, allowing teams to focus on agent logic rather than infrastructure. Modal's sandbox capabilities also enable secure execution of AI-generated code.