forked from liguodongiot/llm-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da75365
commit 31c75e9
Showing
34 changed files
with
365 additions
and
2,778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
|
||
- [GPU 工作原理解析](https://zhuanlan.zhihu.com/p/697694330) | ||
- [GPU 架构与 CUDA 关系](https://zhuanlan.zhihu.com/p/697746975) | ||
|
2 changes: 0 additions & 2 deletions
2
ai-infra/ai-hardware/NVIDIA-GPU型号.md → ai-infra/算力/NVIDIA-GPU型号.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
|
||
|
||
|
||
|
||
|
||
Nvidia下游市场分为四类:游戏、专业可视化、数据中心、汽车,各市场重点产品如下: | ||
|
||
游戏:GeForce RTX/GTX系列GPU(PCs)、GeForce NOW(云游戏)、SHIELD(游戏主机); | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
|
||
|
||
|
||
文生图: | ||
- Stable Diffusion | ||
- 文心一格:https://yige.baidu.com/creation?mode=0 | ||
|
||
图生文: | ||
- Blip2 | ||
|
||
|
||
|
||
|
||
|
||
|
||
数字人 | ||
- 百度智能云曦灵数字人:https://xiling.cloud.baidu.com/main/plaza/portrait | ||
|
||
|
||
|
||
AI教研平台 | ||
|
||
|
||
音乐生成模型: Suno V3 Alpha | ||
|
||
弊端就是Suno最多只能生成2分钟的音乐,所以可以听到最后,会戛然而止直接截断,但是已经比V2好很多了。 | ||
|
||
但是这个音质、咬字、节奏编排啥的,也都好太多太多了。 | ||
|
||
https://app.suno.ai/ | ||
|
||
要生成音乐的话,第一步肯定是写prompt,第二步(纯音乐没有)就是写歌词。 | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
|
||
|
||
|
||
|
||
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /var/run/docker/containerd/daemon/io.containerd.runtime.v2.task/moby/579418211a825ef5c7fcf5becdbe90804f0ed7862d9c59663995f9dd463937b4/log.json: no such file or directory): /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime did not terminate successfully: exit status 1: 2024/07/24 09:59:29 owner not right /usr/bin/runc 1000 | ||
|
||
|
||
|
||
|
||
错误信息表明/usr/bin/runc这个文件的所有权不正确,即它不是由root用户拥有或者它的所属用户不是1000。Docker在创建并运行容器时需要runc这个二进制文件,如果权限设置不当,Docker将无法正确执行。 | ||
|
||
|
||
解决办法: | ||
|
||
|
||
查看权限 | ||
|
||
ls -lah /usr/bin/runc | ||
|
||
|
||
修改权限 | ||
|
||
sudo chown root:root /usr/bin/runc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
|
||
|
||
昇腾docker runtime仓库,在docker容器场景下,使用昇腾NPU,提供更简单的设备和依赖路径挂载方法。 | ||
|
||
|
||
https://gitee.com/ascend/ascend-docker-runtime | ||
|
||
|
||
|
||
安装:https://www.hiascend.com/document/detail/zh/mindx-dl/300/dluserguide/clusterscheduling/dlug_installation_02_000025.html | ||
|
||
|
||
Ascend Docker Runtime组件参考信息说明: | ||
|
||
https://www.hiascend.com/document/detail/zh/mindx-dl/300/dluserguide/clusterscheduling/dlug_installation_02_000036.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,7 @@ docker save -o mindie-1.0.tar ascendhub.huawei.com/public-ascendhub/mindie:1.0.R | |
scp [email protected]:/root/mindie-1.0.tar . | ||
# 断点续传 | ||
rsync -P --rsh=ssh -r [email protected]:/root/mindie-1.0.tar . | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"OtherParam": | ||
{ | ||
"ResourceParam" : | ||
{ | ||
"cacheBlockSize" : 128, | ||
"preAllocBlocks" : 8 | ||
}, | ||
"LogParam" : | ||
{ | ||
"logLevel" : "Info", | ||
"logPath" : "/logs/mindservice.log" | ||
}, | ||
"ServeParam" : | ||
{ | ||
"ipAddress" : "0.0.0.0", | ||
"port" : 1025, | ||
"maxLinkNum" : 300, | ||
"httpsEnabled" : false, | ||
"tlsCaPath" : "security/ca/", | ||
"tlsCaFile" : ["ca.pem"], | ||
"tlsCert" : "security/certs/server.pem", | ||
"tlsPk" : "security/keys/server.key.pem", | ||
"tlsPkPwd" : "security/pass/mindie_server_key_pwd.txt", | ||
"kmcKsfMaster" : "tools/pmt/master/ksfa", | ||
"kmcKsfStandby" : "tools/pmt/standby/ksfb", | ||
"tlsCrl" : "security/certs/server_crl.pem" | ||
} | ||
}, | ||
"WorkFlowParam": | ||
{ | ||
"TemplateParam" : | ||
{ | ||
"templateType": "Standard", | ||
"templateName" : "Standard_llama", | ||
"pipelineNumber" : 1 | ||
} | ||
}, | ||
"ModelDeployParam": | ||
{ | ||
"maxSeqLen" : 2560, | ||
"npuDeviceIds" : [[$npuids]], | ||
"ModelParam" : [ | ||
{ | ||
"modelInstanceType": "Standard", | ||
"modelName" : "$model_name", | ||
"modelWeightPath" : "$model_weight_path", | ||
"worldSize" : $world_size, | ||
"cpuMemSize" : 5, | ||
"npuMemSize" : $npu_mem_size, | ||
"backendType": "atb" | ||
} | ||
] | ||
}, | ||
"ScheduleParam": | ||
{ | ||
"maxPrefillBatchSize" : 192, | ||
"maxPrefillTokens" : 12000, | ||
"prefillTimeMsPerReq" : 150, | ||
"prefillPolicyType" : 0, | ||
"decodeTimeMsPerReq" : 50, | ||
"decodePolicyType" : 0, | ||
"maxBatchSize" : 256, | ||
"maxIterTimes" : 1024, | ||
"maxPreemptCount" : 200, | ||
"supportSelectBatch" : true, | ||
"maxQueueDelayMicroseconds" : 5000 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
#!/bin/bash | ||
|
||
echo "入参:" $@ | ||
|
||
for a in "$@"; do | ||
#echo $a | ||
if [[ `echo $a | grep "^--model_name="` ]]; then | ||
model_name=`echo $a | grep "^--model_name=" | awk -F '=' '{print $2}'` | ||
fi | ||
if [[ `echo $a | grep "^--model_weight_path="` ]]; then | ||
model_weight_path=`echo $a | grep "^--model_weight_path=" | awk -F '=' '{print $2}'` | ||
fi | ||
if [[ `echo $a | grep "^--world_size="` ]]; then | ||
world_size=`echo $a | grep "^--world_size=" | awk -F '=' '{print $2}'` | ||
fi | ||
if [[ `echo $a | grep "^--npu_mem_size="` ]]; then | ||
npu_mem_size=`echo $a | grep "^--npu_mem_size=" | awk -F '=' '{print $2}'` | ||
fi | ||
done | ||
|
||
if [ -z "$model_name" ]; then | ||
model_name="default" | ||
fi | ||
|
||
if [ -z "$model_weight_path" ]; then | ||
model_weight_path="/workspace/model" | ||
fi | ||
|
||
if [ -z "$world_size" ]; then | ||
world_size=4 | ||
fi | ||
|
||
if [ -z "$npu_mem_size" ]; then | ||
npu_mem_size=8 | ||
fi | ||
|
||
echo "平台入参: model_name: $model_name, model_weight_path: $model_weight_path , world_size: $world_size , npu_mem_size: $npu_mem_size" | ||
|
||
|
||
npuids="" | ||
card_num=$(($world_size - 1)) | ||
for i in `seq 0 $card_num` | ||
do | ||
if [[ $i == $card_num ]] ; | ||
then | ||
npuids=$npuids$i | ||
else | ||
npuids=$npuids$i"," | ||
fi | ||
done | ||
|
||
|
||
echo $npuids | ||
|
||
|
||
# DEPLOYMENT_CONF_PATH="/home/guodong.li/workspace/config.json" | ||
|
||
DEPLOYMENT_CONF_PATH="/usr/local/Ascend/mindie/latest/mindie-service/conf/config.json" | ||
|
||
cat <<EOF > $DEPLOYMENT_CONF_PATH | ||
{ | ||
"OtherParam": | ||
{ | ||
"ResourceParam" : | ||
{ | ||
"cacheBlockSize" : 128, | ||
"preAllocBlocks" : 8 | ||
}, | ||
"LogParam" : | ||
{ | ||
"logLevel" : "Info", | ||
"logPath" : "/logs/mindservice.log" | ||
}, | ||
"ServeParam" : | ||
{ | ||
"ipAddress" : "0.0.0.0", | ||
"port" : 1025, | ||
"maxLinkNum" : 300, | ||
"httpsEnabled" : false, | ||
"tlsCaPath" : "security/ca/", | ||
"tlsCaFile" : ["ca.pem"], | ||
"tlsCert" : "security/certs/server.pem", | ||
"tlsPk" : "security/keys/server.key.pem", | ||
"tlsPkPwd" : "security/pass/mindie_server_key_pwd.txt", | ||
"kmcKsfMaster" : "tools/pmt/master/ksfa", | ||
"kmcKsfStandby" : "tools/pmt/standby/ksfb", | ||
"tlsCrl" : "security/certs/server_crl.pem" | ||
} | ||
}, | ||
"WorkFlowParam": | ||
{ | ||
"TemplateParam" : | ||
{ | ||
"templateType": "Standard", | ||
"templateName" : "Standard_llama", | ||
"pipelineNumber" : 1 | ||
} | ||
}, | ||
"ModelDeployParam": | ||
{ | ||
"maxSeqLen" : 2560, | ||
"npuDeviceIds" : [[$npuids]], | ||
"ModelParam" : [ | ||
{ | ||
"modelInstanceType": "Standard", | ||
"modelName" : "$model_name", | ||
"modelWeightPath" : "$model_weight_path", | ||
"worldSize" : $world_size, | ||
"cpuMemSize" : 5, | ||
"npuMemSize" : $npu_mem_size, | ||
"backendType": "atb" | ||
} | ||
] | ||
}, | ||
"ScheduleParam": | ||
{ | ||
"maxPrefillBatchSize" : 256, | ||
"maxPrefillTokens" : 8192, | ||
"prefillTimeMsPerReq" : 150, | ||
"prefillPolicyType" : 0, | ||
"decodeTimeMsPerReq" : 50, | ||
"decodePolicyType" : 0, | ||
"maxBatchSize" : 256, | ||
"maxIterTimes" : 1024, | ||
"maxPreemptCount" : 200, | ||
"supportSelectBatch" : true, | ||
"maxQueueDelayMicroseconds" : 50000 | ||
} | ||
} | ||
EOF | ||
|
||
echo "部署参数,$DEPLOYMENT_CONF_PATH" | ||
cat $DEPLOYMENT_CONF_PATH | ||
|
||
source /usr/local/Ascend/ascend-toolkit/set_env.sh | ||
source /usr/local/Ascend/mindie/set_env.sh | ||
source /usr/local/Ascend/llm_model/set_env.sh | ||
|
||
export PYTHONPATH=/usr/local/Ascend/llm_model:$PYTHONPATH | ||
cd /usr/local/Ascend/mindie/latest/mindie-service/bin | ||
|
||
./mindieservice_daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.