Skip to content

Commit c527e1a

Browse files
committed
새로 추가된 문서 링크 변경 및 번역 반영 (#574)
1 parent e2f7352 commit c527e1a

2 files changed

Lines changed: 36 additions & 36 deletions

File tree

index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
아래 튜토리얼들이 새로 추가되었습니다.
77

8-
* `Introduction to TorchRec <https://pytorch.org/tutorials/intermediate/torchrec_tutorial.html?utm_source=whats_new_tutorials&utm_medium=torchrec>`__
9-
* `Getting Started with Fully Sharded Data Parallel (FSDP) <https://pytorch.org/tutorials/intermediate/FSDP_tutorial.html?utm_source=whats_new_tutorials&utm_medium=FSDP>`__
10-
* `Grokking PyTorch Intel CPU Performance from First Principles <https://pytorch.org/tutorials/intermediate/torchserve_with_ipex?utm_source=whats_new_tutorials&utm_medium=torchserve_ipex>`__
11-
* `Customize Process Group Backends Using Cpp Extensions <https://pytorch.org/tutorials/intermediate/process_group_cpp_extension_tutorial.html?utm_source=whats_new_tutorials&utm_medium=cpp_ext>`__
12-
* `Forward-mode Automatic Differentiation <https://pytorch.org/tutorials/intermediate/forward_ad_usage.html?utm_source=whats_new_tutorials&utm_medium=forward_ad>`__ (added functorch API capabilities)
13-
* `Real Time Inference on Raspberry Pi 4 (30 fps!) <https://pytorch.org/tutorials/intermediate/realtime_rpi.html?utm_source=whats_new_tutorials&utm_medium=rpi>`__
8+
* `TorchRec 소개 </intermediate/torchrec_tutorial.html?utm_source=whats_new_tutorials&utm_medium=torchrec>`__
9+
* `Getting Started with Fully Sharded Data Parallel (FSDP) </intermediate/FSDP_tutorial.html?utm_source=whats_new_tutorials&utm_medium=FSDP>`__
10+
* `Grokking PyTorch Intel CPU Performance from First Principles </intermediate/torchserve_with_ipex?utm_source=whats_new_tutorials&utm_medium=torchserve_ipex>`__
11+
* `Customize Process Group Backends Using Cpp Extensions </intermediate/process_group_cpp_extension_tutorial.html?utm_source=whats_new_tutorials&utm_medium=cpp_ext>`__
12+
* `Forward-mode Automatic Differentiation </intermediate/forward_ad_usage.html?utm_source=whats_new_tutorials&utm_medium=forward_ad>`__ (added functorch API capabilities)
13+
* `Raspberry Pi 4 에서 실시간 추론(Inference) (30fps!) </intermediate/realtime_rpi.html?utm_source=whats_new_tutorials&utm_medium=rpi>`__
1414

1515
.. raw:: html
1616

intermediate_source/torchrec_tutorial.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
TorchRec 소개
2-
============
2+
===============
33

44
.. tip::
5-
이 튜토리얼을 최대한 활용하려면 이
5+
이 튜토리얼을 최대한 활용하려면 이
66
`Colab 버전 <https://colab.research.google.com/github/pytorch/torchrec/blob/main/Torchrec_Introduction.ipynb>`__ 을 사용하는 것이 좋습니다.
77
이를 통해 아래에 제시된 정보를 실험할 수 있습니다.
8-
8+
99
아래 동영상이나 `유튜브 <https://www.youtube.com/watch?v=cjgj41dvSeQ>`__ 에서 따라해보세요.
1010

1111
.. raw:: html
@@ -14,11 +14,11 @@ TorchRec 소개
1414
<iframe width="560" height="315" src="https://www.youtube.com/embed/cjgj41dvSeQ" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
1515
</div>
1616

17-
추천 시스템을 만들 때, 제품이나 페이지와 같은 객체를 임베딩으로 표현하고 싶은 경우가 많습니다.
18-
Meta AI의 `딥러닝 추천 모델 <https://arxiv.org/abs/1906.00091>`__ 또는 DLRM을 예로 들 수 있습니다.
19-
객체의 수가 증가함에 따라, 임베딩 테이블의 크기가 단일 GPU의 메모리를 초과할 수 있습니다.
20-
일반적인 방법은 모델 병렬화의 일종으로, 임베딩 테이블을 여러 디바이스로 샤딩(shard)하는 것입니다.
21-
이를 위해, TorchRec은 |DistributedModelParallel|_ 또는 DMP로 불리는 주요한 API를 소개합니다.
17+
추천 시스템을 만들 때, 제품이나 페이지와 같은 객체를 임베딩으로 표현하고 싶은 경우가 많습니다.
18+
Meta AI의 `딥러닝 추천 모델 <https://arxiv.org/abs/1906.00091>`__ 또는 DLRM을 예로 들 수 있습니다.
19+
객체의 수가 증가함에 따라, 임베딩 테이블의 크기가 단일 GPU의 메모리를 초과할 수 있습니다.
20+
일반적인 방법은 모델 병렬화의 일종으로, 임베딩 테이블을 여러 디바이스로 샤딩(shard)하는 것입니다.
21+
이를 위해, TorchRec은 |DistributedModelParallel|_ 또는 DMP로 불리는 주요한 API를 소개합니다.
2222
PyTorch의 DistributedDataParallel와 같이, DMP는 분산 학습을 가능하게하기 위해 모델을 포장합니다.
2323

2424
설치
@@ -40,14 +40,14 @@ TorchRec을 사용할 때는 CUDA를 적극 추천합니다. CUDA를 사용하
4040
개요
4141
----
4242

43-
이 튜토리얼에서는 TorchRec의 ``nn.module`` |EmbeddingBagCollection|_, |DistributedModelParallel|_ API,
43+
이 튜토리얼에서는 TorchRec의 ``nn.module`` |EmbeddingBagCollection|_, |DistributedModelParallel|_ API,
4444
데이터 구조 |KeyedJaggedTensor|_ 3가지 내용을 다룹니다.
4545

4646

4747
분산 설정
4848
~~~~~~~
4949

50-
torch.distributed를 사용하여 환경을 설정합니다. 분산에 대한 자세한 내용은 이
50+
torch.distributed를 사용하여 환경을 설정합니다. 분산에 대한 자세한 내용은 이
5151
`튜토리얼 <https://pytorch.org/tutorials/beginner/dist_overview.html>`__ 을 참고하세요.
5252

5353
여기서는 1개의 colab GPU에 대응하는 1개의 랭크(colab 프로세스)를 사용합니다.
@@ -65,7 +65,7 @@ torch.distributed를 사용하여 환경을 설정합니다. 분산에 대한
6565
os.environ["MASTER_PORT"] = "29500"
6666
6767
# 참고 - 튜토리얼을 실행하려면 V100 또는 A100이 필요합니다!
68-
# colab free K80과 같은 오래된 GPU를 사용한다면,
68+
# colab free K80과 같은 오래된 GPU를 사용한다면,
6969
# 적절한 CUDA 아키텍처로 fbgemm를 컴파일하거나,
7070
# CPU에서 "gloo"로 실행해야 합니다.
7171
dist.init_process_group(backend="nccl")
@@ -77,12 +77,12 @@ EmbeddingBag에서 EmbeddingBagCollection으로
7777
PyTorch는 |torch.nn.Embedding|_ 와 |torch.nn.EmbeddingBag|_ 를 통해 임베딩을 나타냅니다.
7878
EmbeddingBag은 임베딩의 풀(pool) 버전입니다.
7979

80-
TorchRec은 임베딩 컬렉션을 생성하여 이 모듈들을 확장합니다.
80+
TorchRec은 임베딩 컬렉션을 생성하여 이 모듈들을 확장합니다.
8181
EmbeddingBag 그룹을 나타내고자 |EmbeddingBagCollection|_ 을 사용합니다.
8282

8383
여기서는, 2개의 EmbeddingBag을 가지는 EmbeddingBagCollection (EBC)을 생성합니다.
84-
각 테이블 ``product_table`` 과 ``user_table`` 는 4096 크기의 64 차원 임베딩으로 표현됩니다.
85-
“meta” 디바이스에서 EBC를 초기에 할당하는 방법에 주의하세요. EBC에게 아직 메모리가 할당되지 않았습니다.
84+
각 테이블 ``product_table`` 과 ``user_table`` 는 4096 크기의 64 차원 임베딩으로 표현됩니다.
85+
“meta” 디바이스에서 EBC를 초기에 할당하는 방법에 주의하세요. EBC에게 아직 메모리가 할당되지 않았습니다.
8686

8787
.. code:: python
8888
@@ -110,15 +110,15 @@ EmbeddingBag 그룹을 나타내고자 |EmbeddingBagCollection|_ 을 사용합
110110
DistributedModelParallel
111111
~~~~~~~~~~~~~~~~~~~~~~~~
112112

113-
이제 모델을 |DistributedModelParallel|_ (DMP)로 감쌀 준비가 되었습니다.
113+
이제 모델을 |DistributedModelParallel|_ (DMP)로 감쌀 준비가 되었습니다.
114114
DMP의 인스턴스화는 다음과 같습니다.
115115

116116
1. 모델을 샤딩하는 방법을 결정합니다. DMP는 이용 가능한 ‘sharders’를 수집하고
117117
임베딩 테이블을 샤딩하는 최적의 방법 (즉, the EmbeddingBagCollection)의 ‘plan’을 작성합니다.
118-
2. 모델을 샤딩합니다. 이 과정은 각 임베딩 테이블을 적절한 장치로 메모리를 할당하는 것을 포함합니다.
118+
2. 모델을 샤딩합니다. 이 과정은 각 임베딩 테이블을 적절한 장치로 메모리를 할당하는 것을 포함합니다.
119119

120120
이 예제에서는 2개의 EmbeddingTables과 하나의 GPU가 있기 때문에,
121-
TorchRec은 모두 단일 GPU에 배치합니다.
121+
TorchRec은 모두 단일 GPU에 배치합니다.
122122

123123
.. code:: python
124124
@@ -131,7 +131,7 @@ TorchRec은 모두 단일 GPU에 배치합니다.
131131
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132132

133133
``input`` 과 ``offsets`` 이 있는 |nn.Embedding|_ 과 |nn.EmbeddingBag|_ 를 질의합니다.
134-
입력은 lookup 값을 포함하는 1-D 텐서입니다.
134+
입력은 lookup 값을 포함하는 1-D 텐서입니다.
135135
오프셋은 시퀀스가 각 예제에서 가져오는 값의 수의 합인 1-D 텐서입니다.
136136

137137
위의 EmbeddingBag을 다시 만들어보는 예는 다음과 같습니다.
@@ -155,12 +155,12 @@ TorchRec은 모두 단일 GPU에 배치합니다.
155155
KeyedJaggedTensor로 미니 배치 표현하기
156156
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157157

158-
예제 및 기능별로 객체 ID가 임의의 수인 다양한 예제를 효율적으로 나타내야 합니다.
158+
예제 및 기능별로 객체 ID가 임의의 수인 다양한 예제를 효율적으로 나타내야 합니다.
159159
다양한 표현이 가능하도록, TorchRec 데이터구조 |KeyedJaggedTensor|_ (KJT)를 사용합니다.
160160

161-
“product” 와 “user”, 2개의 EmbeddingBag의 컬렉션을 참조하는 방법을 살펴봅니다.
162-
미니배치가 3명의 사용자와 3개의 예제로 구성되어 있다고 가정합니다.
163-
첫 번째는 2개의 product ID를 가지고, 두 번째는 아무것도 가지지 않고, 세 번째는 하나의 product ID를 가집니다.
161+
“product” 와 “user”, 2개의 EmbeddingBag의 컬렉션을 참조하는 방법을 살펴봅니다.
162+
미니배치가 3명의 사용자와 3개의 예제로 구성되어 있다고 가정합니다.
163+
첫 번째는 2개의 product ID를 가지고, 두 번째는 아무것도 가지지 않고, 세 번째는 하나의 product ID를 가집니다.
164164

165165
::
166166

@@ -185,19 +185,19 @@ KeyedJaggedTensor로 미니 배치 표현하기
185185
print(mb.to(torch.device("cpu")))
186186
187187
188-
KJT 배치 크기는 ``batch_size = len(lengths)//len(keys)`` 인 것을 눈여겨봐 주세요.
189-
위 예제에서 batch_size는 3입니다.
188+
KJT 배치 크기는 ``batch_size = len(lengths)//len(keys)`` 인 것을 눈여겨봐 주세요.
189+
위 예제에서 batch_size는 3입니다.
190190

191191

192192

193193
총정리하여, KJT 미니배치를 사용하여 분산 모델 질의하기
194194
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195195

196-
마지막으로 제품과 사용자의 미니배치를 사용하여 모델을 질의합니다.
196+
마지막으로 제품과 사용자의 미니배치를 사용하여 모델을 질의합니다.
197197

198-
결과 조회는 KeyedTensor를 포함합니다.
199-
각 키(key) 또는 특징(feature)은 크기가 3x64 (batch_size x embedding_dim)인
200-
2D 텐서를 포함합니다.
198+
결과 조회는 KeyedTensor를 포함합니다.
199+
각 키(key) 또는 특징(feature)은 크기가 3x64 (batch_size x embedding_dim)인
200+
2D 텐서를 포함합니다.
201201

202202
.. code:: python
203203
@@ -208,10 +208,10 @@ KJT 배치 크기는 ``batch_size = len(lengths)//len(keys)`` 인 것을 눈여
208208
추가 자료
209209
---------
210210

211-
자세한 내용은
211+
자세한 내용은
212212
`dlrm <https://github.com/pytorch/torchrec/tree/main/examples/dlrm>`__
213213
예제를 참고하세요. 이 예제는 Meta의 `DLRM <https://arxiv.org/abs/1906.00091>`__ 을 사용하여
214-
1테라바이트 데이터셋에 대한 멀티 노드 학습을 포함합니다.
214+
1테라바이트 데이터셋에 대한 멀티 노드 학습을 포함합니다.
215215

216216

217217
.. |DistributedModelParallel| replace:: ``DistributedModelParallel``

0 commit comments

Comments
 (0)