iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up
« Previous

PyTorch HOME

Welcome to the iwantcoding.com PyTorch Tutorial. PyTorch is the research-favourite deep-learning framework: Pythonic, dynamic, and the engine behind almost every Hugging Face model. Lightning, FSDP, and torch.compile turn research code into production training jobs.

What this tutorial covers

ChapterYou will learn
PyTorch BasicsInstall / CUDA, tensors, devices (CPU / GPU / MPS), autograd, torch.optim, Datasets & DataLoader.
Building Modelsnn.Module, layers, activations, losses, training loop, evaluation, save / load.
ArchitecturesMLP, CNN, RNN / LSTM, Transformer, transfer learning, Hugging Face.
Scale & ShipMixed precision, distributed (DDP), Lightning, TorchScript, ONNX, profiler.
ExamplesCheatsheet, runnable snippets, quiz, exercises, bootcamp, certificate.

Who this is for

  • ML researchers and engineers.
  • Anyone fine-tuning open-source LLMs.
  • Devs building on top of Hugging Face.
How to use this tutorial: read the chapter, run the example with Try it Yourself », do the exercise, then take the quiz at the bottom. Hit Mark complete when you're done — the sidebar will track your progress.

Example

Example
import torch
x = torch.tensor([[1., 2.], [3., 4.]])
print(x @ x.T)
print('CUDA:', torch.cuda.is_available())
Try it Yourself »

Exercise

Canonical PyTorch import.

import

Discussion

Loading…

« Previous