# How does Transformers Library work under the hood?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-does-transformers-library-work-under-the-hood%2F156346%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 22, 2025, 10:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-does-transformers-library-work-under-the-hood%2F156346 "2025-05-22T10:15:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manili](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@manili](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmanili)%5C
**Post date:** [May 22, 2025, 10:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-does-transformers-library-work-under-the-hood%2F156346%2F1 "2025-05-22T10:15:31Z")

</div>

Hi everyone,

I am curious to know, how the Transformers library works under the hood and its architecture. Specifically I’m looking for a way to run existing models on HF on my special hardware architecture directly (without any retraining or using runtimes like ONNX). Any documentation for this matter would be awesome.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [May 22, 2025, 1:29pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-does-transformers-library-work-under-the-hood%2F156346%2F2 "2025-05-22T13:29:06Z")

</div>

In extreme terms, Transoformers is a wrapper for PyTorch, so as long as you can find a way to use PyTorch on the target computing device, there should be no fundamental issues.
