Model Adaptation Strategies
Model adaptation strategies are techniques for customizing large language model behavior to suit specific tasks and domains. They include prompting, few-shot learning, retrieval-augmented generation, and fine-tuning, each suited to different requirements for knowledge, behavior change, and resource investment.
itArtificial intelligence and machine learning | OpenSkills.info
Intro
Model Adaptation Strategies
Large language models arrive pre-trained on vast corpora, but production applications rarely use them unchanged. Adaptation can change output format, supply private knowledge, or tune domain-specific behavior. Choosing the appropriate technique is one of the most consequential decisions in an LLM project.
The Adaptation Spectrum
Model adaptation exists on a spectrum from lightweight runtime techniques to permanent model modifications. At one end, prompting requires no changes to model weights and costs nothing to experiment with. At the other, fine-tuning permanently alters model behavior through training. Between these extremes lie hybrid approaches that combine external knowledge with model capabilities.
The choice depends on three factors: what you are changing (knowledge or behavior), how often that content changes, and what resources you can invest. A customer support bot answering questions from a product manual has different requirements than a code generator that must output in a specific style.
Prompting and In-Context Learning
Prompting shapes model behavior entirely through input text. System prompts, user prompts, and few-shot examples all fall under this category. No model weights are modified; everything happens at inference time.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.databricks.com/blog/rag-vs-fine-tuning
Supports
- RAG supplies retrieved knowledge at inference time, while fine-tuning changes a model through additional training.
- https://arxiv.org/html/2406.06399v1
Supports
- Model adaptation methods have different data, compute, evaluation, and maintenance requirements.
- https://arxiv.org/html/2403.01432v3
Supports
- Parameter-efficient fine-tuning methods adapt models by training a small subset of parameters or added modules.
- https://denser.ai/blog/rag-vs-fine-tuning/
Supports
- A practical comparison can use knowledge freshness, behavior change, and operating cost to choose between RAG and fine-tuning.
- https://machinelearningmastery.com/the-machine-learning-practitioners-guide-to-fine-tuning-language-models/
Supports
- Fine-tuning requires task-specific training data, model evaluation, and ongoing maintenance.
- https://arxiv.org/html/2408.01346v1
Supports
- LLM adaptation includes prompting, retrieval, full fine-tuning, and parameter-efficient alternatives.
