# ray

> Scales Python ML workloads across clusters using Ray's distributed tasks, actors, data, and serving capabilities.

- Skill: `majiayu000/ray` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/ray`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/ray/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML, Coding & Dev Tools, Model Training & Fine-tuning
- Tags: Distributed Computing, Kuberay, Pytorch, Ray, Ray Serve, Ray Tune, Vllm
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/majiayu000/ray

---


# Ray

Ray is the compute layer for AI. It powers ChatGPT training and massive scale workloads. v3.0 (2025) improves **efficiency** and adds an **MCP Server** for agents.

## When to Use

- **Distributed Training**: Scaling PyTorch across 100 GPUs.
- **Ray Serve**: Serving LLMs with high throughput (vLLM integration).
- **Hyperparameter Tuning**: Ray Tune is the industry standard.

## Core Concepts

### Actors & Tasks

- **Task**: Stateless function (like Lambda).
- **Actor**: Stateful class (like a microservice).

### Object Store

Shared memory across the cluster means zero-copy data sharing.

## Best Practices (2025)

**Do**:

- **Use `ray.data`**: For streaming massive datasets into trainers.
- **Use KubeRay**: The Kubernetes operator for managing Ray clusters.
- **Use Ray Serve**: It supports "Model Composition" (chaining models).

**Don't**:

- **Don't use for simple scripts**: The overhead of starting a Ray cluster is 5-10s.

## References

- [Ray Documentation](https://docs.ray.io/)

