File size: 1,828 Bytes
83f9751 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
{
"cells": [
{
"cell_type": "markdown",
"id": "a25f3d36-e14f-4afd-8926-32748a42e1d1",
"metadata": {},
"source": [
"# 1 大模型运行环境简介\n",
"\n",
"\n",
"建议直接使用autodl,google colab等环境\n",
"\n",
"显卡:4090或者4090d\n",
"\n",
"内存:32G至少\n",
"\n",
"torch>=2.3.0\n",
"\n",
"具体可以参考:https://zhuanlan.zhihu.com/p/13479003076\n",
"\n",
"pip安装下面的基本transformer环境即可:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cdeae2e5-2a39-4370-a5ec-47780f8fa76a",
"metadata": {},
"outputs": [],
"source": [
"!pip install transformers sentencepiece google protobuf deepspeed peft datasets "
]
},
{
"cell_type": "markdown",
"id": "a355a6e6-62fc-4b8f-ba35-b9c2f0ef48c8",
"metadata": {},
"source": [
"如要运行deepspeed,一般使用一机多卡即可,本教程一般不会涉及需要多机多卡的案例\n",
"\n",
"\n",
"推荐的gpu主机:\n",
"* autodl.com, 国内的 \n",
"* vast.ai, 海外的\n",
"\n",
"主流云平台gpu一般都特别贵,也不允许运行4090等显卡。"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "813c37df-9fef-453a-bfbd-46dd05ac76dd",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|