Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
labmlai
GitHub Repository: labmlai/annotated_deep_learning_paper_implementations
Path: blob/master/translate_cache/neox/samples/generate.zh.json
4929 views
1
{
2
"<h1>Generate Text with GPT-NeoX</h1>\n<p>This shows how to generate text from GPT-NeoX with a single GPU.</p>\n<p>This needs a GPU with more than 45GB memory.</p>\n": "<h1>\u4f7f\u7528 GPT-NEOX \u751f\u6210\u6587\u672c</h1>\n<p>\u8fd9\u8bf4\u660e\u4e86\u5982\u4f55\u4f7f\u7528\u5355\u4e2a GPU \u4ece GPT-NEOX \u751f\u6210\u6587\u672c\u3002</p>\n<p>\u8fd9\u9700\u8981\u4e00\u4e2a\u5185\u5b58\u8d85\u8fc745GB\u7684GPU\u3002</p>\n",
3
"<h2>Generate text</h2>\n": "<h2>\u751f\u6210\u6587\u672c</h2>\n",
4
"<h3>Predict the next token</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the model </li>\n<li><span translate=no>_^_1_^_</span> are the input token ids </li>\n<li><span translate=no>_^_2_^_</span> is the device of the model</li></ul>\n": "<h3>\u9884\u6d4b\u4e0b\u4e00\u4e2a\u4ee3\u5e01</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u6a21\u7279\u5417</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u8f93\u5165\u4ee4\u724c ID</li>\n<li><span translate=no>_^_2_^_</span>\u662f\u8be5\u578b\u53f7\u7684\u8bbe\u5907</li></ul>\n",
5
"<p> </p>\n": "<p></p>\n",
6
"<p>Append the predicted token </p>\n": "<p>\u8ffd\u52a0\u9884\u6d4b\u7684\u4ee4\u724c</p>\n",
7
"<p>Device </p>\n": "<p>\u8bbe\u5907</p>\n",
8
"<p>Eval model </p>\n": "<p>\u8bc4\u4f30\u6a21\u578b</p>\n",
9
"<p>Get next token. Note that we only feed the last token to the model because we cache the key/value pairs of previous tokens. </p>\n": "<p>\u83b7\u53d6\u4e0b\u4e00\u4e2a\u4ee4\u724c\u3002\u8bf7\u6ce8\u610f\uff0c\u6211\u4eec\u53ea\u5c06\u6700\u540e\u4e00\u4e2a\u4ee4\u724c\u63d0\u4f9b\u7ed9\u6a21\u578b\uff0c\u56e0\u4e3a\u6211\u4eec\u7f13\u5b58\u4e86\u5148\u524d\u4ee4\u724c\u7684\u952e/\u503c\u5bf9\u3002</p>\n",
10
"<p>Get the tokens </p>\n": "<p>\u83b7\u53d6\u4ee3\u5e01</p>\n",
11
"<p>Get token ids </p>\n": "<p>\u83b7\u53d6\u4ee3\u5e01 ID</p>\n",
12
"<p>Imports </p>\n": "<p>\u8fdb\u53e3</p>\n",
13
"<p>List of layers to load. This is used for testing. You can assign a subset of layers like <span translate=no>_^_0_^_</span> so that it only loads the first to transformer layers. </p>\n": "<p>\u8981\u52a0\u8f7d\u7684\u56fe\u5c42\u5217\u8868\u3002\u8fd9\u7528\u4e8e\u6d4b\u8bd5\u3002\u60a8\u53ef\u4ee5\u5c06\u5c42\u7684\u5b50\u96c6\u5206\u914d\u7ed9\u53d8\u538b\u5668\u5c42\uff0c<span translate=no>_^_0_^_</span>\u4f7f\u5176\u4ec5\u5c06\u7b2c\u4e00\u4e2a\u5c42\u52a0\u8f7d\u5230\u53d8\u538b\u5668\u5c42\u3002</p>\n",
14
"<p>Load layers </p>\n": "<p>\u52a0\u8f7d\u56fe\u5c42</p>\n",
15
"<p>Predict 100 tokens </p>\n": "<p>\u9884\u6d4b 100 \u4e2a\u4ee3\u5e01</p>\n",
16
"<p>Print </p>\n": "<p>\u6253\u5370</p>\n",
17
"<p>Prompt to complete </p>\n": "<p>\u63d0\u793a\u5b8c\u6210</p>\n",
18
"<p>Return predicted token </p>\n": "<p>\u8fd4\u56de\u9884\u6d4b\u7684\u4ee3\u5e01</p>\n",
19
"<p>Run the model </p>\n": "<p>\u8fd0\u884c\u6a21\u578b</p>\n",
20
"<p>Set the state to use cached activations </p>\n": "<p>\u8bbe\u7f6e\u72b6\u6001\u4ee5\u4f7f\u7528\u7f13\u5b58\u7684\u6fc0\u6d3b</p>\n",
21
"<p>Setup <a href=\"../utils/cache.html\">cache</a> to cache intermediate key/value pairs for faster generation </p>\n": "<p>\u8bbe\u7f6e<a href=\"../utils/cache.html\">\u7f13\u5b58</a>\u4ee5\u7f13\u5b58\u4e2d\u95f4\u952e/\u503c\u5bf9\u4ee5\u52a0\u5feb\u751f\u6210\u901f\u5ea6</p>\n",
22
"Generate Text with GPT-NeoX": "\u4f7f\u7528 GPT-NEOX \u751f\u6210\u6587\u672c"
23
}
24