# How do I reduce DistilBERT model size?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-reduce-distilbert-model-size%2F5104%3E%5C
**Category:** Models\
**Created:** [March 25, 2021, 10:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-reduce-distilbert-model-size%2F5104 "2021-03-25T22:36:11Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [April 6, 2021, 9:13pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-reduce-distilbert-model-size%2F5104%2F5 "2021-04-06T21:13:26Z")

</div>

hey @burrt there’s a few threads on the forum about making transformer models smaller / faster, e.g.

- [Deploy multilingual sentence tansformer into cloud](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdeploy-multilingual-sentence-tansformer-into-cloud%2F4354)
- [Deploying inference model size and performance](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdeploying-inference-model-size-and-performance%2F3575)

my standard recommendation is to try quantization followed by ONNX / ONNX Runtime. before doing that though, i’d first try to understand what’s causing the timeout on your endpoint - it might be unrelated to the model and you don’t want to spend a lot of time optimising the wrong thing 🙂

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-reduce-distilbert-model-size%2F5104)._
