Skip to main content

29 posts tagged with "PyTorch"

PyTorch, the Deep Learning Framework, Its Tensors and Running Models on a GPU or Apple Silicon

View All Tags

Fixed: Distribution torch==2.15.0+cu132 can't be installed because it doesn't have a source distribution or wheel for the current platform

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

I pointed torch at PyTorch's CUDA 13.2 index in pyproject.toml, and uv add torch failed on my Mac: Distribution `torch==2.15.0+cu132 @ registry+https://download.pytorch.org/whl/cu132` can't be installed because it doesn't have a source distribution or wheel for the current platform. PyTorch publishes no CUDA builds for macOS. Limiting the index to Windows with a marker fixed it.

How to Install PyTorch with uv

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

PyTorch installs like any other Python package, under the name torch. What you get depends on your computer: the build on PyPI uses the GPU of an Apple silicon Mac, NVIDIA GPUs on Linux, and only the processor on Windows. This guide installs PyTorch 2.15.0 with uv on an Apple M1 Pro and checks that it works.

How to Install PyTorch with CUDA Using uv

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

On Windows, uv add torch gives a PyTorch that can't use an NVIDIA GPU, because PyPI's Windows build has no CUDA. PyTorch publishes its CUDA builds on its own package index, and uv can take them from there for Windows only. This guide sets that up for CUDA 13.2 with PyTorch 2.15.0, and checks what each operating system gets.

Hugging Face Transformers Tutorial for NLP in Python — Part 1: Install Transformers and Run Your First Pipeline

· 30 min read
Jagdish Kumawat
Founder @ Dewiride

Hugging Face Transformers gives you thousands of pretrained language models and a few lines of Python to use them. In this first part you install Transformers and PyTorch, run your first pipeline on your computer's GPU, and build the first version of a project the whole series grows: a router that reads a customer's support message and decides what it's about.

How to Choose the Device a Hugging Face Pipeline Runs On

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

A Hugging Face pipeline can run its model on the main processor (CPU) or on a graphics processor (GPU), which is usually much faster. Transformers 5 picks the GPU for you when there is one, and the device argument overrides it. This guide shows what the pipeline picks on an Apple M1 Pro, how to force the CPU, and which setting fails on a Mac.