# Why do we implement models like Llama again in examples/models/ and how is it different from the HF implementation for the same?

**URL:** <https://discuss.pytorch.org/t/why-do-we-implement-models-like-llama-again-in-examples-models-and-how-is-it-different-from-the-hf-implementation-for-the-same/219860>\
**Category:** ExecuTorch\
**Created:** [May 8, 2025, 7:39am UTC](https://discuss.pytorch.org/t/why-do-we-implement-models-like-llama-again-in-examples-models-and-how-is-it-different-from-the-hf-implementation-for-the-same/219860 "2025-05-08T07:39:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anzr299](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/anzr299/32/76947_2.png) [@anzr299](https://discuss.pytorch.org/u/anzr299)\
**Post date:** [May 8, 2025, 7:39am UTC](https://discuss.pytorch.org/t/why-do-we-implement-models-like-llama-again-in-examples-models-and-how-is-it-different-from-the-hf-implementation-for-the-same/219860/1 "2025-05-08T07:39:57Z")

</div>

Hi everyone,

I noticed that in executorch, the models are also implemented in `examples/model/` which are used for exporting the model to ExportedProgram. But my question is how is this model implementation different from HF implementation and also the optimum-executorch flow for exporting the models.

---

<div class="post-metadata">

**Author:** ![anzr299](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/anzr299/32/76947_2.png) [@anzr299](https://discuss.pytorch.org/u/anzr299)\
**Post date:** [May 28, 2025, 7:29am UTC](https://discuss.pytorch.org/t/why-do-we-implement-models-like-llama-again-in-examples-models-and-how-is-it-different-from-the-hf-implementation-for-the-same/219860/2 "2025-05-28T07:29:22Z")

</div>

This question is answered here: [Why are models like Llama implemented again in examples/models/ ? · Issue #11130 · pytorch/executorch · GitHub](https://github.com/pytorch/executorch/issues/11130)
