AI 및 머신 러닝에서 CPU 중요한 역할에 대해 알아보세요. 데이터 준비, 추론에서 CPU가 어떻게 사용되는지, 그리고 GPU/TPU와 어떻게 비교되는지 알아보세요.
A Central Processing Unit (CPU) is the primary component of a computer that acts as its "brain," responsible for interpreting and executing instructions from hardware and software. In the context of artificial intelligence (AI), the CPU plays a fundamental role in data handling, system orchestration, and executing inference, particularly on edge devices where power efficiency is critical. While specialized hardware like GPUs are often associated with the heavy lifting of training deep learning models, the CPU remains indispensable for the overall machine learning (ML) pipeline.
Although GPUs are celebrated for their massive parallelism during training, the CPU is the workhorse for many essential stages of the computer vision (CV) lifecycle. Its architecture, typically based on x86 (Intel, AMD) or ARM designs, is optimized for sequential processing and complex logic control.
하드웨어 환경을 이해하는 것은 머신 러닝 운영(MLOps)을 최적화하는 데 매우 중요합니다. 이러한 프로세서들은 아키텍처와 이상적인 사용 사례 측면에서 크게 다릅니다.
CPUs are frequently the hardware of choice for applications where cost, availability, and energy consumption outweigh the need for massive raw throughput.
개발자들은 서버리스 컴퓨팅 환경이나 저전력 장치와의 호환성을 검증하기 위해 모델을 CPU에서 테스트하는 경우가 많습니다. Ultralytics 사용하면 CPU 쉽게 타겟팅할 수 있어 애플리케이션이 어디서나 실행되도록 보장합니다.
다음 예제는 경량 모델을 로드하고 추론을 CPU 실행하는 방법을 보여줍니다:
from ultralytics import YOLO
# Load the lightweight YOLO26 nano model
# Smaller models are optimized for faster CPU execution
model = YOLO("yolo26n.pt")
# Run inference on an image, explicitly setting the device to 'cpu'
results = model.predict("https://ultralytics.com/images/bus.jpg", device="cpu")
# Print the detection results (bounding boxes)
print(results[0].boxes.xywh)
To further improve performance on Intel CPUs, developers can export their models to the OpenVINO format, which optimizes the neural network structure specifically for x86 architecture. For managing datasets and orchestrating these deployments, tools like the Ultralytics Platform simplify the workflow from annotation to edge execution.