Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading BERT yields a 404 #139

Closed
PGimenez opened this issue May 9, 2023 · 2 comments
Closed

Downloading BERT yields a 404 #139

PGimenez opened this issue May 9, 2023 · 2 comments

Comments

@PGimenez
Copy link

PGimenez commented May 9, 2023

When trying the example from the README, I can't download the model as I get A 404 not found. I'm on [21ca0261] Transformers v0.2.4

julia> textencoder, bert_model = hgf"bert-base-uncased"
ERROR: request status HTTP/2 404
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] status_error(resp::Downloads.Response, log::Nothing)
    @ HuggingFaceApi ~/.julia/packages/HuggingFaceApi/oDbYr/src/utils.jl:17
  [3] status_error_w_ecode(resp::Downloads.Response)
    @ HuggingFaceApi ~/.julia/packages/HuggingFaceApi/oDbYr/src/utils.jl:36
  [4] _info(type::String, repo_id::String, revision::Nothing, token::Nothing)
    @ HuggingFaceApi ~/.julia/packages/HuggingFaceApi/oDbYr/src/api.jl:90
  [5] list_repo_files(type::String, repo_id::String, revision::Nothing, token::Nothing)
    @ HuggingFaceApi ~/.julia/packages/HuggingFaceApi/oDbYr/src/api.jl:97
  [6] list_model_files
    @ ~/.julia/packages/HuggingFaceApi/oDbYr/src/api.jl:126 [inlined]
  [7] #list_model_files#32
    @ ~/.julia/packages/HuggingFaceApi/oDbYr/src/api.jl:128 [inlined]
  [8] list_model_files
    @ ~/.julia/packages/HuggingFaceApi/oDbYr/src/api.jl:128 [inlined]
  [9] #_ensure#3
    @ ~/.julia/packages/Transformers/zms6Y/src/huggingface/utils.jl:11 [inlined]
 [10] _ensure
    @ ~/.julia/packages/Transformers/zms6Y/src/huggingface/utils.jl:11 [inlined]
 [11] #ensure_possible_files#4
    @ ~/.julia/packages/Transformers/zms6Y/src/huggingface/utils.jl:13 [inlined]
 [12] ensure_possible_files
    @ ~/.julia/packages/Transformers/zms6Y/src/huggingface/utils.jl:13 [inlined]
 [13] load_tokenizer(model_name::String; possible_files::Nothing, config::Transformers.HuggingFace.HGFConfig{:bert, JSON3.Object{Vector{UInt8}, Vector{UInt64}}, Nothing}, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Transformers.HuggingFace ~/.julia/packages/Transformers/zms6Y/src/huggingface/tokenizer/tokenizer.jl:11
 [14] load_hgf_pretrained(name::String; kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Transformers.HuggingFace ~/.julia/packages/Transformers/zms6Y/src/huggingface/HuggingFace.jl:51
 [15] load_hgf_pretrained(name::String)
    @ Transformers.HuggingFace ~/.julia/packages/Transformers/zms6Y/src/huggingface/HuggingFace.jl:38
 [16] top-level scope
    @ REPL[27]:1
@chengchingwen
Copy link
Owner

I could not reproduce the error, can you check if you can access url like https://huggingface.co/bert-base-uncased/resolve/main/config.json on that machine?

@PGimenez
Copy link
Author

PGimenez commented May 12, 2023

@chengchingwen thanks for checking. It fixed itself somehow, working fine now. I was making a new Genie demo with Transformers.jl :)
https://github.com/GenieFramework/GenieFrameworkDemos/tree/main/BERTEmbeddings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants