Skip to content

Instantly share code, notes, and snippets.

View itsdaniele's full-sized avatar

Daniele Paliotta itsdaniele

View GitHub Profile
@hitorilabs
hitorilabs / NCU.md
Last active November 15, 2024 03:25

Since I don't know how computers work... I'm always running into issues and for some reason I tend to never read the errors or logs.

NOT TODAY!

I just thought about it for a few moments, but I was trying to figure out how to get ncu to run (Nsight Compute CLI)

ncu --set full -o output python3 prof.py
@thomwolf
thomwolf / gpt-2-wikitext-103.py
Last active September 23, 2024 20:23
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