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

How to inference nanoGPT2 ckpt.pt with c? #2

Open
aclie opened this issue Aug 13, 2023 · 1 comment
Open

How to inference nanoGPT2 ckpt.pt with c? #2

aclie opened this issue Aug 13, 2023 · 1 comment

Comments

@aclie
Copy link

aclie commented Aug 13, 2023

Hi a1k0n, I obtained a ckpt.pt file after fine-tuning GPT-2 with my own data. I followed this repository to fine-tune the GPT-2: link. However, I am currently facing issues and am unable to obtain the .bin file required for fast inference with C. I'm wondering if you know what changes I should make to address this problem?

karpathy/nanoGPT#355

@a1k0n
Copy link
Owner

a1k0n commented Aug 14, 2023

With some modifications to scripts/download_and_convert_gpt2.py, you can create the necessary weight bin file.. it downloads a .safetensors file from huggingface, not a pytorch model, though. You might be able to convert with something like this? https://huggingface.co/docs/safetensors/index#save-tensors and get rid of the hf_hub stuff in my script to produce a .bin.

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