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/

相关推荐
大鹏的NLP博客10 天前
深度学习模型PyTorch与ONNX数值一致性校验通用技术报告
人工智能·pytorch·深度学习·onnx
阿钱真强道12 天前
13 YOLOv8的ONNX输出结构——9个张量如何变成检测框
目标检测·onnx·yolov8·nms·dfl
weiwei228441 个月前
神经网络模型导出及开放标准格式ONNX
pytorch·onnx
再一次等风来1 个月前
YOLO26 实测记录:从模型下载、预测验证到 ONNX Runtime 推理部署
yolo·计算机视觉·onnx·yolo26
慢慢向上的蜗牛1 个月前
Qwen3-0.6B ONNX(KV-Cache)模型部署
llm·onnx·文本生成·自回归·kv-cache
指尖在键盘上舞动1 个月前
RKNN 模型部署:onnx转rknn后精度下降 —— 精度调优与问题排查
python·ubuntu·rk3588·rknn·onnx·npu
vonlycn3 个月前
PaddleDetection转ONNX 填坑
python·onnx·paddledetection
antzou3 个月前
字幕视频合成
onnx·tts·asr·vad·paraformer
antzou3 个月前
语音识别 (ASR)
人工智能·语音识别·onnx·asr·paraformer
小垣4 个月前
java调用yolo26n.onnx模型输出图像推理检测
java·人工智能·深度学习·onnx