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

Make msvc compile and improve CI #216

Closed
wants to merge 3 commits into from
Closed

Conversation

dagelf
Copy link
Contributor

@dagelf dagelf commented Apr 22, 2024

Fixes #200 breaking msvc.

@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

😅 Huggingface is straining.

OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like gpt2 is not the path to a directory containing a file named config.json.

I promise it works! And removes the warnings for clang too

~/llm.c$ clang -Ofast -Wno-unused-result -march=native -fopenmp -DOMP   train_gpt2.c -lm -lgomp -o train_gpt2
~/llm.c$ cc -Ofast -Wno-unused-result -march=native -fopenmp -DOMP   train_gpt2.c -lm -lgomp -o train_gpt2
~/llm.c$ 

@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

image

Also resolves #217 ... partially

@dagelf dagelf changed the title Make msvc compile by adding back the ifdefs in gelu_backward Make msvc compile and fix CI Apr 22, 2024
@karpathy
Copy link
Owner

the shakespeare download is super tiny, is it causing issues in the CI? should we be paying the cost of merging that to the repo for it?
compared to that, the huggingface download is a lot larger.

@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

Chances are it was the GPT2 download, maybe I didn't stare at the log hard enough... but:

https://status.huggingface.co/
image

@dagelf dagelf changed the title Make msvc compile and fix CI Make msvc compile and improve CI Apr 22, 2024
@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

Of course you're right. This is why #215 failed:

image

@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

Still, so far it's one less download costing just 1M ... and it fixes msvc compile.

Should I move all the output .bin files to data/ too? Currently they clutter the root.

@@ -1,8 +1,10 @@
# dot files and such
.vscode/
.venv/

Copy link
Contributor

@azret azret Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add

/.vs

as well please for visual studio

@karpathy
Copy link
Owner

I don't want to clutter the repo with shakespeare if we can avoid it. It's a pet peeve to git clone a repo and have to wait long seconds/minutes for the download.

@karpathy
Copy link
Owner

Let's not move the bin files right now, let's try to keep this PR focused and minimal

@dagelf dagelf closed this Apr 22, 2024
@dagelf dagelf deleted the karpathy branch April 22, 2024 21:05
@dagelf
Copy link
Contributor Author

dagelf commented Apr 22, 2024

Impressive that this repo is still under 2M, including all history. New PR incoming.

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

Successfully merging this pull request may close these issues.

3 participants