mlsanityData to 7 Oct 2026

The interplay between domain specialization and model size

arXiv 2501.02068 ↗First posted 3 Jan 2025cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Scaling laws for language models have often focused on finding the optimal model size and token count for training from scratch. However, achieving this optimal balance requires significant compute resources due to the extensive data demands when training models from randomly-initialized weights. Continued pretraining offers a cost-effective alternative, leveraging the compute investment from pretrained models to incorporate new knowledge without requiring extensive new data. Recent findings suggest that data quality influences constants in scaling laws, thereby altering the optimal parameter-token allocation ratio. Building on this insight, we investigate the interplay between domain specialization and model size during continued pretraining under compute-constrained scenarios. Our goal is to identify an optimal training regime for this scenario and detect patterns in this interplay that can be generalized across different model sizes and domains. To compare general and specialized training, we filtered a web-based dataset to extract data from three domains: legal, medical, and accounting. We pretrained models with 1.5B, 3B, 7B, and 14B parameters on both the unfiltered and filtered datasets, then evaluated their performance on domain-specific exams. Results show that as model size increases, specialized models outperform general models while requiring less training compute. Additionally, their growing compute efficiency leads to reduced forgetting of previously learned knowledge.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 16 of its 26 references that are in the map. First posted on arXiv 3 Jan 2025.

Builds on

16 of 26 references.

References · 16

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2020Scaling Laws for Neural Language Modelscited by 6,411
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  4. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
  5. 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
  6. 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 475
  7. 2024BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domainscited by 299
  8. 2021Scaling Laws for Transfercited by 265
  9. 2022Predictability and Surprise in Large Generative Modelscited by 209
  10. 2024Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performancecited by 179
  11. 2024SaulLM-7B: A pioneering Large Language Model for Lawcited by 136
  12. 2022Training Trajectories of Language Models Across Scalescited by 80
4 more
  1. 2024Scaling Laws for Predicting Downstream Performance in LLMscited by 48
  2. 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domaincited by 39
  3. 2024CMR Scaling Law: Predicting Critical Mixture Ratios for Continual Pre-training of Language Modelscited by 23
  4. 2021LegalNLP -- Natural Language Processing methods for the Brazilian Legal Languagecited by 6

Built on by

Not cited yet.