General purpose and open source models may not cover every domain, especially when data is scarce or restricted for compliance reasons. Aryan outlines prompting, retrieval augmented generation, and fine-tuning as ways to address those gaps. She also notes that models can transfer some learned structure across domains without requiring new training data for every use case.
Domain adaptation and fine-tuning for domain-specific LLMs
Speaker
Abi Aryan of AI Engineer gives an overview of domain adaptation and fine-tuning for large language models at an AI Engineer presentation.
Updating every model weight takes more storage and computation, so Aryan focuses on methods that update only part of a model. She describes adapter tuning, which adds a small number of parameters and, according to the original paper she cites, used 0.15% of parameters. Prefix tuning adds learned weights before attention, while LoRA reduces the weight update through low-rank adaptation.
Aryan compares prompting, retrieval augmented generation, and fine-tuning, noting that prompting is cheaper and needs less training data but may perform less well than fine-tuning. Adaptive fine-tuning suits several tasks within one domain, while behavioral fine-tuning targets one task. Parameter-efficient methods such as LoRA freeze most parameters and update a smaller portion; these approaches can also be combined with prompting or retrieval.
Results depend on data collection and preparation, including cleaning, normalization, noise removal, and deduplication. Aryan cautions that a domain-tuned model may capture its training data's nuances without matching a general model on unfamiliar data. She recommends considering dynamic in-context examples, breaking tasks into smaller pieces, and gradient checkpointing to reduce memory use, then evaluating with metrics, tools, models, and human review.
Aryan says model performance depends on more than the fine-tuning method. Teams need to plan for data collection, storage, and base model selection, as well as drift, early problem detection, and compliance risks. A successful demo alone does not establish that an application will remain robust over time.
Takeaways
- Choose between prompting, retrieval, and fine-tuning based on data availability, cost, and the target use case.
- Use adaptive fine-tuning for multiple tasks in one domain and behavioral fine-tuning for a specific task.
- Clean and deduplicate training data because repeated examples can increase memorization.
- Evaluate models against business-specific needs; accuracy and perplexity do not capture the full picture.
- Budget for the full pipeline, including drift monitoring, memory use, storage, and compliance.
Mentioned in this talk
Search inside this talk
What was claimed 6
- feature
ChatGPT: Not trained for every use case
“ChatGPT, or even open-source large language models, aren't trained for every single use case.”
YouTube Unverified1 source· Talk
- metricAdapter tuning: Can improve or match model performance using 0.15% of the parameters, according to the original paper
“it can improve—or match—the model's performance using only 0.15% of the parameters.”
YouTube Unverified1 source· Talk
- featureQLoRA: Changes model weights to 4-bit precision
“It changes the model weights to 4-bit precision.”
YouTube Unverified1 source· Talk
- usesQLoRA uses bitsandbytes
“getting it to perform really well requires bitsandbytes and other libraries”
YouTube Unverified1 source· Talk
- featureGradient checkpointing: Reduces memory usage by retaining model state and recomputing activations during the backward pass
“It reduces memory usage by retaining the model state and recomputing activations during the backward pass.”
YouTube Unverified1 source· Talk
- feature
Weights & Biases: Has a library for tool-based evaluation, including an auto-evaluation debugger
“Weights & Biases has a library for this, including an auto-evaluation debugger”
YouTube Unverified1 source· Talk















