AWS EC2 GPU token limit exceeded during language model evaluation
Problem — Token‑limit failures during language‑model evaluation on AWS EC2 GPU instances When running a Hugging Face transformers evaluation pipeline on an EC2 GPU instance (e.g., p3.2xlarge, g5.12xlarge), the script aborts with errors such as: ValueError: Token indices sequence length is longer than the model maximum sequence length (max_length=2048). or RuntimeError: CUDA out of memory. Tried to allocate 12.3 GiB … Read more