Skip to content

Instantly share code, notes, and snippets.

View WuSiYu's full-sized avatar

Wu SiYu WuSiYu

View GitHub Profile
@thomwolf
thomwolf / gpt-2-wikitext-103.py
Last active December 3, 2025 07:57
A very small and self-contained gist to train a GPT-2 transformer model on wikitext-103
# Copyright (c) 2019-present, Thomas Wolf.
# All rights reserved. This source code is licensed under the MIT-style license.
""" A very small and self-contained gist to train a GPT-2 transformer model on wikitext-103 """
import os
from collections import namedtuple
from tqdm import tqdm
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from ignite.engine import Engine, Events
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active December 30, 2025 10:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example