Eine Codierungsimplementierung zum Komprimieren und Benchmarken von anweisungsabgestimmten LLMs mit FP8, GPTQ und SmoothQuant-Quantisierung unter Verwendung von llmcompressor
import subprocess, sys def pip(*pkgs): subprocess.check_call((sys.executable, "-m", "pip", "set up", "-q", *pkgs)) pip("llmcompressor", "compressed-tensors", "transformers>=4.45", "speed up", "datasets") import os, gc, time, json, math from pathlib import Path import torch…