Which of the following is NOT typically considered a direct cost component when optimizing machine learning model deployment?
Think about costs directly tied to running and maintaining the model versus indirect overhead.
Developer salaries are indirect operational costs, not direct costs of model deployment or training.
You need to deploy a model on edge devices with limited compute and power. Which model type is the most cost-efficient choice?
Consider model size and computational requirements for edge deployment.
Small CNNs with quantization reduce model size and computation, lowering cost on edge devices.
Given two models with the following metrics:
- Model A: Accuracy 92%, Inference cost $0.10 per 1000 predictions
- Model B: Accuracy 90%, Inference cost $0.02 per 1000 predictions
Which metric best helps decide the cost-effectiveness of these models?
Think about combining accuracy and cost into one measure.
Dividing accuracy by cost gives a ratio showing performance per cost unit, aiding cost-effectiveness decisions.
Consider this Python snippet for training a model:
for epoch in range(10):
for batch in data_loader:
outputs = model(batch)
loss = loss_fn(outputs, batch.labels)
optimizer.zero_grad()
loss.backward()
optimizer.step()
time.sleep(5)What is the main cause of unnecessary cost increase?
Look for code that delays training without benefit.
The time.sleep(5) pauses training each batch, wasting compute time and increasing cost.
You want to reduce training cost by adjusting batch size and learning rate. Which combination is most likely to reduce cost without hurting model convergence?
Think about how batch size affects training speed and learning rate affects convergence.
Increasing batch size reduces number of updates, and increasing learning rate can maintain convergence speed, lowering cost.