# Where are the jax jit annotations in flax models?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhere-are-the-jax-jit-annotations-in-flax-models%2F17430%3E%5C
**Category:** Flax/JAX Projects\
**Created:** [May 2, 2022, 2:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhere-are-the-jax-jit-annotations-in-flax-models%2F17430 "2022-05-02T14:20:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashim95](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@ashim95](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fashim95)%5C
**Post date:** [May 2, 2022, 2:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhere-are-the-jax-jit-annotations-in-flax-models%2F17430%2F1 "2022-05-02T14:20:34Z")

</div>

Hi,

I wrote my own BERT model using `dm-haiku` ([GitHub - deepmind/dm-haiku: JAX-based neural network library](https://github.com/deepmind/dm-haiku)) and jax. My model is at least 15x slower than the flax models you have in `transformers`. I am trying to see if my `jit` calls are misplaced.

While greping the files in `examples/flax/text-classification` or in `src/transformers`, I don’t find any `jit` calls. Where is the `jitting` happening? Is `flax` handling that?

Thanks,
