# How to load only a few parameters

**URL:** <https://discuss.huggingface.co/t/how-to-load-only-a-few-parameters/29117>\
**Category:** Research\
**Created:** [January 7, 2023, 3:22pm UTC](https://discuss.huggingface.co/t/how-to-load-only-a-few-parameters/29117 "2023-01-07T15:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiao12mm](https://avatars.discourse-cdn.com/v4/letter/x/4bbf92/32.png) [@xiao12mm](https://discuss.huggingface.co/u/xiao12mm)\
**Post date:** [January 7, 2023, 3:22pm UTC](https://discuss.huggingface.co/t/how-to-load-only-a-few-parameters/29117/1 "2023-01-07T15:22:29Z")

</div>

I want to modify the parameters of a model

`"hidden_size": 256`  
or  
`"pooler_fc_size": 256`

If so, I will not be able to load the parameters of the pre-trained model completely, I want to load only part of the parameters because it is a model with modified network structure, now my plan is to load the last\_hidden\_states, how do I write the code? Or where is the documentation?
