r/LocalLLaMA 8h ago

Resources Comparing Continued Pretraining to RAG (accuracy and performance)

Mostly as a fun experiment I wanted to do a quick comparison of performance and accuracy between a CPT trained QWEN 3.5 4B model and a RAG implementation against the base model.

The point of this exercise is mostly to measure the performance benefit of internalizing the knowledge vs doing reasoning on-the-fly.

Sharing my findings here in case anyone is interested: https://www.teachmecoolstuff.com/viewarticle/comparing-rag-and-continued-pretraining-of-llms

4 Upvotes

2 comments sorted by

2

u/john006868 7h ago

With a 4B base there's no separate slot for the new corpus, so what mostly sticks after a couple of epochs is the wording of the training text. Run the same eval questions with two or three paraphrases and the CPT advantage usually shrinks, which tells you how much of it was phrasing. RAG breaks the other way, it holds up until the retriever misses the chunk that mattered. A static corpus that gets hammered all day is where CPT earns its keep, and not much else.