모델을 구현할 때는 간단하게 시작합니다. ML의 대부분의 작업은 데이터 측면에서 이루어지므로 복잡한 모델에 전체 파이프라인을 실행하는 것이 모델 자체를 반복하는 것보다 어렵습니다. 데이터 파이프라인을 설정하고 몇 가지 기능을 사용하는 간단한 모델을 구현한 후 더 나은 모델을 반복적으로 만들 수 있습니다.
단순한 모델은 실행하지 않더라도 좋은 기준을 제공합니다.
사실 단순한 모델을 사용하는 것이 생각보다 나을 수 있습니다. 단순하게 시작하면 복잡한 모델이 필요한지 여부를 판단하는 데 도움이 됩니다.
자체 모델 학습과 이미 학습된 모델 사용 비교
학습된 모델은 다양한 사용 사례에 존재하며 많은 이점을 제공합니다. 하지만 학습된 모델은 라벨과 특징이 데이터 세트와 정확하게 일치하는 경우에만 제대로 작동합니다. 예를 들어 학습된 모델이 25개의 특성을 사용하고 데이터 세트에 24개만 포함되어 있으면 학습된 모델이 잘못된 예측을 할 가능성이 큽니다.
일반적으로 ML 실무자는 미세 조정 또는 전이 학습을 위해 학습된 모델의 입력과 일치하는 하위 섹션을 사용합니다. 특정 사용 사례에 맞는 학습된 모델이 없는 경우 자체 모델을 학습할 때 학습된 모델의 하위 섹션을 사용하는 것이 좋습니다.
경우에 따라 새로 학습된 모델이 현재 프로덕션에 있는 모델보다 성능이 좋지 않을 수 있습니다. 그렇다면 프로덕션으로 출시되지 않도록 하고 자동 배포에 실패했다는 알림을 받으세요.
학습-서빙 편향
추론에 사용되는 수신되는 특성 중 학습에 사용된 데이터의 분포 범위를 벗어나는 값이 있으면 모델이 잘못된 예측을 할 가능성이 높으므로 알림을 받으세요. 예를 들어 모델이 해수면에서 적도 도시의 기온을 예측하도록 학습된 경우 서빙 시스템은 모델이 학습된 범위를 벗어난 위도, 경도 또는 고도가 포함된 수신 데이터를 알립니다.
반대로 모델이 학습 중에 확인된 분포 범위를 벗어난 예측을 하는 경우 서빙 시스템에서 알림을 보내야 합니다.
추론 서버
RPC 시스템을 통해 추론을 제공하는 경우 RPC 서버 자체를 모니터링하고 추론 제공이 중지되면 알림을 받으세요.
[null,null,["최종 업데이트: 2025-05-08(UTC)"],[[["\u003cp\u003eBegin with a simple model and prioritize data pipeline setup before complex model iterations.\u003c/p\u003e\n"],["\u003cp\u003eSimple models offer valuable baselines and help assess the necessity of complex models.\u003c/p\u003e\n"],["\u003cp\u003eConsider utilizing pre-trained models or their subsections when applicable, particularly for generative AI.\u003c/p\u003e\n"],["\u003cp\u003eImplement monitoring and alerting systems for model deployment, training-serving skew, and inference servers.\u003c/p\u003e\n"]]],[],null,["# Implementing a model\n\n\u003cbr /\u003e\n\nWhen implementing a model, start simple. Most of the work in ML is on the data\nside, so getting a full pipeline running for a complex model is harder than\niterating on the model itself. After setting up your data pipeline and\nimplementing a simple model that uses a few features, you can iterate on\ncreating a better model.\n\nSimple models provide a good baseline, even if you don't end up launching them.\nIn fact, using a simple model is probably better than you think. Starting simple\nhelps you determine whether or not a complex model is even justified.\n\nTrain your own model versus using an already trained model\n----------------------------------------------------------\n\nTrained models exist for a variety of use cases and offer many\nadvantages. However, trained models only really work when the label and\nfeatures match your dataset exactly. For example, if a trained model\nuses 25 features and your dataset only includes 24 of them, the trained\nmodel will most likely make bad predictions.\n\nCommonly, ML practitioners use matching subsections of inputs from a\ntrained model for fine-tuning or transfer learning. If a trained model\ndoesn't exist for your particular use case, consider\nusing subsections from a trained model when training your own.\n| **Note:** If your solution is a generative AI model, you'll almost always fine-tune a [pre-trained model](/machine-learning/glossary#pre-trained-model) instead of training your own.\n\nFor information on trained models, see\n\n- [Trained models from TensorFlow Hub](https://www.tensorflow.org/hub)\n\n- [Trained models from Kaggle](https://www.kaggle.com/models)\n\nMonitoring\n----------\n\nDuring problem framing, consider the monitoring and alerting infrastructure your\nML solution needs.\n\n### Model deployment\n\nIn some cases, a newly trained model might be worse than the model currently in\nproduction. If it is, you'll want to prevent it from being released into\nproduction and get an alert that your automated deployment has failed.\n\n### Training-serving skew\n\nIf any of the incoming features used for inference have values that fall outside\nthe distribution range of the data used in training, you'll want to be alerted\nbecause it's likely the model will make poor predictions. For example, if your\nmodel was trained to predict temperatures for equatorial cities at sea level,\nthen your serving system should alert you of incoming data with latitudes and\nlongitudes, and/or altitudes outside the range the model was trained on.\nConversely, the serving system should alert you if the model is making\npredictions that are outside the distribution range that was seen during\ntraining.\n\n### Inference server\n\nIf you're providing inferences through an RPC system, you'll want to monitor the\nRPC server itself and get an alert if it stops providing inferences."]]