perf(core): Lazily import transformers (#38037)