프로젝트
GitHub에서 보기
GeeeekExplorer/transformers-patch
GeeeekExplorer/transformers-patch has 38 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-20 04:03 UTC. Last push 2026-05-09.
What you can do
- Memory Reduction - Significantly lowers memory usage in Transformers models
- Zero Configuration - Works automatically after import
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
patches for huggingface transformers to save memory
머신러닝README.md
OriginalTransformers-Patch 🛠️
Memory optimization patches for HuggingFace Transformers.
Features ✨
Memory Reduction - Significantly lowers memory usage in Transformers models
Zero Configuration - Works automatically after import
Installation ⚡
pip install git+https://github.com/GeeeekExplorer/transformers-patch.git
Quick Start 🚀
Just import the patch before loading any Transformers models:
import transformers_patch
from transformers import AutoModel
Benchmark 📊
Test Configuration:
- 8x GPU machine
- Micro batch size: 1
- Sequence length: 4096
- Gradient checkpointing: Disabled
- Model: Qwen3-8B
| Memory Component | Fixed Allocation | Before Patch | After Patch |
|---|---|---|---|
| Model + Gradients | 30.5 GB | - | - |
| ZeRO Optimizer States | 11.4 GB | - | - |
| Activations | - | 35.4 GB | 17.8 GB |
50% reduction in activation memory!
Example Usage 📋
See complete example in train.py.