Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 [i18n-KO] Translated eetq.md to Korean #32352

Merged
merged 9 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/ko/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
title: (λ²ˆμ—­μ€‘) AQLM
- local: in_translation
title: (λ²ˆμ—­μ€‘) Quanto
- local: in_translation
title: (λ²ˆμ—­μ€‘) EETQ
- local: quantization/eetq
title: EETQ
- local: in_translation
title: (λ²ˆμ—­μ€‘) HQQ
- local: in_translation
Expand Down
47 changes: 47 additions & 0 deletions docs/source/ko/quantization/eetq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--Copyright 2024 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

-->

# 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")
```
Loading