# Problem while uploading a file

**URL:** <https://discuss.huggingface.co/t/problem-while-uploading-a-file/565>\
**Category:** 🤗Transformers\
**Created:** [August 2, 2020, 11:07pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565 "2020-08-02T23:07:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeniya](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jeniya](https://discuss.huggingface.co/u/jeniya)\
**Post date:** [August 2, 2020, 11:07pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/1 "2020-08-02T23:07:24Z")

</div>

I am trying to upload our bert model for stack-overflow domain. I have used the `transformer-cli upload` command and I can access the uploaded files and see them .

However in in the [https://huggingface.co/](https://huggingface.co/) web page I am always getting the errors that config,json is not found

![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/1/1e85d9e6331d319049ce593cb9bc4807c6d7c6cb.png)

Any help is really appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![clem](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/clem/32/2838_2.png) [@clem](https://discuss.huggingface.co/u/clem)\
**Post date:** [August 3, 2020, 12:02am UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/2 "2020-08-03T00:02:29Z")

</div>

Maybe @julien-c has a solution.

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 3, 2020, 12:33pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/3 "2020-08-03T12:33:58Z")

</div>

I’m having the same issue.  
Though i have uploaded the config.json, I am getting the same error

 ![Screenshot 2020-08-03 at 8.33.51 AM](https://us1.discourse-cdn.com/hellohellohello/original/2X/5/556af6cd2c19f9209afed2ca2c2596a8d3485b96.png)

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 3, 2020, 12:34pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/4 "2020-08-03T12:34:33Z")

</div>

These are the uploaded files

 ![Screenshot 2020-08-03 at 8.34.17 AM](https://us1.discourse-cdn.com/hellohellohello/original/2X/1/14618367019b90c267c59230eebbf18dfb84cbab.png)

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 3, 2020, 12:37pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/5 "2020-08-03T12:37:44Z")

</div>

following is the logs from the upload command

```auto
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/tokenizer_config.json
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/special_tokens_map.json
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/config.json
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/modelcard.json
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/README.md
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/merges.txt
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/pytorch_model.bin
Your file now lives at:                                                                                                                        
https://s3.amazonaws.com/models.huggingface.co/bert/bewgle/bart-large-mnli-bewgle/vocab.json

```

Could it be that the `/bert/` should be `/bart/` in the s3 URL?

---

<div class="post-metadata">

**Author:** ![jeniya](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jeniya](https://discuss.huggingface.co/u/jeniya)\
**Post date:** [August 3, 2020, 4:12pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/6 "2020-08-03T16:12:08Z")

</div>

@swarajraibagi, I am not sure if there is anyway to change the urls. how you did that?

---

<div class="post-metadata">

**Author:** ![jeniya](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jeniya](https://discuss.huggingface.co/u/jeniya)\
**Post date:** [August 3, 2020, 4:13pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/7 "2020-08-03T16:13:01Z")

</div>

@julien-c, It will be really great if you can provide some solution/insight into this problem. I am kind of stuck for days ☹

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 3, 2020, 4:23pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/8 "2020-08-03T16:23:28Z")

</div>

@jeniya I didn’t change the url, I was wondering if that is contributing to the bug.

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 3, 2020, 4:27pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/9 "2020-08-03T16:27:51Z")

</div>

@julien-c worth noting  
the model seems to have uploaded correctly since the below code runs without any error

```auto
In [1]: from transformers import AutoModelForSequenceClassification

In [2]: model = AutoModelForSequenceClassification.from_pretrained('bewgle/bart-large-mnli-bewgle')

```

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [August 4, 2020, 9:59pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/10 "2020-08-04T21:59:22Z")

</div>

Looking into it with @lysandre, should be fixed tomorrow.

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [August 5, 2020, 3:25pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/11 "2020-08-05T15:25:52Z")

</div>

Should be fixed now.

---

<div class="post-metadata">

**Author:** ![swarajraibagi](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@swarajraibagi](https://discuss.huggingface.co/u/swarajraibagi)\
**Post date:** [August 5, 2020, 3:38pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/12 "2020-08-05T15:38:30Z")

</div>

it’s working as expected now  
Thanks !

---

<div class="post-metadata">

**Author:** ![boris](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/boris/32/19312_2.png) [@boris](https://discuss.huggingface.co/u/boris)\
**Post date:** [August 5, 2020, 3:58pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/13 "2020-08-05T15:58:38Z")

</div>

I’m not sure if it’s related but it seems like the model does not load in exbert, for example [this one](https://huggingface.co/exbert/?model=huggingtweets/julien_c&modelKind=autoregressive&sentence=I%20love%20huggingtweets!&layer=11).

---

<div class="post-metadata">

**Author:** ![jeniya](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jeniya](https://discuss.huggingface.co/u/jeniya)\
**Post date:** [August 5, 2020, 4:17pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/14 "2020-08-05T16:17:41Z")

</div>

Its working now! Thanks 😃

---

<div class="post-metadata">

**Author:** ![a1noack](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@a1noack](https://discuss.huggingface.co/u/a1noack)\
**Post date:** [January 1, 2021, 2:00am UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/15 "2021-01-01T02:00:28Z")

</div>

I’m getting this same error with a model that I just uploaded. My model files are [here](https://huggingface.co/a1noack/bart-large-gigaword/tree/main). If I try to use the same model files that I have saved locally, the tokenizer and the model load just fine. But when I try to download the model like:

```
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("a1noack/bart-large-gigaword")
model = AutoModelForSeq2SeqLM.from_pretrained("a1noack/bart-large-gigaword")

```

I get the following error:

```
OSError: Can't load config for 'a1noack/bart-large-gigaword'. Make sure that:
- 'a1noack/bart-large-gigaword' is a correct model identifier listed on 'https://huggingface.co/models'
- or 'a1noack/bart-large-gigaword' is the correct path to a directory containing a config.json file

```

What was actually done to fix the problem?

---

<div class="post-metadata">

**Author:** ![a1noack](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@a1noack](https://discuss.huggingface.co/u/a1noack)\
**Post date:** [January 9, 2021, 12:19am UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/16 "2021-01-09T00:19:44Z")

</div>

Do you have any suggestions @julien-c?

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [January 11, 2021, 1:29pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/17 "2021-01-11T13:29:34Z")

</div>

Yes Exbert model loading was never automatic, it’s a manual process that needs to be done by the Exbert authors.

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [January 11, 2021, 1:32pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/18 "2021-01-11T13:32:25Z")

</div>

@a1noack which transformers version are you running? You should be on `>=3.5.0` for the new model hub system to work.

Can you try this and let me know if it solves your problem? Thanks!

---

<div class="post-metadata">

**Author:** ![a1noack](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@a1noack](https://discuss.huggingface.co/u/a1noack)\
**Post date:** [January 11, 2021, 8:03pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/19 "2021-01-11T20:03:46Z")

</div>

So the download _does_ work now at least with `transformers 4.1.1`. Thank you.  
I guess it’s the case though that models that were uploaded to the model hub using the new model hub system cannot be downloaded using versions of `transformers <3.5.0`.  
Does this mean that there is no way to make this downloading of new models backwards compatible with older versions of `transformers`? It would be great if I could download all models–including those that were uploaded using the new hub system–from the hub using `from_pretrained` with `transformers <3.5.0`.

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](https://discuss.huggingface.co/u/julien-c)\
**Post date:** [January 11, 2021, 9:32pm UTC](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565/20 "2021-01-11T21:32:14Z")

</div>

Yes you are correct. We were periodically backporting new models to the old system (S3 bucket), however it is costly and tedious, so we decided to stop.

You can still `git clone` your new model and load it in `transformers <3.5.0` using `from_pretrained` – is this a potential workaround for you?

[Next page](https://discuss.huggingface.co/t/problem-while-uploading-a-file/565.md?page=2)
