arXiv:2509.05584cs.LGcs.CV2025-09被引 2

用大模型动态优化模型压缩,让不同层按实际瓶颈智能瘦身。

ProfilingAgent: Profiling-Guided Agentic Reasoning for Adaptive Model Optimization

  • 用大模型分析每层延迟和内存,自动生成针对性压缩策略。
  • 压缩后图像识别准确率基本不变,内存减少74%且提速1.74倍。
  • 适合需要在低资源设备部署AI模型的研究者和开发者。

基础模型面临日益严峻的计算与内存瓶颈,限制其在资源受限平台的部署。尽管剪枝和量化等压缩技术广泛应用,但多数依赖统一启发式方法,忽略架构与运行时异构性。性能剖析工具可揭示各层延迟、内存与计算开销,却很少融入自动化流程。本文提出ProfilingAgent,一种基于剖析信息的代理式推理框架,利用大语言模型(LLMs)实现结构化剪枝与训练后动态量化。该模块化多代理系统综合考虑静态指标(如MACs、参数量)与动态信号(延迟、内存),生成适配具体架构的压缩策略。相比启发式基线,ProfilingAgent能针对各层瓶颈进行细粒度决策。在ImageNet-1K、CIFAR-10与CIFAR-100上,使用ResNet-101、ViT-B/16、Swin-B与DeiT-B/16进行实验,剪枝后准确率仅下降约1%(ImageNet-1K),ViT-B/16在小数据集上甚至提升2%;量化最高实现74%内存节省,精度损失小于0.5%,推理速度最快提升1.74倍。与GPT-4o和GPT-4-Turbo对比表明,大模型推理质量对迭代剪枝至关重要。结果验证了代理系统在剖析引导的模型优化中具备可扩展性。

原文摘要 · Abstract (English)

Foundation models face growing compute and memory bottlenecks, hindering deployment on resource-limited platforms. While compression techniques such as pruning and quantization are widely used, most rely on uniform heuristics that ignore architectural and runtime heterogeneity. Profiling tools expose per-layer latency, memory, and compute cost, yet are rarely integrated into automated pipelines. We propose ProfilingAgent, a profiling-guided, agentic approach that uses large language models (LLMs) to automate compression via structured pruning and post-training dynamic quantization. Our modular multi-agent system reasons over static metrics (MACs, parameter counts) and dynamic signals (latency, memory) to design architecture-specific strategies. Unlike heuristic baselines, ProfilingAgent tailors layer-wise decisions to bottlenecks. Experiments on ImageNet-1K, CIFAR-10, and CIFAR-100 with ResNet-101, ViT-B/16, Swin-B, and DeiT-B/16 show pruning maintains competitive or improved accuracy (about 1% drop on ImageNet-1K, +2% gains for ViT-B/16 on smaller datasets), while quantization achieves up to 74% memory savings with <0.5% accuracy loss. Our quantization also yields consistent inference speedups of up to 1.74 times faster. Comparative studies with GPT-4o and GPT-4-Turbo highlight the importance of LLM reasoning quality for iterative pruning. These results establish agentic systems as scalable solutions for profiling-guided model optimization.

模型压缩智能优化大模型应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。