When is a large foundation model unjustified? Simple models vs LLMs.
Written by the mlprep team · Updated
When is reaching for a large foundation model the wrong choice? Walk me through how you'd decide between a logistic regression, a gradient boosted tree, a fine-tuned BERT, and GPT-4 for a new ML task.
The default has flipped — and that's a problem#
In 2024, the default for many teams became "use an LLM." This is often wrong. Large foundation models are powerful but come with real costs that teams routinely underestimate when excited about a demo.
A strong senior answer starts with: "What constraints does this system need to satisfy?" — not "which model is most capable?"
Dimensions for the decision#
Inference cost and scale
A logistic regression scores a million requests for pennies. A gradient boosted tree costs microseconds per inference. Fine-tuned BERT (110M params) costs ~5ms on a GPU. GPT-4 costs $0.01–$0.03 per 1K tokens, with latency in seconds.
At 10M daily requests, GPT-4 at $0.02/request = $200,000/day. A fine-tuned BERT running on a single A100 = ~$300/day. A sklearn model = $10/day in compute.
Cost alone doesn't decide — but it forces the question: does this problem require that level of capability?
Latency SLA
If you need sub-100ms response times (search ranking, ad serving, fraud detection), an LLM is out. Even with caching and streaming, GPT-4 adds 1-3 seconds of latency. Use a smaller, faster model.
Interpretability and compliance
Regulated industries (finance, healthcare, legal) often require explainable decisions. "The model said so" fails regulatory audit. Logistic regression with coefficient explanations, GBDT with SHAP values — these have interpretable decision paths. LLMs don't, and hallucinations create liability.
Data volume and labeling cost
For a narrow, well-defined classification task with 10K labeled examples, fine-tuning a small transformer or training a GBDT is cheaper and often better than GPT-4 prompting, which requires prompt engineering, is sensitive to input formatting, and isn't reproducible across API versions.
For open-ended tasks with no good labeled dataset and diverse inputs, a foundation model with few-shot prompting gets you started faster than collecting labeled data.
Evaluation reliability
Can you reliably measure whether the model is doing the right thing? If yes (binary classification with clear labels), a GBDT is faster to iterate. If evaluation requires human judgment on open-ended outputs (is this summary good?), you're in LLM territory — but now you also have an evaluation debt problem. Model quality is hard to track over time when you can't run automated evals.
Maintenance complexity and organizational maturity
Running a fine-tuned LLM in production requires: GPU infrastructure, versioning and rollback of model weights, prompt drift monitoring, cost tracking, rate limiting, and alignment with an external API's deprecation schedule. A sklearn pipeline requires: a CI/CD system you probably already have.
Teams underestimate this. A 6-person ML team that deploys GPT-4 for a core feature is now dependent on OpenAI's uptime, pricing, and model changes.
Decision framework#
Task is well-defined + labels available + latency < 100ms?
→ GBDT or fine-tuned small model (BERT-scale)
Task is well-defined + labels available + latency flexible?
→ Fine-tune BERT or similar, evaluate against GBDT
Task needs language understanding + limited labels?
→ Few-shot prompting or RAG with LLM
→ Fine-tune if prompting isn't reliable enough
Task is open-ended, generative, or needs world knowledge?
→ Foundation model. But scope cost carefully.
When to use each#
Logistic regression / linear models: low-latency scoring of dense tabular features, interpretability required, production stability matters more than last-mile accuracy, large-scale serving (ad CTR prediction, spam filtering at billion-scale).
GBDT (XGBoost/LightGBM): tabular data with heterogeneous features, missing values, moderate latency, no embeddings needed. The default for structured data problems.
Fine-tuned BERT-scale transformer: NLP classification/extraction with labeled data, latency in tens of milliseconds OK, you need semantic understanding but not generation. Sentiment analysis, intent classification, named entity recognition.
RAG + LLM: knowledge retrieval, QA over a document corpus, tasks requiring reasoning over context the model wasn't trained on. Retrieval handles factual grounding; LLM handles synthesis.
Fine-tuned LLM (7B–70B): complex generation tasks where quality matters enough to justify cost, you can't rely on an external API, you need determinism or data privacy. Customer support, code generation, content creation at known scale.
GPT-4/Claude-scale via API: prototyping and proving the task is solvable, tasks with low volume where quality is paramount, internal tools, tasks requiring broad world knowledge + complex reasoning.
Distillation as the middle path#
If a large model solves the task but serving it is too expensive: use the large model to generate training labels, then train a small model (GBDT, fine-tuned BERT) to imitate it. You pay the large model cost once at training time, serve cheaply forever. Quality gap is usually small for well-defined tasks.
The key takeaway unlocks after you reveal an expert answer.
Key Takeaway
Reach for simpler models first: GBDT for tabular data, fine-tuned BERT for NLP classification, logistic regression for latency-critical scoring. Foundation models are justified when: task is open-ended or generative, labeled data is scarce, you need world knowledge or complex reasoning, and volume is low enough to absorb cost. At 10M/day, GPT-4 costs 1000× more than a small fine-tuned model. Distillation bridges the gap: label with a large model, serve with a small one. Evaluate organizational maturity to maintain what you deploy.
Follow-up Questions to Test Yourself
Interviewers often pivot here once you cover the core concept.
- How would you use knowledge distillation to compress a GPT-4-level capability into a BERT-scale model for a classification task?
- Your team wants to use RAG for a customer support bot. How do you decide if RAG is better than fine-tuning, and how would you evaluate either?
- A PM asks why you're not just using GPT-4 for everything. Walk me through the cost and reliability argument without dismissing the capability.
How confident do you feel explaining this?
Track your understanding or flag it to revisit before your next loop.
Related Questions
Fine-tuning vs RAG: tradeoffs and when to use each
How would you design a RAG system that answers questions over a company's internal documents?
How do long-context transformers work, and where do they fail?
What is DSPy and when should you use it over manual prompting?