xingchensong/TouchNet
xingchensong/TouchNet has 233 GitHub stars and 30 forks. GitHot measured -1 in 7 days and -1 in 15 days. Last checked 2026-11-11 08:09 UTC. Last push 2026-07-02.
So werden diese Zahlen gemessen
A native-PyTorch library for large scale M-LLM (text/audio) training with tp/cp/dp.
Gemessener Sternzuwachs
- in 24h
- Aktualisierung verzögert
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
Original
👆 TouchNet [WIP]
A PyTorch native N-D parallel library for large-scale multimodal LLM (text/audio) training
Latest News 🔥
- [2025/07/07] We support finetuning
Qwen2-Audio-7B&Kimi-Audio-7Bon ASR task! See WeneSpeech results for details.
Overview
👆 touchnet is highly motivated by torchtitan. Both of them are clean, minimal codebases for large-scale LLM training using native PyTorch. The main goal that differentiates 👆 touchnet from torchtitan is that 👆 touchnet focuses on multimodal LLM training where special data pipelines and model structures are needed. Please note that 👆 touchnet is currently in a pre-release state and under extensive development.
Our guiding principles when building 👆 touchnet are:
- ⚡️ Blazing-fast checkpointable data loader with modular preprocessing and fully random access for large scale multimodal data
- [New Storage Format] optimized for random access on sequentially saved tar files
- Efficient [Sequence Packing] powered by [Flex Attention]
- 🤗 Native integration with
transformersmodels while get rid of structured trainer classes (e.g., [PyTorch-Lightning] or [HuggingFace Trainer])- Only reuse model definitions in
transformersand leave other parts untouched - Entire training logic exposed in a single file [touchnet/bin/train.py], everything is under your control
- Only reuse model definitions in
- 🛠️ Built-in profilers (CPU/GPU/memory) with flight recorder diagnostics.
- [Nsys-like Profiler] to get optimization recommendations
- [Memory Monitor] to debug OOM errors and improve memory usage
- 🎯 N-D parallelism enabled through PyTorch native API and minimal lines of model code changes.
- ✨ Intuitive API design for rapid adoption & customization in minutes.
- Supported tasks: [text/pretrain], [audio/pretrain], [audio/sft/asr], more tasks coming soon
- Supported models: [Llama], [LlamaForASR] more models coming soon
Quick Glance at 👆 TouchNet
https://github.com/user-attachments/assets/9e530ad6-2d8d-41b4-9223-8ad7c838e6e4
Loss, Accuracy, Memory, Throughput, TFLOPs, and MFU logged via both stdout and Tensorboard.
https://github.com/user-attachments/assets/dc089589-a355-4abc-a2b3-5e0f768b89a0
Detailed CPU/GPU profiling that can be visualized in Tensorboard. Enjoy your optimization journey ~
https://github.com/user-attachments/assets/10cbf4ce-5f96-4699-b4f4-72c88ce89802
Memory profiling identifies GPU memory allocation patterns to guide tuning strategies.
Dive into the code
Here is an end-to-end workflow for a traning job in 👆 TouchNet:
stage-1: Download dataset. We useload_datasetAPI inHuggingFace.datasetsto download specific data.stage-2: Convert dataset format toTouchDataset. see [touchnet/bin/make_data.py]stage-3: (optional) Convert hf-format ckpt to torch distributed ckpt. see [touchnet/bin/convert_hf_to_dcp.py]stage-4: Start training, either from scratch or from pretrained ckpt that has been converted in stage-3. see [touchnet/bin/train.py]stage-5: Convert torch distributed ckpt to hf-format, enjoy HuggingFace ecosystem for inference and deployment. see [touchnet/bin/convert_dcp_to_hf.py]
For a more concrete example running those stages one by one, see [examples/audio/sft/asr/aishell/run.sh]
Installation
# NOTE(xcsong): Ensure that the linux system's glibc version is greater than or equal to 2.17 (see `ldd --version`)
# (for example, Ubuntu 22.04 and later versions).
conda create -n touchnet python=3.10
conda activate touchnet
conda install -c conda-forge sox ffmpeg -y
# (Optional) install CUDA + cuDNN if they are not already available; change `prefix` to your install path.
# bash install_cuda_cudnn.sh
# Install TouchNet with GPU support (CUDA 12.6 - recommended)
pip install -e . --index-url https://download.pytorch.org/whl/cu126
# Or install with CUDA 11.8 support
# pip install -e . --index-url https://download.pytorch.org/whl/cu118
# For development with GPU support
# pip install -e '.[dev]' --index-url https://download.pytorch.org/whl/cu126
Citation
@misc{touchnet,
title={TouchNet: A PyTorch native N-D parallel library for large-scale multimodal LLM (text/audio) training},
author={Xingchen Song},
year={2025},
url={https://github.com/xingchensong/TouchNet},
}
Acknowledge
- This repo is highly motivated by torchtitan and we borrowed a lot of code from it.
- This repo also benefits from Megatron-LM, WeNet, flame.
Thanks for their wonderful works.
Ähnliche Projekte entdecken
tensorflow/tensorflow
Ein Open-Source-Framework für maschinelles Lernen für alle
201,427 Sternehuggingface/transformers
🤗 Transformers: das Framework zur Modelldefinition für State-of-the-Art-Modelle des maschinellen Lernens in Text, Vision, Audio und multimodal, für Inferenz und Training.
168,711 SterneAUTOMATIC1111/stable-diffusion-webui
Web-UI für Stable Diffusion
165,289 SterneComfy-Org/ComfyUI
Die leistungsstärkste und modularste GUI, API und das Backend für Diffusionsmodelle mit einer Oberfläche aus Graphen und Knoten. Die schnellste lokale Inferenz-Engine der Welt.
146,271 Sterne