179 questions
No questions match those filters.
← All questions
Retrieval & EmbeddingsHard· Gradient Checkpointing· Memory Optimization· Contrastive Learning
Your teammate says the queue is a hack - use gradient c...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansWhile gradient checkpointing allows for larger batches and exact gradients, it is computationally expensive. It requires recomputing forward passes, which does not scale well compared to the queue-based approach. Furthermore, exact gradients on negatives with very high margins provide negligible benefit. Grad-Cache is a better alternative for exact gradients, but the queue remains the most efficient method for amortizing the encoding cost of key vectors.