A Scalable Framework for Trajectory Prediction