Fading Coder

One Final Commit for the Last Sprint

Hybrid Parallelism Strategies for Large-Scale Deep Learning Training

Hybrid parallelism is a foundational technique in large-scale distributed deep learning, designed to orchestrate multiple parallelization dimensions—data, tensor, and pipeline—to maximize hardware utilization while scaling training across thousands of accelerators. Unlike monolithic parallel approac...

Understanding 1D, 2D, and 3D Convolution Layers

Understanding dilation in convolution operations: https://blog.csdn.net/weixin_42363544/article/details/123920699 Dilated convolution, also known as hole convolution. In PyTorch, a dilation value of 1 corresponds to a standard convolution without dilation. When dilation is 1, each element in the ker...

Implementing Sparse Mixture of Experts from Scratch

Data Preparasion Import Required Packages # Import required packages and set seed for reproducibility import torch import torch.nn as nn from torch.nn import functional as F torch.manual_seed(42) Download Shakespeare Dataset # Downloading the tiny shakespeare dataset # !wget https://raw.githubuserco...

Setting Up ComfyUI with GPU Support on Windows 10

Installing Python 3.10.11 Download the official Python 3.10.11 installer for Windows (64-bit) named something like python-3.10.11-amd64.exe. Run the installer using custom installation options and set your desired installation path. Add both the main Python directory and the Scripts subfolder to the...

Tracking Training Progress: Plotting Loss and Accuracy Curves in PyTorch

Visualizing training and testing metrics through Loss and Accuracy curves provides immediate insight into whether your model is learning effectively. Metric Description **Loss Curve** Represents the model's error during training and evaluation. Lower values indicate better performance. **Accuracy Cu...

Tensor Manipulation in PyTorch: Splitting, Expanding, and Modifying Operations

Tensor Manipulation in PyTorch: Splitting, Expanding, and Modifying Operations
Introduction This article covers tensor manipulation operations in PyTorch, including splitting (split, unbind, chunk), expanding (repeat, cat, stack), and modifying (using indexing and slicing, gather, scatter). Experimental Enviroment This series of experiments uses the following environment setup...

Implementing Neural Architectures with PyTorch

The torch.nn namespace encapsulates essential building blocks for constructing deep learning pipelines. These modules accept Tensor inputs, perform computations to generate outputs, and maintain internal parameters. Users typical construct models using either the functional API with nn.Sequential or...

Building GoogLeNet and ResNet Architectures in PyTorch

The Inception architecture processes feature maps through parallel convolutional branches with varying receptive fields. In PyTorch, an InceptionModule can be constructed by defining four distinct pathways: a standalone 1×1 convolution, a 5×5 convolution preceded by a bottleneck layer, a cascade of...

Setting Up and Using GPT2-Chinese in Anaconda Environment

Environment Preparation 1. Installing PyTorch Choose the appropriate version based on your needs. The CPU version is simpler to set up. # Install PyTorch with conda (replace with your preferred channel if needed) conda install pytorch torchvision cpuonly -c pytorch-stable # Alternatively, use pip w...

Processing YOLOv8 ONNX Model Output with NMS for Object Detection

Export a trained YOLOv8 model from the .pt format to ONNX. from ultralytics import YOLO model_instance = YOLO('path/to/your/best.pt') export_success = model_instance.export(format="onnx", simplify=True) assert export_success Post-processing of the ONNX model output involves three core func...