{ "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 }