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

定点量化技术 #78

Merged
merged 2 commits into from
May 30, 2018
Merged

定点量化技术 #78

merged 2 commits into from
May 30, 2018

Conversation

changkun
Copy link
Member

resolve #58

@leviding 最诚挚的歉意……

@leviding
Copy link
Member

辛苦啦哈哈

@luochen1992
Copy link

校对认领

priority has been improving accuracy and speed during training. Using floating
point arithmetic is an easy way to preserve accuracy and GPUs are designed to
accelerate these calculations.
由于现代神经网络的挑战之一是进行高精度的优化,其优先级已改善了训练期的精度和速度。使用浮点数运算是保持精度的简单方法之一,同时 GPU 也被设计为能为这些运算进行加速。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『其优先级已改善了训练期的精度和速度』=>『首先要做的是改善训练期的精度和速度』

for *training* grows with the amount of models trained on different
architectures, the computational demand for *inference* grows in proportion to
the amount of users.
然而,随着越来越多的机器学习模型需要被部署到移动设备上,推理的效率已经成为了一个关键性问题。训练期计算的需求随着不同训练模型的数量的增加而迅速增长,对于推理的计算需求也随着用户数量的增加而成比例的增加。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『训练期计算的需求随着不同训练模型的数量的增加而迅速增长,对于推理的计算需求也随着用户数量的增加而成比例的增加。』=>『对于训练期的计算需求,随着在不同架构上训练的模型的数量增加而迅速增长;对于推理的计算需求,也随着用户数量的增加而成比例的增加。』

AlexNet requires over 200 MB for the float format—almost all of that for the
model's millions of weights. Because the weights are slightly different
floating point numbers, simple compression formats perform poorly (like zip).
神经网络的模型需要消耗大量的磁盘空间。举个例子,原始的 AlexNet 需要至少 200MB 的空间来存储浮点格式的模型文件——几乎全部用于模型的百万权重。在权重间只有细微差异的表示中,简单的压缩格式效果不佳(如 Zip)。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『原始的 AlexNet 需要至少 200MB 的空间来存储浮点格式的模型文件——几乎全部用于模型的百万权重』=>『原始的 AlexNet 需要至少 200 MB 的空间来存储浮点格式的模型文件 —— 几乎全部用于模型数百万的权重』

storing the minimum and maximum weight for each layer, then compress each
weight's float value to an 8-bit integer representing the closest real number in
a linear set of 256 within the range.
权重在所有层中都以数值形式出现。对每一层而言,权重倾向于分布在一定范围内。量化技术则可以通过存储每层中的最大和最小的权重,然后压缩每层权重的浮点值转换为表示最接近真实实数的 8 位整数,从而达到压缩未文件大小的目的。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『从而达到压缩未文件大小的目的。』=>『从而达到压缩文件大小的目的。』

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『a linear set of 256 within the range.』漏译

a forward pass and a backward pass, while inference only uses a forward pass.
When we train the model with quantization in the loop, we ensure that the forward
pass matches precision for both training and inference.
我们的目标要在训练和推断期间内使用相同的精度来使用权重和激活值,但是一个相当重要的区别是在前向和后向传播中,推断值使用了前向过程。所以当我们训练模型期间同时加入量化,就要确保前向过程的训练和推理的精度。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『我们的目标要在训练和推断期间内使用相同的精度来使用权重和激活值,但是一个相当重要的区别是在前向和后向传播中,推断值使用了前向过程。所以当我们训练模型期间同时加入量化,就要确保前向过程的训练和推理的精度。』=>『我们的目标是要在训练和推断期间内,对于权重和激活值使用相同的精度,但是一个相当重要的区别是在前向和后向传播中,推断只使用了前向过程。所以当我们训练模型期间同时加入量化,就要确保前向过程的训练和推理的精度相匹配。』

and experimentation. Although rewrites and quantized training might not work or
improve performance for all models, we are working to generalize these
techniques.
重写训练和评估图的方法是一个活跃的研究和实验领域。 尽管重写和量化训练可能无法奏效或者不能提高所有模型的性能,但我们正在努力推广这些技术。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

尽管前多了空格

@luochen1992
Copy link

@changkun @leviding 校对完成

@changkun
Copy link
Member Author

@luochen1992 @leviding 修改完毕

@leviding leviding merged commit 0c03b2e into xitu:zh-hans May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/performance/quantization.md
3 participants