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

fixes for code #206

Merged
merged 7 commits into from
Jun 12, 2024
Merged

fixes for code #206

merged 7 commits into from
Jun 12, 2024

Conversation

d-kleine
Copy link
Contributor

@d-kleine d-kleine commented Jun 11, 2024

  • updated .gitignore for ch07/01
  • removed unused import in ch04/01_main-chapter-code/exercise-solutions.ipynb (GELU() is in FeedForward() func)
  • fixed code in ch05/02_alternative_weight_loading/weight-loading-hf-transformers.ipynb
  • removed unused import in ch04/02_performance-analysis/flops-analysis.ipynb (tiktoken not used)

Please also see below comments, there are some issues that you might need to take a look into

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@d-kleine
Copy link
Contributor Author

d-kleine commented Jun 11, 2024

@d-kleine
Copy link
Contributor Author

d-kleine commented Jun 11, 2024

ch05/05_bonus_hparam_tuning/previous_chapters.py

dataset = GPTDatasetV1(txt, tokenizer, max_length, stride, num_workers=0)

Unexpected keyword argument 'num_workers' in constructor call, not defined in

class GPTDatasetV1(Dataset):
    def __init__(self, txt, tokenizer, max_length, stride):

@d-kleine
Copy link
Contributor Author

d-kleine commented Jun 11, 2024

appendix-E/01_main-chapter-code/previous_chapters.py

https://github.com/rasbt/LLMs-from-scratch/blob/1a65020d817afb1a2c2eb1ca5588b265ab055258/appendix-E/01_main-chapter-code/previous_chapters.py#L486C1-L490C39

keyword arg 'tokenizer' is unused in train_classifier_simple().

@d-kleine d-kleine marked this pull request as ready for review June 11, 2024 20:40
@d-kleine
Copy link
Contributor Author

d-kleine commented Jun 11, 2024

GitHub Actions has encountered an internal error when running your job.
-> idk why, but the CI checks failed. I cannot run them again, can you please do that?

@rasbt
Copy link
Owner

rasbt commented Jun 12, 2024

Thanks for the PR. And the CI failure is weird, I'll try to restart.

Copy link
Owner

@rasbt rasbt left a comment

Choose a reason for hiding this comment

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

Looks really good to me, thanks a lot!

@rasbt
Copy link
Owner

rasbt commented Jun 12, 2024

I think the hparam num_iter was simply outdated. Must have forgotten to rename it there when I updated the chapter. Same for the num_workers.

Btw. great catch regarding the redundant tokenizer argument in the train_classifier_simple function. I think I used that originally in the "not _simple version but must have forgotten to remove it.

@rasbt rasbt merged commit dcbdc1d into rasbt:main Jun 12, 2024
5 checks passed
@d-kleine
Copy link
Contributor Author

Thanks a lot for checking and updating the code!

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