Efficient Sampling for Data-Driven Frequency Stability Constraint via Forward-Mode Automatic Differentiation