Commit 127d4fe2 authored by chenxj's avatar chenxj
Browse files

update README

parent ed679b4e
# bert_large_squad_onnx # bert_large_squad_onnx
## 模型介绍 ## 论文
bert-large的squad模型。 https://arxiv.org/pdf/1810.04805.pdf
## 模型结构 ## 模型结构
基于transformer的结构 bert_large_squad核心是transformer,transformer结构如下:
## 推理
### 环境配置 ![image](https://developer.hpccube.com/codes/modelzoo/bert_large_squad_onnx/-/raw/main/resources/transformer.png)
## 算法原理
bert_large_squad模型的主要参数为:24个transformer层、1024个hidden size、16个self-attention heads,简要原理可用下图表示:
![image](https://developer.hpccube.com/codes/modelzoo/bert_large_squad_onnx/-/raw/main/resources/squad.png)
## 数据集
暂无合适中文数据集
## 环境配置
[光源](https://www.sourcefind.cn/#/service-details)可拉取推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载onnxruntime安装包。bert_large_squad_onnx推荐的镜像如下: [光源](https://www.sourcefind.cn/#/service-details)可拉取推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载onnxruntime安装包。bert_large_squad_onnx推荐的镜像如下:
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1 docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1
...@@ -15,11 +22,13 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0 ...@@ -15,11 +22,13 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0
``` ```
python3 fp16-convert.py python3 fp16-convert.py
``` ```
### 推理 ## 推理
``` ```
python3 main.py python3 main.py
``` ```
## 性能数据 ## result
![image](https://developer.hpccube.com/codes/modelzoo/bert_large_squad_onnx/-/raw/main/resources/bert_result.png)
### 性能数据
fp32 fp32
| loop | time(ms) | | loop | time(ms) |
...@@ -49,6 +58,11 @@ fp16 ...@@ -49,6 +58,11 @@ fp16
| 9 | 0.048555332934483886 | | 9 | 0.048555332934483886 |
| 10 | 0.048343464033678174 | | 10 | 0.048343464033678174 |
## 应用场景
### 算法类别
nlp
### 热点应用行业
问答系统
## 源码仓库及问题反馈 ## 源码仓库及问题反馈
https://developer.hpccube.com/codes/modelzoo/bert_large_squad_onnx https://developer.hpccube.com/codes/modelzoo/bert_large_squad_onnx
## 参考 ## 参考
......
# 模型唯一标识
modelCode = 339
# 模型名称 # 模型名称
modelName=bert_large_squad_onnx modelName=bert_large_squad_onnx
# 模型描述 # 模型描述
modelDescription=bert_large_squad_onnx是基于bert-large的squad downstream任务的onnx模型 modelDescription=bert_large_squad_onnx是基于bert-large的squad downstream任务的onnx模型
# 应用场景 # 应用场景
appScenario=推理,NLP appScenario=推理,NLP,问答
# 框架类型 # 框架类型
frameType=onnxruntime frameType=onnxruntime
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment