Skip to main content

Contributing to the Repository

We welcome contributions to the Hands-On Large Language Models repository! Whether you’ve found a bug, want to improve the code examples, or have suggestions for enhancements, your contributions help make this resource better for everyone.

GitHub Repository

HandsOnLLM/Hands-On-Large-Language-Models

Visit the repository on GitHub

Ways to Contribute

Report Issues

Found a bug or error in the code? Let us know!

Submit Pull Requests

Fix bugs, improve code, or add enhancements

Improve Documentation

Suggest clarifications or additional explanations

Share Your Projects

Built something with the book? Share it with the community!

Reporting Issues

If you encounter problems with the code examples, please open an issue on GitHub:
  1. Check existing issues - Someone may have already reported the same problem
  2. Provide details - Include:
    • Which chapter and notebook you’re working with
    • The error message or unexpected behavior
    • Your environment (Python version, GPU/CPU, platform)
    • Steps to reproduce the issue
  3. Be specific - The more information you provide, the easier it is to help
All code examples were primarily built and tested using Google Colab with T4 GPUs. Results may vary slightly on different platforms or Python versions.

Submitting Pull Requests

We appreciate code contributions! Here’s how to submit a pull request:

Before You Start

  • Discuss major changes - For significant modifications, open an issue first to discuss your proposal
  • Test your changes - Ensure your code works on Google Colab (the primary platform)
  • Follow the existing style - Match the coding style and formatting of the repository

Pull Request Process

  1. Fork the repository and create a new branch for your changes
  2. Make your changes - Fix bugs, improve code, or add enhancements
  3. Test thoroughly - Verify your changes work as expected
  4. Commit with clear messages - Describe what you changed and why
  5. Submit a pull request - Explain your changes and link any related issues
# Fork the repo and clone it
git clone https://github.com/YOUR-USERNAME/Hands-On-Large-Language-Models.git
cd Hands-On-Large-Language-Models

# Create a new branch
git checkout -b fix-chapter3-memory-error

# Make your changes
# ... edit the notebook ...

# Commit your changes
git add .
git commit -m "Fix memory error in Chapter 3 attention calculation"

# Push to your fork
git push origin fix-chapter3-memory-error

# Open a pull request on GitHub

Code of Conduct

Be Respectful

  • Treat all contributors with respect and kindness
  • Welcome newcomers and help them learn
  • Accept constructive criticism gracefully
  • Focus on what’s best for the community

Be Collaborative

  • Share knowledge and resources
  • Give credit where it’s due
  • Build on each other’s work
  • Help others succeed

Be Professional

  • Keep discussions focused and on-topic
  • Provide constructive feedback
  • Avoid personal attacks or harassment
  • Respect differing viewpoints and experiences

Running Code Locally

While Google Colab is recommended, you can run the code locally:
The repository includes setup instructions in the .setup/ folder:
  • Quick start guide - Basic package installation
  • Conda environment - Complete setup including conda and PyTorch
Visit the Setup Guide on GitHub for detailed instructions.
Depending on your OS, Python version, and dependencies, your results might differ slightly from the book examples. However, they should be similar.

Connect with the Authors

Jay Alammar

Connect with Jay on LinkedIn

Maarten Grootendorst

Connect with Maarten on LinkedIn

Additional Resources

Looking for more content? Check out:

Questions?

If you have questions about contributing or need help getting started:
  1. Check the GitHub Discussions (if enabled)
  2. Open an issue with the “question” label
  3. Reach out to the authors on LinkedIn
Thank you for contributing to making this resource better for everyone!

Build docs developers (and LLMs) love