2020美团技术年货 算法篇考虑到后续内容出现的 Transformer Layer 就是 Transformer 的编码层,这里先对 它做简单的介绍。它主要由以下两部分组成: 算法 < 25 Multi-Head Attention Multi-Head Attention 实际上是 h 个 Self-Attention 的集成, h 代表头的个数。其 中 Self-Attention 的计算公式如下: 其中,Q 代表查询,K Feed-Forward Networks 该模块是为了提高模型的非线性能力提出来的,它就是全连接神经网络结构,计算公 式如下: 26 > 美团 2020 技术年货 Transformer Layer 就是通过这种自注意力机制层和普通非线性层来实现对输入信号 的编码,得到信号的表示。 美团搜索排序 Transformer 实践经验 Transformer 在美团搜索排序上的实践主要分以下三个部分:第一部分是特征工程, 在搜索排序系统中,特征工程的输入特征维度高但稀疏性很强,而准确的交叉特征对 模型的效果又至关重要。所以寻找一种高效的特征提取方式就变得十分重要,我们借 鉴 AutoInt[3] 的方法,采用 Transformer Layer 进行特征的高阶组合。 模型结构 我们的模型结构参考 AutoInt[3] 结构,但在实践中,根据美团搜索的数据特点,我们 对模型结构做了一些调整,如下图 2 所示: 图 2 Transformer&Deep0 码力 | 317 页 | 16.57 MB | 1 年前3
2022年美团技术年货 合辑< 29 图 9 PTQ 与 QAT 子图区别 QAT INT8 计算图中 neck.reduce_layer1.conv 融合节点输出精度是 FP32,并 且跟了 2 个 quantize_scale_node 节点,而 PTQ INT8 图中的 neck.reduce_ layer1.conv 融合节点输出的是 INT8。很显然,QAT 图中 FP32 和 INT8 之间的转 换会带来额外的开销。我们又利用 QAT INT8 的 ONNX 图结构,找 到了 neck.reduce_layer1.conv 这个位置,图 10 给出该节点示意。 图 10 因 Scale 不同而产生了双分支 30 > 2022年美团技术年货 通过分析 ONNX 图结构,我们发现了 QAT INT8 引擎中 neck.reduce_layer1. conv 输出为 FP32,并且为两个分支保留了 quantize_scale_node 分支的输入量化 scale 为 0.083,而 neck.Rep_n3.conv1 分支的输入量化 scale 为 0.105,这两个节点输入尺度是不同 的,导致 neck.reduce_layer1.conv 无法直接输出为 INT8。 可以看出,对于同一个输出,输入到多路分支后为何 scale 不同的,原因是右边 的分支经过了 concat 操作,会导致输出的数据分布发生变化,再进行激活校准0 码力 | 1356 页 | 45.90 MB | 1 年前3
Building Effective Embedded Systems: Architectural Best Practicesillustration⊡ Operating Systems ⊡ Threads ⊡ Layer Separation ⊡ Network Problems ⊡ External Interfaces ⊡ Simulators ⊡ Logs ⊡ Monitoring⊡ Operating Systems ⊡ Threads ⊡ Layer Separation ⊡ Network Problems ⊡ operating system for complex systems with soft real-time requirements⊡ Operating Systems ⊡ Threads ⊡ Layer Separation ⊡ Network Problems ⊡ External Interfaces ⊡ Simulators ⊡ Logs ⊡ MonitoringMine⊡ Collects Threads ⊡ Layer Separation ⊡ Network Problems ⊡ External Interfaces ⊡ Simulators ⊡ Logs ⊡ MonitoringEmbedded Software Separate the logic layer from the hardware layerSeparate the logic layer from the0 码力 | 241 页 | 2.28 MB | 6 月前3
领域驱动设计&中台/DDD在旅游电商架构演进中的实践Party API Middle Layer Third Party API Third Party API Application Middle Layer Client Client Client Application Layer Application Layer �� �� �� �� 1 2 3 User Interface Layer Third Party API API Middle Layer Client Application Layer 4 User Interface Layer �����DIP� �� ���� - �� - ������� Application Layer Infrastructure Layer Third Party API User Interface Layer Client DIP 4 Application Layer Infrastructure Layer Third Party API User Interface Layer Client DIP 5 DIP Application Layer Infrastructure Layer Third Party API User Interface Layer Client DIP 6 Domain0 码力 | 47 页 | 1.45 MB | 1 年前3
Rust 异步 Runtime 的兼容层 - 施继成Rust async runtime Analyze the reason of runtime isolation # Async runtime binding # Compatible layer 1 Create a wheel used everywhere Table of Contents 2 3 # Rust async runtime 1 Light-weight # Compatible layer 3 Insight of compatible layer • Rust lang and compiler → syntax and task type • Async compatible layer → I/O and task management Compatible layer Compatible Layer Compare runtimes • Async-std • Similar component structures Compatible layer Compare runtimes • Tokio • Async-std • Almost the same APIs Compatible layer Main components in async runtimes • Macros • Data structures0 码力 | 22 页 | 957.41 KB | 1 年前3
Linear Algebra Coming to Standard C++What are the responsibilities of a “linear algebra library”? • Layer -1: Fundamentals • Multidimensional arrays & iteration • Layer 0: Performance primitives • Vector: dot, norm, vector sum, plane update • Layer 1: Low-level math problems • Linear systems 𝐴𝑥 = 𝑏 (& determinants, etc.) • Least-squares problems min 𝑥 𝐴𝑥 − 𝑏 2 • Eigenvalue & singular value problems 𝐴𝑥 = 𝜆𝑥 • Layer 2: Higher-level What are the responsibilities of a “linear algebra library”? • Layer -1: Fundamentals • Multidimensional arrays & iteration • Layer 0: Performance primitives • Vector: dot, norm, vector sum, plane0 码力 | 46 页 | 2.95 MB | 6 月前3
Solving Nim by the Use of Machine Learningthe weights are all different14. Figure 3 shows a model of a perceptron. Note that there is just 1 layer of neurons, the darker nodes, but those neurons are the McCulloch Pitt neurons mentioned previously (1) 1 input x output y bias 0 1 2 3 ... i 1 2 3 ... j Figure 2: A model of a single layer Perceptron. Note that only the darker nodes are actual neurons, the lighter ones are there to show perceptron. 4.2.2 The Multilayer Perceptron To make the perceptron more useful, we now have another layer. The problem with doing this is that the algorithm needed to train it is rather more compli- cated0 码力 | 109 页 | 6.58 MB | 1 年前3
Spring Framework 1.1.5 Reference............................................. 191 18. Sending Email with Spring mail abstraction layer ....................................................................... 18.1. Introduction ...... Struts on top, but you could also choose to just use the Hibernate integration or the JDBC abstraction layer. Spring is non-intrusive, meaning dependencies on the framework are generally none or absolutely minimal creation of contexts by, for example, a servlet container. The DAO package provides a JDBC-abstraction layer that removes the need to do tedious JDBC coding and parsing of database-vendor specific error codes0 码力 | 223 页 | 1.22 MB | 1 年前3
Spring Framework 1.2.1 Reference............................................. 197 18. Sending Email with Spring mail abstraction layer ....................................................................... 18.1. Introduction ...... Struts on top, but you could also choose to just use the Hibernate integration or the JDBC abstraction layer. Spring is non-intrusive, meaning dependencies on the framework are generally none or absolutely minimal creation of contexts by, for example, a servlet container. The DAO package provides a JDBC-abstraction layer that removes the need to do tedious JDBC coding and parsing of database-vendor specific error codes0 码力 | 244 页 | 1.30 MB | 1 年前3
Spring Framework 1.2.0 Reference............................................. 196 18. Sending Email with Spring mail abstraction layer ....................................................................... 18.1. Introduction ...... Struts on top, but you could also choose to just use the Hibernate integration or the JDBC abstraction layer. Spring is non-intrusive, meaning dependencies on the framework are generally none or absolutely minimal creation of contexts by, for example, a servlet container. The DAO package provides a JDBC-abstraction layer that removes the need to do tedious JDBC coding and parsing of database-vendor specific error codes0 码力 | 243 页 | 1.29 MB | 1 年前3
共 899 条
- 1
- 2
- 3
- 4
- 5
- 6
- 90













