Skip to content

Commit

Permalink
Merge pull request #563 from 01-ai/Haijian06-patch-1
Browse files Browse the repository at this point in the history
Update Inference_using_swift.ipynb
  • Loading branch information
nlmlml authored Jul 29, 2024
2 parents 5b67d55 + dbe2f5d commit b245eac
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Cookbook/cn/opensource/Inference/Inference_using_swift.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"metadata": {},
"source": [
"!pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -50,7 +52,9 @@
"metadata": {},
"source": [
"!pip install 'ms-swift[llm]' -U"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -78,7 +82,9 @@
"source": [
"import os\n",
"os.environ['CUDA_VISIBLE_DEVICES'] = '0'"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -113,7 +119,9 @@
"\n",
"# 设置随机种子\n",
"seed_everything(42)"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand All @@ -135,7 +143,9 @@
"# 打印查询和响应\n",
"print(f'query: {query}')\n",
"print(f'response: {response}')"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand Down

0 comments on commit b245eac

Please sign in to comment.