기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
JumpStart 모델 사용
CLI 또는 SDK를 사용하여 추론을 위해 사전 훈련된 JumpStart 모델을 배포할 수 있습니다.
CLI 사용
다음 명령을 실행하여 JumpStart 모델을 배포합니다.
hyp create hyp-jumpstart-endpoint \ --version 1.0 \ --model-id deepseek-llm-r1-distill-qwen-1-5b \ --instance-type ml.g5.8xlarge \ --endpoint-name endpoint-test-jscli
SDK 사용
다음 콘텐츠를 사용하여 Python 스크립트를 생성합니다.
from sagemaker.hyperpod.inference.config.hp_jumpstart_endpoint_config import Model, Server, SageMakerEndpoint, TlsConfig from sagemaker.hyperpod.inference.hp_jumpstart_endpoint import HPJumpStartEndpoint model=Model( model_id='deepseek-llm-r1-distill-qwen-1-5b' ) server=Server( instance_type='ml.g5.8xlarge', ) endpoint_name=SageMakerEndpoint(name='<endpoint-name>') # create spec js_endpoint=HPJumpStartEndpoint( model=model, server=server, sage_maker_endpoint=endpoint_name )
API 엔드포인트 호출
CLI 사용
샘플 입력을 사용하여 엔드포인트를 테스트합니다.
hyp invoke hyp-jumpstart-endpoint \ --endpoint-name endpoint-jumpstart \ --body '{"inputs":"What is the capital of USA?"}'
SDK 사용
Python 스크립트에 다음 코드를 추가합니다.
data = '{"inputs":"What is the capital of USA?"}' response = js_endpoint.invoke(body=data).body.read() print(response)
엔드포인트 관리
CLI 사용
엔드포인트를 나열하고 검사합니다.
hyp list hyp-jumpstart-endpoint hyp get hyp-jumpstart-endpoint --name endpoint-jumpstart
SDK 사용
Python 스크립트에 다음 코드를 추가합니다.
endpoint_iterator = HPJumpStartEndpoint.list() for endpoint in endpoint_iterator: print(endpoint.name, endpoint.status) logs = js_endpoint.get_logs() print(logs)
리소스 정리
완료되면 엔드포인트를 삭제하여 불필요한 비용을 방지합니다.
CLI 사용
hyp delete hyp-jumpstart-endpoint --name endpoint-jumpstart
SDK 사용
js_endpoint.delete()
다음 단계
PyTorch 모델을 훈련하고, 사용자 지정 엔드포인트로 배포하고, HyperPod의 CLI 및 SDK를 사용하여 JumpStart 모델을 배포했으므로 이제 고급 기능을 살펴보세요.
-
다중 노드 훈련: 여러 인스턴스에서 훈련 규모 조정
-
사용자 지정 컨테이너: 특수 훈련 환경 구축
-
SageMaker Pipelines과 통합: ML 워크플로 자동화
-
고급 모니터링: 사용자 지정 지표 및 알림 설정
추가 예시 및 고급 구성은 SageMaker HyperPod GitHub 리포지토리