# Can't load weights for 'hfl/chinese-roberta-wwm-ext-large'.

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-weights-for-hfl-chinese-roberta-wwm-ext-large%2F389%3E%5C
**Category:** Beginners\
**Created:** [July 20, 2020, 7:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-weights-for-hfl-chinese-roberta-wwm-ext-large%2F389 "2020-07-20T07:35:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwwwww931121](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwwwww931121](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fwwwwww931121)%5C
**Post date:** [July 20, 2020, 7:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-weights-for-hfl-chinese-roberta-wwm-ext-large%2F389%2F1 "2020-07-20T07:35:05Z")

</div>

![1](https://us1.discourse-cdn.com/hellohellohello/original/2X/0/060821ac4df0ca929b5bc9c7bb7b330d227ab3c1.png) ![2](https://us1.discourse-cdn.com/hellohellohello/original/2X/0/06cee7499345e30f5429bd88ce51936491ec5475.png) ![3](https://us1.discourse-cdn.com/hellohellohello/original/2X/7/74a00786fb2d2f732c35950d111e8328b47b1353.png)

but

 ![4](https://us1.discourse-cdn.com/hellohellohello/original/2X/9/9f140976ac8bec36d5fe86ddbcd4f50813aa8442.png) ![5](https://us1.discourse-cdn.com/hellohellohello/original/2X/c/ccdc471adaabc2c6b3deab144c09a09bfe59f219.png)

---

<div class="post-metadata">

**Author:** ![valhalla](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/valhalla/32/4179_2.png) [@valhalla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvalhalla)%5C
**Post date:** [July 20, 2020, 2:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-weights-for-hfl-chinese-roberta-wwm-ext-large%2F389%2F2 "2020-07-20T14:50:30Z")

</div>

Hi @wwwwww931121  
This model has only pytorch weights, to load it in TF you’ll need to set `from_pt` to `True`

```auto
TFBertModel.from_pretrained("hfl/chinese-roberta-wwm-ext-large", from_pt=True) 

```

---

<div class="post-metadata">

**Author:** ![wwwwww931121](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwwwww931121](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fwwwwww931121)%5C
**Post date:** [July 22, 2020, 3:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-weights-for-hfl-chinese-roberta-wwm-ext-large%2F389%2F4 "2020-07-22T15:07:11Z")

</div>

> [@valhalla](#):
>
> Hi @wwwwww931121  
> This model has only pytorch weights, to load it in TF you’ll need to set `from_pt` to `True`
> 
> ```auto
> TFBertModel.from_pretrained("hfl/chinese-roberta-wwm-ext-large", from_pt=True) 
> 
> ```

The method is useful!  
I really appreciate it!
