Llama 2 Powered By ONNX

Llama 2 Powered By ONNX

  • [1. Llama 2](#1. Llama 2)
    • [1.1. The structure of Llama 2](#1.1. The structure of Llama 2)
  • References

https://github.com/microsoft/Llama-2-Onnx

1. Llama 2

Llama 2 is a collection of pretrained and fine-tuned generative text models.

1.1. The structure of Llama 2

Llama 2 model consists of a stack of decoder layers. Each decoder layer (or transformer block) is constructed from one self-attention layer and one feed-forward multi-layer perceptron.

Llama models use different projection sizes compared with classic transformers in the feed-forward layer, for instance, both Llama 1 and Llama 2 projection use 2.7x hidden size rather than the standard 4x hidden size.

A key difference between Llama 1 and Llama 2 is the architectural change of attention layer, in which Llama 2 takes advantage of Grouped Query Attention (GQA) mechanism to improve efficiency.


Llama2 Model


Llama2 Model Top View


Decoder Layer

References

1 Yongqiang Cheng, https://yongqiang.blog.csdn.net/

相关推荐
2601_9622962817 天前
Pytorch转ONNX详解
pytorch·深度学习·框架·onnx·模型转换
长江后浪博客18 天前
Python + YOLOv8 疲劳驾驶 AI 视觉检测入门:从模型训练到 ONNX 实时摄像头检测完整实战
人工智能·python·yolo·疲劳驾驶检测·onnx·yolov8
JeJe同学24 天前
ONNX 的核心原理
人工智能·onnx
笑霸final1 个月前
不用上传服务器!用 Vue3 + ONNX Runtime Web 在浏览器本地实现智能抠图
运维·前端·图像处理·ai·onnx·canva可画·web性能优化
大鹏的NLP博客1 个月前
ONNX Runtime CUDA 推理优化实战:破解 C++ 比 Python 慢 28 倍的假象
c++·onnx·推理优化
AlfredZhao1 个月前
在 Oracle APEX 中用 BGE_BASE 生成向量:从模型导入到历史数据更新
onnx
Lee_jerome1 个月前
从 PyTorch 权重到 RK3588 板端推理:ResNet18 二分类模型完整部署教程
pytorch·边缘计算·rk3588·模型部署·onnx·resnet18·int8量化
johnny2332 个月前
ONNX生态简介与实战:ONNX Runtime
onnx
大鹏的NLP博客2 个月前
深度学习模型PyTorch与ONNX数值一致性校验通用技术报告
人工智能·pytorch·深度学习·onnx
阿钱真强道2 个月前
13 YOLOv8的ONNX输出结构——9个张量如何变成检测框
目标检测·onnx·yolov8·nms·dfl