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

Port of Karpathy's Let's Build GPT tutorial to Candle #1525

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

jeroenvlek
Copy link
Contributor

This adds a link to a port of this tutorial to Candle. I moved all comments from his notebook to this code as well.

You will also see a struggle between following his variable naming and my own standards ;) I will probably make that more consistent soon.

It is meant as a complement to the other tutorial link and it showcases different sides of the Candle API applied to a toy example, especially for people trying to build a model from scratch (as opposed to loading pre-trained weights).

I'm sure not everything in the port might be idiomatic use of Candle, happy to receive feedback! Just know that it works and I had to dive into the API quite often to find the corresponding functionality. (Only thing I couldn't find/work around was on-device multinomial sampling)

@LaurentMazare
Copy link
Collaborator

That's a great addition, thanks!

@LaurentMazare LaurentMazare merged commit 3a7304c into huggingface:main Jan 5, 2024
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.

2 participants