← All questions
Retrieval & EmbeddingsHard· REPLUG· Retriever Training· Distillation

When using a hosted generator with no gradient access,...

Since the generator’s weights are inaccessible, you cannot backpropagate through it. Instead, treat the generator as a black-box scoring function. By conditioning the generator on various retrieved chunks and measuring the likelihood of the correct answer, you generate a distribution of scores. You then train the retriever to minimize the KL divergence between its own retrieval distribution and this generator-derived distribution, effectively distilling the generator’s preferences into the retriever.

Code playground (Python)