Adaptive Task Vectors for Large Language Models