From e0396bdaa0de1b328422bf1952cf79025680d481 Mon Sep 17 00:00:00 2001 From: HyeokJun SHIN <96534680+jun048098@users.noreply.github.com> Date: Fri, 9 Aug 2024 01:39:35 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20[i18n-KO]=20Translated=20`eetq.m?= =?UTF-8?q?d`=20to=20Korean=20(#32352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: ko: quantization/eetq.md * feat: nmt draft * fix docs: ko: quantization/eetq.md * fix docs: ko: quantization/eetq.md * fix: resolve suggestions Co-authored-by: Jiwook Han <33192762+mreraser@users.noreply.github.com> * fix: resolve suggestions * fix: resolve suggsetions --------- Co-authored-by: Jiwook Han <33192762+mreraser@users.noreply.github.com> --- docs/source/ko/_toctree.yml | 4 +-- docs/source/ko/quantization/eetq.md | 47 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 docs/source/ko/quantization/eetq.md diff --git a/docs/source/ko/_toctree.yml b/docs/source/ko/_toctree.yml index d38e6716d..fa78e01d4 100644 --- a/docs/source/ko/_toctree.yml +++ b/docs/source/ko/_toctree.yml @@ -151,8 +151,8 @@ title: (번역중) AQLM - local: quantization/quanto title: Quanto - - local: in_translation - title: (번역중) EETQ + - local: quantization/eetq + title: EETQ - local: in_translation title: (번역중) HQQ - local: in_translation diff --git a/docs/source/ko/quantization/eetq.md b/docs/source/ko/quantization/eetq.md new file mode 100644 index 000000000..ef4f4a268 --- /dev/null +++ b/docs/source/ko/quantization/eetq.md @@ -0,0 +1,47 @@ + + +# EETQ [[eetq]] + +[EETQ](https://github.com/NetEase-FuXi/EETQ) 라이브러리는 NVIDIA GPU에 대해 int8 채널별(per-channel) 가중치 전용 양자화(weight-only quantization)을 지원합니다. 고성능 GEMM 및 GEMV 커널은 FasterTransformer 및 TensorRT-LLM에서 가져왔습니다. 교정(calibration) 데이터셋이 필요 없으며, 모델을 사전에 양자화할 필요도 없습니다. 또한, 채널별 양자화(per-channel quantization) 덕분에 정확도 저하가 미미합니다. + +[릴리스 페이지](https://github.com/NetEase-FuXi/EETQ/releases)에서 eetq를 설치했는지 확인하세요. +``` +pip install --no-cache-dir https://github.com/NetEase-FuXi/EETQ/releases/download/v1.0.0/EETQ-1.0.0+cu121+torch2.1.2-cp310-cp310-linux_x86_64.whl +``` +또는 소스 코드 https://github.com/NetEase-FuXi/EETQ 에서 설치할 수 있습니다. EETQ는 CUDA 기능이 8.9 이하이고 7.0 이상이어야 합니다. +``` +git clone https://github.com/NetEase-FuXi/EETQ.git +cd EETQ/ +git submodule update --init --recursive +pip install . +``` + +비양자화 모델은 "from_pretrained"를 통해 양자화할 수 있습니다. +```py +from transformers import AutoModelForCausalLM, EetqConfig +path = "/path/to/model". +quantization_config = EetqConfig("int8") +model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", quantization_config=quantization_config) +``` + +양자화된 모델은 "save_pretrained"를 통해 저장할 수 있으며, "from_pretrained"를 통해 다시 사용할 수 있습니다. + +```py +quant_path = "/path/to/save/quantized/model" +model.save_pretrained(quant_path) +model = AutoModelForCausalLM.from_pretrained(quant_path, device_map="auto") +``` \ No newline at end of file