karpathy / llm.c

LLM training in simple, raw C/CUDA
MIT License
21.28k stars 2.31k forks source link

add http status check for download_file #638

Open BilyZ98 opened 6 days ago

BilyZ98 commented 6 days ago

This pr add http status check for download_file and reports error if it fails to download file. I met a issue that curl does not report error when it failed to pull model from huggingface through proxy and get http error 503 . But the output still is that Downloaded gpt2_124M_bf16.bin to /home/bily/llm.c-fork/dev/../gpt2_124M_bf16.bin despite that it does not downloads the file successfully.

BilyZ98 commented 4 days ago

Hi @miro5lav , thanks for review. Do you how this pr can be merged? It looks like it has to go through workflow that can only be triggered by maintainer.