Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

AWS Architecture Blog 8 min read How-to easyNovice

Scale distributed AI workloads with Ray and Anyscale on Amazon EC2

Ray, run as the managed Anyscale service inside your own AWS account, can carry a multimodal AI/ML pipeline from a single instance to multi-node clusters without code changes. There are three deployment paths: plain EC2 with EFA as the default, EKS with Karpenter for Kubernetes shops, and SageMaker HyperPod for long, failure-sensitive training runs. Each Ray library is mapped to suitable hardware: Graviton and Spot for Ray Data preprocessing, GPUs and Trainium for Ray Train, and Inferentia or Graviton for Ray Serve. Costs are layered as Savings Plans plus Spot (with head nodes kept On-Demand and checkpoint-based recovery), Capacity Blocks for scheduled training, and On-Demand for bursts.

Related posts

  • Building Blocks for Foundation Model Training and Inference on AWS

    Hugging Face hardMaster

    Foundation-model pre-training, post-training and test-time inference now converge on the same infrastructure needs: tightly coupled accelerators, high-bandwidth low-latency networking, tiered distributed storage, orchestration and observability. On AWS this maps to P5/P6 GPU instances (H100 through B300, with dense FLOPS, HBM and NVLink/EFA bandwidth compared), EFA's OS-bypass SRD networking, NVMe plus FSx for Lustre plus S3 storage tiers, UltraClusters, and GB200 NVL72 UltraServers that widen the NVLink domain for communication-heavy workloads such as MoE all-to-all. Orchestration is handled by Slurm (job-level atomic allocation, backfill, topology-aware placement, GRES) and Kubernetes, deployed via ParallelCluster, PCS or SageMaker HyperPod. As models scale, step time is increasingly bound by collective communication and memory movement rather than raw compute, so scale-up and scale-out bandwidth deserve explicit accounting.

  • Why we’re switching to Hugging Face Inference Endpoints, and maybe you should too

    Hugging Face mediumAdept

    A team moved CPU-based transformer inference off a self-built FastAPI + Docker + AWS ECS/Fargate stack onto Hugging Face Inference Endpoints, collapsing deployment to train, push to Hub, deploy. In ab benchmarks with a RoBERTa text classifier, a 4-vCPU endpoint answered in 80±30 ms versus ~200 ms on their ECS container, and an 8-vCPU endpoint in 43 ms. Cost runs 24–50% higher than Fargate (about $60/month more for a large instance), which they judge worth it without a dedicated MLOps team, though not at hundreds of services. The main gap they note is the lack of a Terraform provider; they deploy with their own hugie CLI.

  • Run AI workloads on any cloud, store on Hugging Face: zero-egress storage with SkyPilot

    Hugging Face mediumAdept

    SkyPilot now supports Hugging Face Storage as a first-class backend (`store: hf`), so jobs on any of 20+ clouds, Kubernetes or on-prem can mount Hub buckets (read-write) or model/dataset repos (read-only) via an `hf://` URL and an existing `HF_TOKEN`. MOUNT mode uses the `hf-mount` FUSE driver with lazy, byte-range reads and an on-disk cache. Because Hugging Face charges no egress, reads onto GPUs anywhere are free; writes still pay the compute cloud's egress. A Qwen3.5-4B fine-tune loaded the model in about 30 seconds and wrote 8.43 GB checkpoints at roughly 112-168 MB/s across AWS, GCP and Lambda, while Xet content-defined chunking deduplicates incremental checkpoints, model variants and appended Parquet data.

  • Autoscaling Autoresearch: Give your agents elastic GPUs on Modal

    Modal mediumAdept

    A Claude Code agent equipped with Modal Skills ran OpenAI's Parameter Golf challenge overnight, executing 113 experiments over 238 GPU-hours and dropping bits-per-byte from 1.42 to 1.12. The agent changed its compute footprint as the work required. It used single-GPU Sandboxes for smoke tests, about 40 parallel single-H100 runs for a hyperparameter sweep, and five concurrent 8×H100 jobs for validation. It dropped back to one or two runs while debugging a CPU-bound GPTQ quantization step, which it eventually fixed by moving quantization to GPU. Compared with an 8-GPU workstation and a 40-GPU always-on cluster, elastic provisioning finished the core runs about 5x faster than the workstation and avoided paying for idle capacity during exploration and debugging.

  • Slack AI: The Path to Multi-Cloud

    Slack Engineering mediumAdept

    Slack AI's LLM serving evolved over three years through four phases: self-managed AWS SageMaker endpoints in an escrow VPC, Amazon Bedrock Provisioned Throughput, a hybrid of Provisioned Throughput and On-Demand with spillover routing, and finally a multi-cloud setup adding GCP Vertex AI. Each move addressed a concrete pain point: GPU scarcity and scaling latency, model availability lag, idle capacity from workday traffic peaks, multi-month commitment lock-in, and single-provider concentration risk. The Bedrock migration had zero customer-facing incidents, achieved through load tests to size Model Units, shadow requests, A/B quality checks and feature-flag rollouts. Per-feature model fallback hierarchies and telemetry-based cross-provider routing then delivered about 10% quality gains on reasoning tasks and about 67% lower latency on low-token workloads.

The quest for software engineering knowledge.

Look:
Layout: