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

Training Transformer on Small Dataset #16

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JakubSchwenkbeck
Copy link
Owner

Overview

This PR trains the Transformer model on a small dataset (50-100 words) to validate the forward and backward passes, loss function, and optimization. The goal is to observe the initial learning behavior and check for overfitting.

Dataset

A small story is used, tokenized into sequences:

Input:
"Once upon a time, in a land far away, there was a small village."

Target:
"The villagers were known for their kindness and generosity."

Training Process

  • Model: Transformer
  • Loss Function: Cross-entropy loss
  • Optimizer: Adam with gradient clipping
  • Metrics: Loss and accuracy logged

Expected Outcome

  • The model should overfit due to the small dataset.
  • Loss should decrease, and accuracy should increase as training progresses.

Conclusion

This small-scale training helps verify the core functionality before scaling to larger datasets.

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.

1 participant