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/

相关推荐
JeJe同学2 天前
ONNX 的核心原理
人工智能·onnx
笑霸final5 天前
不用上传服务器!用 Vue3 + ONNX Runtime Web 在浏览器本地实现智能抠图
运维·前端·图像处理·ai·onnx·canva可画·web性能优化
大鹏的NLP博客6 天前
ONNX Runtime CUDA 推理优化实战:破解 C++ 比 Python 慢 28 倍的假象
c++·onnx·推理优化
AlfredZhao11 天前
在 Oracle APEX 中用 BGE_BASE 生成向量:从模型导入到历史数据更新
onnx
Lee_jerome15 天前
从 PyTorch 权重到 RK3588 板端推理:ResNet18 二分类模型完整部署教程
pytorch·边缘计算·rk3588·模型部署·onnx·resnet18·int8量化
johnny2331 个月前
ONNX生态简介与实战:ONNX Runtime
onnx
大鹏的NLP博客2 个月前
深度学习模型PyTorch与ONNX数值一致性校验通用技术报告
人工智能·pytorch·深度学习·onnx
阿钱真强道2 个月前
13 YOLOv8的ONNX输出结构——9个张量如何变成检测框
目标检测·onnx·yolov8·nms·dfl
weiwei228442 个月前
神经网络模型导出及开放标准格式ONNX
pytorch·onnx
再一次等风来3 个月前
YOLO26 实测记录:从模型下载、预测验证到 ONNX Runtime 推理部署
yolo·计算机视觉·onnx·yolo26