chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:19:01 +08:00
commit 3b90d1192f
2172 changed files with 594509 additions and 0 deletions
@@ -0,0 +1,17 @@
{
"<h1>Utilities and Helpers</h1>\n<ul><li><a href=\"cache.html\">Cache for intermediate activations (for faster inference)</a> </li>\n<li><a href=\"finetune.html\">Tools for finetuning</a> </li>\n<li><a href=\"trainer.html\">Trainer</a> </li>\n<li><a href=\"text_dataset.html\">Text dataset</a></li></ul>\n": "<h1>\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3068\u30d8\u30eb\u30d1\u30fc</h1>\n<ul><li><a href=\"cache.html\">\u4e2d\u9593\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u30ad\u30e3\u30c3\u30b7\u30e5 (\u63a8\u8ad6\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081)</a></li>\n<li><a href=\"finetune.html\">\u5fae\u8abf\u6574\u7528\u30c4\u30fc\u30eb</a></li>\n<li><a href=\"trainer.html\">\u30c8\u30ec\u30fc\u30ca\u30fc</a></li>\n<li><a href=\"text_dataset.html\">\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8</a></li></ul>\n",
"<h3>Balance layers</h3>\n<p>Split the <span translate=no>_^_0_^_</span> into <span translate=no>_^_1_^_</span>. This is used for pipeline parallel training.</p>\n<ul><li><span translate=no>_^_2_^_</span> is the number of layers </li>\n<li><span translate=no>_^_3_^_</span> is the number of chunks </li>\n<p><em>Returns</em> returns a list with the number of layers for each chunk</p></ul>\n": "<h3>\u30d0\u30e9\u30f3\u30b9\u30ec\u30a4\u30e4\u30fc</h3>\n<p>\u306b\u5206\u5272<span translate=no>_^_1_^_</span>. <span translate=no>_^_0_^_</span>\u3053\u308c\u306f\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u4e26\u5217\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002</p>\n<ul><li><span translate=no>_^_2_^_</span>\u306f\u30ec\u30a4\u30e4\u30fc\u306e\u6570</li>\n<li><span translate=no>_^_3_^_</span>\u306f\u30c1\u30e3\u30f3\u30af\u306e\u6570</li>\n<p>Returns \u306f\u3001<em>\u5404\u30c1\u30e3\u30f3\u30af\u306e\u30ec\u30a4\u30e4\u30fc\u6570\u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Get token ids</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the text to tokenize </li>\n<p><em>Returns</em> the token ids</p></ul>\n": "<h3>\u30c8\u30fc\u30af\u30f3 ID \u3092\u53d6\u5f97</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30c8\u30fc\u30af\u30f3\u5316\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u3067\u3059</li>\n<p>\u30c8\u30fc\u30af\u30f3 ID <em>\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Print tokens from model outputs</h3>\n<p>Pretty prints target tokens along side outputs from the model(s).</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the model(s) outputs</li></ul>\n": "<h3>\u30e2\u30c7\u30eb\u51fa\u529b\u304b\u3089\u30c8\u30fc\u30af\u30f3\u3092\u5370\u5237</h3>\n<p>Pretty \u306f\u3001\u30e2\u30c7\u30eb\u304b\u3089\u306e\u51fa\u529b\u3068\u4e00\u7dd2\u306b\u30bf\u30fc\u30b2\u30c3\u30c8\u30c8\u30fc\u30af\u30f3\u3092\u51fa\u529b\u3057\u307e\u3059\u3002</p>\n<ul><li><span translate=no>_^_0_^_</span>\u30bf\u30fc\u30b2\u30c3\u30c8\u30c8\u30fc\u30af\u30f3 ID</li>\n<li><span translate=no>_^_1_^_</span>\u306f\u30e2\u30c7\u30eb\u306e\u51fa\u529b\u3067\u3059</li></ul>\n",
"<h3>Print tokens</h3>\n<p>Pretty prints tokens for comparison</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the sampled outputs from the model(s)</li></ul>\n": "<h3>\u30c8\u30fc\u30af\u30f3\u306e\u5370\u5237</h3>\n<p>Pretty \u306f\u6bd4\u8f03\u7528\u306e\u30c8\u30fc\u30af\u30f3\u3092\u5370\u5237\u3057\u307e\u3059</p>\n<ul><li><span translate=no>_^_0_^_</span>\u30bf\u30fc\u30b2\u30c3\u30c8\u30c8\u30fc\u30af\u30f3 ID</li>\n<li><span translate=no>_^_1_^_</span>\u306f\u30e2\u30c7\u30eb\u304b\u3089\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3055\u308c\u305f\u51fa\u529b\u3067\u3059</li></ul>\n",
"<p>Convert the tokens to list of strings </p>\n": "<p>\u30c8\u30fc\u30af\u30f3\u3092\u6587\u5b57\u5217\u306e\u30ea\u30b9\u30c8\u306b\u5909\u63db</p>\n",
"<p>Empty target </p>\n": "<p>\u7a7a\u306e\u30bf\u30fc\u30b2\u30c3\u30c8</p>\n",
"<p>Iterate through tokens </p>\n": "<p>\u30c8\u30fc\u30af\u30f3\u3092\u7e70\u308a\u8fd4\u3057\u51e6\u7406</p>\n",
"<p>Load tokenizer </p>\n": "<p>\u30c8\u30fc\u30af\u30ca\u30a4\u30b6\u30fc\u3092\u30ed\u30fc\u30c9</p>\n",
"<p>Number of tokens </p>\n": "<p>\u30c8\u30fc\u30af\u30f3\u306e\u6570</p>\n",
"<p>Other outputs </p>\n": "<p>\u305d\u306e\u4ed6\u306e\u51fa\u529b</p>\n",
"<p>Stats </p>\n": "<p>\u7d71\u8a08\u60c5\u5831</p>\n",
"<p>Tokenizer singleton </p>\n": "<p>\u30c8\u30fc\u30af\u30ca\u30a4\u30b6\u30fc\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3</p>\n",
"Utilities and Helpers": "\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3068\u30d8\u30eb\u30d1\u30fc",
"Utilities and helper functions": "\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3068\u30d8\u30eb\u30d1\u30fc\u95a2\u6570"
}
@@ -0,0 +1,17 @@
{
"<h1>Utilities and Helpers</h1>\n<ul><li><a href=\"cache.html\">Cache for intermediate activations (for faster inference)</a> </li>\n<li><a href=\"finetune.html\">Tools for finetuning</a> </li>\n<li><a href=\"trainer.html\">Trainer</a> </li>\n<li><a href=\"text_dataset.html\">Text dataset</a></li></ul>\n": "<h1>\u0d8b\u0db4\u0dba\u0ddd\u0d9c\u0dd2\u0dad\u0dcf\u0dc3\u0dc4 \u0d8b\u0daf\u0dc0\u0dca\u0d9a\u0dbb\u0dd4\u0dc0\u0db1\u0dca</h1>\n<ul><li><a href=\"cache.html\">\u0d85\u0dad\u0dbb\u0db8\u0dd0\u0daf\u0dd2 \u0dc3\u0d9a\u0dca\u0dbb\u0dd2\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dca \u0dc3\u0db3\u0dc4\u0dcf \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba (\u0dc0\u0dda\u0d9c\u0dc0\u0dad\u0dca \u0d85\u0db1\u0dd4\u0db8\u0dcf\u0db1\u0dba \u0dc3\u0db3\u0dc4\u0dcf)</a> </li>\n<li><a href=\"finetune.html\">\u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf \u0db8\u0dd9\u0dc0\u0dbd\u0db8\u0dca</a> </li>\n<li><a href=\"trainer.html\">\u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4\u0d9a\u0dbb\u0dd4</a> </li>\n<li><a href=\"text_dataset.html\">\u0db4\u0dd9\u0dc5 \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd\u0dba</a></li></ul>\n",
"<h3>Balance layers</h3>\n<p>Split the <span translate=no>_^_0_^_</span> into <span translate=no>_^_1_^_</span>. This is used for pipeline parallel training.</p>\n<ul><li><span translate=no>_^_2_^_</span> is the number of layers </li>\n<li><span translate=no>_^_3_^_</span> is the number of chunks </li>\n<p><em>Returns</em> returns a list with the number of layers for each chunk</p></ul>\n": "<h3>\u0dc1\u0dda\u0dc2\u0dc3\u0dca\u0dae\u0dbb</h3>\n<p>\u0db6\u0dd9\u0daf\u0db1\u0dca\u0db1 <span translate=no>_^_1_^_</span>. <span translate=no>_^_0_^_</span> \u0db1\u0dbd \u0db8\u0dcf\u0dbb\u0dca\u0d9c \u0dc3\u0db8\u0dcf\u0db1\u0dca\u0dad\u0dbb \u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4\u0dc0 \u0dc3\u0db3\u0dc4\u0dcf \u0db8\u0dd9\u0dba \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dcf \u0dc0\u0dda. </p>\n<ul><li><span translate=no>_^_2_^_</span> \u0dc3\u0dca\u0dae\u0dbb \u0d9c\u0dab\u0db1 \u0dc0\u0dda </li>\n<li><span translate=no>_^_3_^_</span> \u0d9a\u0dd4\u0da7\u0dca\u0da7\u0dd2 \u0d9c\u0dab\u0db1 \u0dc0\u0dda </li>\n</ul><p><em>\u0db4\u0dca\u0dbb\u0dad\u0dd2\u0dbd\u0dcf\u0db7</em> \u0d91\u0d9a\u0dca \u0d91\u0d9a\u0dca \u0d9a\u0dd4\u0da7\u0dca\u0da7\u0dd2\u0dba \u0dc3\u0db3\u0dc4\u0dcf \u0dc3\u0dca\u0dae\u0dbb \u0d9c\u0dab\u0db1 \u0dc3\u0dc4\u0dd2\u0dad \u0dbd\u0dd0\u0dba\u0dd2\u0dc3\u0dca\u0dad\u0dd4\u0dc0\u0d9a\u0dca \u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</p>\n",
"<h3>Get token ids</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the text to tokenize </li>\n<p><em>Returns</em> the token ids</p></ul>\n": "<h3>\u0da7\u0ddd\u0d9a\u0db1\u0dca\u0dc4\u0dd0\u0db3\u0dd4\u0db1\u0dd4\u0db8\u0dca\u0db4\u0dad\u0dca \u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0da7\u0ddd\u0d9a\u0db1\u0dba\u0dd2\u0dc3\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda \u0db4\u0dcf text \u0dba \u0dc0\u0dda </li>\n<p>\u0da7\u0ddd\u0d9a\u0db1\u0dca\u0dc4\u0dd0\u0db3\u0dd4\u0db1\u0dd4\u0db8\u0dca\u0db4\u0dad\u0dca<em>\u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Print tokens from model outputs</h3>\n<p>Pretty prints target tokens along side outputs from the model(s).</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the model(s) outputs</li></ul>\n": "<h3>\u0d86\u0daf\u0dbb\u0dca\u0dc1\u0db1\u0dd2\u0db8\u0dd0\u0dc0\u0dd4\u0db8\u0dca \u0dc0\u0dbd\u0dd2\u0db1\u0dca \u0da7\u0ddd\u0d9a\u0db1 \u0db8\u0dd4\u0daf\u0dca\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<p>\u0dbd\u0dc3\u0dca\u0dc3\u0db1\u0db8\u0dd4\u0daf\u0dca\u0dbb\u0dab \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0d86\u0d9a\u0dd8\u0dad\u0dd2\u0dba\u0dda (\u0dba) \u0dc3\u0dd2\u0da7 \u0db4\u0dd0\u0dad\u0dd2 \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba\u0db1\u0dca \u0d94\u0dc3\u0dca\u0dc3\u0dda \u0da7\u0ddd\u0d9a\u0db1 \u0d89\u0dbd\u0d9a\u0dca\u0d9a \u0d9a\u0dbb\u0dba\u0dd2. </p>\n<ul><li><span translate=no>_^_0_^_</span> \u0d89\u0dbd\u0d9a\u0dca\u0d9a\u0d9c\u0dad \u0da7\u0ddd\u0d9a\u0db1\u0dca \u0dc4\u0dd0\u0db3\u0dd4\u0db1\u0dd4\u0db8\u0dca \u0dc0\u0dda </li>\n</ul><li><span translate=no>_^_1_^_</span> \u0d86\u0d9a\u0dd8\u0dad\u0dd2\u0dba (\u0dba) \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba\u0db1\u0dca \u0dc0\u0dda</li>\n",
"<h3>Print tokens</h3>\n<p>Pretty prints tokens for comparison</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the sampled outputs from the model(s)</li></ul>\n": "<h3>\u0da7\u0ddd\u0d9a\u0db1\u0db8\u0dd4\u0daf\u0dca\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<p>\u0dc3\u0d82\u0dc3\u0db1\u0dca\u0daf\u0db1\u0dba\u0dc3\u0db3\u0dc4\u0dcf \u0da7\u0ddd\u0d9a\u0db1 \u0db8\u0dd4\u0daf\u0dca\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1</p>\n<ul><li><span translate=no>_^_0_^_</span> \u0d89\u0dbd\u0d9a\u0dca\u0d9a\u0d9c\u0dad \u0da7\u0ddd\u0d9a\u0db1\u0dca \u0dc4\u0dd0\u0db3\u0dd4\u0db1\u0dd4\u0db8\u0dca \u0dc0\u0dda </li>\n<li><span translate=no>_^_1_^_</span> \u0d86\u0d9a\u0dd8\u0dad\u0dd2\u0dba\u0dd9\u0db1\u0dca \u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2 \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba\u0db1\u0dca (\u0dba)</li></ul>\n",
"<p>Convert the tokens to list of strings </p>\n": "<p>\u0da7\u0ddd\u0d9a\u0db1\u0db1\u0dd6\u0dbd\u0dca \u0dbd\u0dd0\u0dba\u0dd2\u0dc3\u0dca\u0dad\u0dd4\u0dc0\u0da7 \u0db4\u0dbb\u0dd2\u0dc0\u0dbb\u0dca\u0dad\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Empty target </p>\n": "<p>\u0dc4\u0dd2\u0dc3\u0dca\u0d89\u0dbd\u0d9a\u0dca\u0d9a\u0dba </p>\n",
"<p>Iterate through tokens </p>\n": "<p>\u0da7\u0ddd\u0d9a\u0db1\u0dc4\u0dbb\u0dc4\u0dcf \u0db1\u0dd0\u0dc0\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Load tokenizer </p>\n": "<p>\u0db6\u0dbb\u0da7\u0ddd\u0d9a\u0db1\u0dba\u0dd2\u0dc3\u0dbb\u0dca </p>\n",
"<p>Number of tokens </p>\n": "<p>\u0da7\u0ddd\u0d9a\u0db1\u0d9c\u0dab\u0db1 </p>\n",
"<p>Other outputs </p>\n": "<p>\u0dc0\u0dd9\u0db1\u0dad\u0dca\u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba\u0db1\u0dca </p>\n",
"<p>Stats </p>\n": "<p>\u0dc3\u0d82\u0d9b\u0dca\u0dba\u0dcf\u0db1 </p>\n",
"<p>Tokenizer singleton </p>\n": "<p>\u0da7\u0ddd\u0d9a\u0db1\u0dba\u0dd2\u0dc3\u0dbb\u0dca\u0dc3\u0dd2\u0d82\u0d9c\u0dbd\u0dca\u0da7\u0db1\u0dca </p>\n",
"Utilities and Helpers": "\u0d8b\u0db4\u0dba\u0ddd\u0d9c\u0dd2\u0dad\u0dcf \u0dc3\u0dc4 \u0d8b\u0daf\u0dc0\u0dca\u0d9a\u0dbb\u0dd4\u0dc0\u0db1\u0dca",
"Utilities and helper functions": "\u0d8b\u0db4\u0dba\u0ddd\u0d9c\u0dd2\u0dad\u0dcf \u0dc3\u0dc4 \u0d8b\u0db4\u0d9a\u0dcf\u0dbb\u0d9a \u0d9a\u0dcf\u0dbb\u0dca\u0dba\u0dba\u0db1\u0dca"
}
@@ -0,0 +1,17 @@
{
"<h1>Utilities and Helpers</h1>\n<ul><li><a href=\"cache.html\">Cache for intermediate activations (for faster inference)</a> </li>\n<li><a href=\"finetune.html\">Tools for finetuning</a> </li>\n<li><a href=\"trainer.html\">Trainer</a> </li>\n<li><a href=\"text_dataset.html\">Text dataset</a></li></ul>\n": "<h1>\u516c\u7528\u4e8b\u4e1a\u548c\u52a9\u624b</h1>\n<ul><li><a href=\"cache.html\">\u7f13\u5b58\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\uff08\u7528\u4e8e\u66f4\u5feb\u7684\u63a8\u7406\uff09</a></li>\n<li><a href=\"finetune.html\">\u5fae\u8c03\u5de5\u5177</a></li>\n<li><a href=\"trainer.html\">\u8bad\u7ec3\u5e08</a></li>\n<li><a href=\"text_dataset.html\">\u6587\u672c\u6570\u636e\u96c6</a></li></ul>\n",
"<h3>Balance layers</h3>\n<p>Split the <span translate=no>_^_0_^_</span> into <span translate=no>_^_1_^_</span>. This is used for pipeline parallel training.</p>\n<ul><li><span translate=no>_^_2_^_</span> is the number of layers </li>\n<li><span translate=no>_^_3_^_</span> is the number of chunks </li>\n<p><em>Returns</em> returns a list with the number of layers for each chunk</p></ul>\n": "<h3>\u5e73\u8861\u56fe\u5c42</h3>\n<p>\u62c6\u5206<span translate=no>_^_0_^_</span>\u6210<span translate=no>_^_1_^_</span>\u3002\u8fd9\u7528\u4e8e\u7ba1\u9053\u5e76\u884c\u8bad\u7ec3\u3002</p>\n<ul><li><span translate=no>_^_2_^_</span>\u662f\u5c42\u6570</li>\n<li><span translate=no>_^_3_^_</span>\u662f\u533a\u5757\u7684\u6570\u91cf</li>\n<p><em>\u8fd4\u56de</em>\u4e00\u4e2a\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u6bcf\u4e2a\u533a\u5757\u7684\u5c42\u6570</p></ul>\n",
"<h3>Get token ids</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the text to tokenize </li>\n<p><em>Returns</em> the token ids</p></ul>\n": "<h3>\u83b7\u53d6\u4ee3\u5e01 ID</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u8981\u6807\u8bb0\u7684\u6587\u672c</li>\n<p><em>\u8fd4\u56de</em>\u4ee4\u724c ID</p></ul>\n",
"<h3>Print tokens from model outputs</h3>\n<p>Pretty prints target tokens along side outputs from the model(s).</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the model(s) outputs</li></ul>\n": "<h3>\u4ece\u6a21\u578b\u8f93\u51fa\u4e2d\u6253\u5370\u4ee4\u724c</h3>\nP@@ <p>retty \u6cbf\u7740\u6a21\u578b\u7684\u4fa7\u9762\u8f93\u51fa\u6253\u5370\u76ee\u6807\u4ee4\u724c\u3002</p>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u76ee\u6807\u4ee3\u5e01 ID</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u6a21\u578b\u7684\u8f93\u51fa</li></ul>\n",
"<h3>Print tokens</h3>\n<p>Pretty prints tokens for comparison</p>\n<ul><li><span translate=no>_^_0_^_</span> are the target token ids </li>\n<li><span translate=no>_^_1_^_</span> are the sampled outputs from the model(s)</li></ul>\n": "<h3>\u6253\u5370\u4ee3\u5e01</h3>\n<p>Pretty \u6253\u5370\u4ee4\u724c\u8fdb\u884c\u6bd4\u8f83</p>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u76ee\u6807\u4ee3\u5e01 ID</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u6765\u81ea\u6a21\u578b\u7684\u91c7\u6837\u8f93\u51fa</li></ul>\n",
"<p>Convert the tokens to list of strings </p>\n": "<p>\u5c06\u6807\u8bb0\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u5217\u8868</p>\n",
"<p>Empty target </p>\n": "<p>\u7a7a\u76ee\u6807</p>\n",
"<p>Iterate through tokens </p>\n": "<p>\u904d\u5386\u4ee4\u724c</p>\n",
"<p>Load tokenizer </p>\n": "<p>\u52a0\u8f7d\u5206\u8bcd\u5668</p>\n",
"<p>Number of tokens </p>\n": "<p>\u4ee3\u5e01\u6570\u91cf</p>\n",
"<p>Other outputs </p>\n": "<p>\u5176\u4ed6\u8f93\u51fa</p>\n",
"<p>Stats </p>\n": "<p>\u7edf\u8ba1\u6570\u636e</p>\n",
"<p>Tokenizer singleton </p>\n": "<p>\u5206\u8bcd\u5668\u5355\u4f8b</p>\n",
"Utilities and Helpers": "\u516c\u7528\u4e8b\u4e1a\u548c\u52a9\u624b",
"Utilities and helper functions": "\u5b9e\u7528\u7a0b\u5e8f\u548c\u8f85\u52a9\u51fd\u6570"
}
+17
View File
@@ -0,0 +1,17 @@
{
"<h1>Cache for Intermediate Activations</h1>\n<p>During inference the model outputs token by token. We use this simple cache to store key&#x27;s and value&#x27;s attention layers, so that we don&#x27;t have to recompute them for previous tokens.</p>\n": "<h1>\u4e2d\u9593\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u7528\u30ad\u30e3\u30c3\u30b7\u30e5</h1>\n<p>\u63a8\u8ad6\u4e2d\u3001\u30e2\u30c7\u30eb\u306f\u30c8\u30fc\u30af\u30f3\u3054\u3068\u306b\u51fa\u529b\u3057\u307e\u3059\u3002\u3053\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u3063\u3066\u30ad\u30fc\u3068\u5024\u306e\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc\u3092\u683c\u7d0d\u3059\u308b\u306e\u3067\u3001\u4ee5\u524d\u306e\u30c8\u30fc\u30af\u30f3\u3067\u305d\u308c\u3089\u3092\u518d\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093</p>\u3002\n",
"<h2>Cache</h2>\n<p>This maintains a key-value cache and queues push values and pop them in the same order. The queues are useful since we have multiple attention layers.</p>\n": "<h2>\u30ad\u30e3\u30c3\u30b7\u30e5</h2>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30ad\u30fc\u3068\u5024\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7dad\u6301\u3055\u308c\u3001\u5024\u306e\u30d7\u30c3\u30b7\u30e5\u3068\u30dd\u30c3\u30d7\u304c\u540c\u3058\u9806\u5e8f\u3067\u30ad\u30e5\u30fc\u306b\u5165\u308c\u3089\u308c\u307e\u3059\u3002\u30ad\u30e5\u30fc\u306f\u8907\u6570\u306e\u30a2\u30c6\u30f3\u30b7\u30e7\u30f3\u30ec\u30a4\u30e4\u30fc\u304c\u3042\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059</p>\u3002\n",
"<h3>Cache a value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the value to be cached </li>\n<li><span translate=no>_^_1_^_</span> is the value</li></ul>\n": "<h3>\u5024\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u308b\u5024\u306e\u540d\u524d</li>\n<li><span translate=no>_^_1_^_</span>\u306f\u5024\u3067\u3059</li></ul>\n",
"<h3>Clear a cache value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching</li></ul>\n": "<h3>\u30ad\u30e3\u30c3\u30b7\u30e5\u5024\u3092\u30af\u30ea\u30a2\u3059\u308b</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30ad\u30e3\u30c3\u30b7\u30e5\u6642\u306b\u4f7f\u7528\u3055\u308c\u308b\u540d\u524d\u3067\u3059</li></ul>\n",
"<h3>Clear cache</h3>\n": "<h3>\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30af\u30ea\u30a2</h3>\n",
"<h3>Get the cache instance</h3>\n<ul><p><em>Returns</em> the cache instance</p></ul>\n": "<h3>\u30ad\u30e3\u30c3\u30b7\u30e5\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u53d6\u5f97</h3>\n<ul><p><em>\u30ad\u30e3\u30c3\u30b7\u30e5\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Pop from a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> the value</p></ul>\n": "<h3>\u30ad\u30e5\u30fc\u304b\u3089\u30dd\u30c3\u30d7\u3059\u308b</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u306f\u30ad\u30e5\u30fc\u306e\u540d\u524d\u3067\u3059</li>\n<p><em>\u5024\u3092\u8fd4\u3059</em></p></ul>\n",
"<h3>Push a value to a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<li><span translate=no>_^_1_^_</span> is the value to be pushed</li></ul>\n": "<h3>\u5024\u3092\u30ad\u30e5\u30fc\u306b\u30d7\u30c3\u30b7\u30e5</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u306f\u30ad\u30e5\u30fc\u306e\u540d\u524d\u3067\u3059</li>\n<li><span translate=no>_^_1_^_</span>\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u3067\u3059</li></ul>\n",
"<h3>Retrieve a value from cache</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching </li>\n<li><span translate=no>_^_1_^_</span> is the default value if the cache is empty </li>\n<p><em>Returns</em> the cached value</p></ul>\n": "<h3>\u30ad\u30e3\u30c3\u30b7\u30e5\u304b\u3089\u5024\u3092\u53d6\u5f97</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30ad\u30e3\u30c3\u30b7\u30e5\u6642\u306b\u4f7f\u7528\u3055\u308c\u308b\u540d\u524d\u3067\u3059</li>\n<li><span translate=no>_^_1_^_</span>\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7a7a\u306e\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3059</li>\n<p><em>\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u5024\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Return the size of the queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> size of the queue if exists else None</p></ul>\n": "<h3>\u30ad\u30e5\u30fc\u306e\u30b5\u30a4\u30ba\u3092\u8fd4\u3059</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u306f\u30ad\u30e5\u30fc\u306e\u540d\u524d\u3067\u3059</li>\n<p><em>\u30ad\u30e5\u30fc\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u30ad\u30e5\u30fc\u306e\u30b5\u30a4\u30ba\u3092\u8fd4\u3057\u307e\u3059</em>\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306f None</p></ul>\n",
"<p>Create an empty queue if it&#x27;s not present </p>\n": "<p>\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u7a7a\u306e\u30ad\u30e5\u30fc\u3092\u4f5c\u6210</p>\n",
"<p>Push to the queue </p>\n": "<p>\u30ad\u30e5\u30fc\u306b\u30d7\u30c3\u30b7\u30e5</p>\n",
"<p>Singleton for cache </p>\n": "<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3</p>\n",
"Cache for Intermediate Activations": "\u4e2d\u9593\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u7528\u30ad\u30e3\u30c3\u30b7\u30e5",
"Cache for intermediate activations for faster inference.": "\u63a8\u8ad6\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306e\u4e2d\u9593\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3002"
}
+17
View File
@@ -0,0 +1,17 @@
{
"<h1>Cache for Intermediate Activations</h1>\n<p>During inference the model outputs token by token. We use this simple cache to store key&#x27;s and value&#x27;s attention layers, so that we don&#x27;t have to recompute them for previous tokens.</p>\n": "<h1>\u0d85\u0dad\u0dbb\u0db8\u0dd0\u0daf\u0dd2\u0dc3\u0d9a\u0dca\u0dbb\u0dd3\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dca \u0dc3\u0db3\u0dc4\u0dcf \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba</h1>\n<p>\u0d85\u0db1\u0dd4\u0db8\u0dcf\u0db1\u0dba\u0d85\u0dad\u0dbb\u0dad\u0dd4\u0dbb \u0d86\u0daf\u0dbb\u0dca\u0dc1 \u0da7\u0ddd\u0d9a\u0db1\u0dba \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0da7\u0ddd\u0d9a\u0db1\u0dba \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba \u0d9a\u0dbb\u0dba\u0dd2. \u0dba\u0dad\u0dd4\u0dbb\u0dda \u0dc3\u0dc4 \u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0dda \u0d85\u0dc0\u0db0\u0dcf\u0db1\u0dba \u0dc3\u0dca\u0dae\u0dbb \u0d9c\u0db6\u0da9\u0dcf \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf \u0d85\u0db4\u0dd2 \u0db8\u0dd9\u0db8 \u0dc3\u0dbb\u0dbd \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dcf \u0d9a\u0dbb\u0db8\u0dd4, \u0d91\u0dc0\u0dd2\u0da7 \u0db4\u0dd9\u0dbb \u0da7\u0ddd\u0d9a\u0db1 \u0dc3\u0db3\u0dc4\u0dcf \u0d92\u0dc0\u0dcf \u0db1\u0dd0\u0dc0\u0dad \u0d9c\u0dab\u0db1\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0d85\u0db4\u0da7 \u0d85\u0dc0\u0dc1\u0dca\u0dba \u0db1\u0ddc\u0dc0\u0dda. </p>\n",
"<h2>Cache</h2>\n<p>This maintains a key-value cache and queues push values and pop them in the same order. The queues are useful since we have multiple attention layers.</p>\n": "<h2>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba</h2>\n<p>\u0db8\u0dd9\u0dba\u0db4\u0dca\u0dbb\u0db0\u0dcf\u0db1 \u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0d9a\u0dca \u0dc3\u0dc4\u0dd2\u0dad \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba\u0d9a\u0dca \u0db4\u0dc0\u0dad\u0dca\u0dc0\u0dcf \u0d9c\u0dd9\u0db1 \u0dba\u0db1 \u0d85\u0dad\u0dbb \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dca \u0d85\u0d9c\u0dba\u0db1\u0dca \u0dad\u0dbd\u0dca\u0dbd\u0dd4 \u0d9a\u0dbb \u0d92\u0dc0\u0dcf \u0d91\u0d9a\u0db8 \u0d85\u0db1\u0dd4\u0db4\u0dd2\u0dc5\u0dd2\u0dc0\u0dd9\u0dbd\u0d9a\u0da7 \u0db4\u0ddc\u0db4\u0dca \u0d9a\u0dbb\u0dba\u0dd2. \u0d85\u0db4\u0da7 \u0db6\u0dc4\u0dd4 \u0d85\u0dc0\u0db0\u0dcf\u0db1\u0dba \u0dc3\u0dca\u0dae\u0dbb \u0d87\u0dad\u0dd2 \u0db6\u0dd0\u0dc0\u0dd2\u0db1\u0dca \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dca \u0db4\u0dca\u0dbb\u0dba\u0ddd\u0da2\u0db1\u0dc0\u0dad\u0dca \u0dc0\u0dda. </p>\n",
"<h3>Cache a value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the value to be cached </li>\n<li><span translate=no>_^_1_^_</span> is the value</li></ul>\n": "<h3>\u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0d9a\u0dca\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2 \u0d9a\u0dc5 \u0dba\u0dd4\u0dad\u0dd4 \u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0dda \u0db1\u0db8\u0dba\u0dd2 </li>\n<li><span translate=no>_^_1_^_</span> \u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8 \u0dc0\u0dda</li></ul>\n",
"<h3>Clear a cache value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching</li></ul>\n": "<h3>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0d85\u0d9c\u0dba \u0d89\u0dc0\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda\u0daf\u0dd3 \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dcf \u0d9a\u0dbb\u0db1 \u0db1\u0db8\u0dba\u0dd2</li></ul>\n",
"<h3>Clear cache</h3>\n": "<h3>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba\u0d89\u0dc0\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n",
"<h3>Get the cache instance</h3>\n<ul><p><em>Returns</em> the cache instance</p></ul>\n": "<h3>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0d8b\u0daf\u0dcf\u0dc4\u0dbb\u0dab\u0dba\u0d9a\u0dca \u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1</h3>\n<ul><p>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0d85\u0dc0\u0dc3\u0dca\u0dae\u0dcf\u0dc0<em>\u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Pop from a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> the value</p></ul>\n": "<h3>\u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda\u0dc3\u0dd2\u0da7 \u0db4\u0ddc\u0db4\u0dca</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda \u0db1\u0db8 </li>\n<p>\u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8<em>\u0db1\u0dd0\u0dc0\u0dad \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Push a value to a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<li><span translate=no>_^_1_^_</span> is the value to be pushed</li></ul>\n": "<h3>\u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0d9a\u0da7\u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0d9a\u0dca \u0dad\u0dbd\u0dca\u0dbd\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda \u0db1\u0db8 </li>\n<li><span translate=no>_^_1_^_</span> \u0dad\u0dbd\u0dca\u0dbd\u0dd4 \u0d9a\u0dc5 \u0dba\u0dd4\u0dad\u0dd4 \u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8 \u0dc0\u0dda</li></ul>\n",
"<h3>Retrieve a value from cache</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching </li>\n<li><span translate=no>_^_1_^_</span> is the default value if the cache is empty </li>\n<p><em>Returns</em> the cached value</p></ul>\n": "<h3>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dc0\u0dbd\u0dd2\u0db1\u0dca\u0dc0\u0da7\u0dd2\u0db1\u0dcf\u0d9a\u0db8\u0d9a\u0dca \u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda\u0daf\u0dd3 \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dcf \u0d9a\u0dbb\u0db1 \u0db1\u0db8\u0dba\u0dd2 </li>\n<li><span translate=no>_^_1_^_</span> \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba \u0dc4\u0dd2\u0dc3\u0dca \u0db1\u0db8\u0dca \u0db4\u0dd9\u0dbb\u0db1\u0dd2\u0db8\u0dd2 \u0d85\u0d9c\u0dba \u0dc0\u0dda </li>\n<p>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0d85\u0d9c\u0dba<em>\u0db1\u0dd0\u0dc0\u0dad \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Return the size of the queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> size of the queue if exists else None</p></ul>\n": "<h3>\u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda\u0db4\u0dca\u0dbb\u0db8\u0dcf\u0dab\u0dba \u0d86\u0db4\u0dc3\u0dd4 \u0daf\u0dd9\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda \u0db1\u0db8 </li>\n</ul><p>\u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0dda<em>\u0db4\u0dca\u0dbb\u0dad\u0dd2\u0dbd\u0dcf\u0db7</em> \u0db4\u0dca\u0dbb\u0db8\u0dcf\u0dab\u0dba \u0dc0\u0dd9\u0db1\u0dad\u0dca \u0d9a\u0dd2\u0dc3\u0dd2\u0dc0\u0d9a\u0dca \u0dad\u0dd2\u0db6\u0dda \u0db1\u0db8\u0dca \u0db1\u0dd0\u0dad</p>\n",
"<p>Create an empty queue if it&#x27;s not present </p>\n": "<p>\u0d91\u0dba\u0db1\u0ddc\u0db8\u0dd0\u0dad\u0dd2 \u0db1\u0db8\u0dca \u0dc4\u0dd2\u0dc3\u0dca \u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0d9a\u0dca \u0dc3\u0dcf\u0daf\u0db1\u0dca\u0db1 </p>\n",
"<p>Push to the queue </p>\n": "<p>\u0db4\u0ddd\u0dbd\u0dd2\u0db8\u0da7\u0dad\u0dbd\u0dca\u0dbd\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Singleton for cache </p>\n": "<p>\u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dc3\u0db3\u0dc4\u0dcf \u0dc3\u0dd2\u0d82\u0d9c\u0dbd\u0dca\u0da7\u0db1\u0dca </p>\n",
"Cache for Intermediate Activations": "\u0d85\u0dad\u0dbb\u0db8\u0dd0\u0daf\u0dd2 \u0dc3\u0d9a\u0dca\u0dbb\u0dd3\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dca \u0dc3\u0db3\u0dc4\u0dcf \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2\u0dba",
"Cache for intermediate activations for faster inference.": "\u0dc0\u0dda\u0d9c\u0dc0\u0dad\u0dca \u0d85\u0db1\u0dd4\u0db8\u0dcf\u0db1\u0dba \u0dc3\u0db3\u0dc4\u0dcf \u0d85\u0dad\u0dbb\u0db8\u0dd0\u0daf\u0dd2 \u0dc3\u0d9a\u0dca\u0dbb\u0dd3\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dca \u0dc3\u0db3\u0dc4\u0dcf \u0dc4\u0dd0\u0db9\u0dd2\u0dbd\u0dd2."
}
+17
View File
@@ -0,0 +1,17 @@
{
"<h1>Cache for Intermediate Activations</h1>\n<p>During inference the model outputs token by token. We use this simple cache to store key&#x27;s and value&#x27;s attention layers, so that we don&#x27;t have to recompute them for previous tokens.</p>\n": "<h1>\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\u7684\u7f13\u5b58</h1>\n<p>\u5728\u63a8\u7406\u8fc7\u7a0b\u4e2d\uff0c\u6a21\u578b\u9010\u4e2a\u8f93\u51fa\u4ee4\u724c\u3002\u6211\u4eec\u4f7f\u7528\u8fd9\u4e2a\u7b80\u5355\u7684\u7f13\u5b58\u6765\u5b58\u50a8\u952e\u548c\u503c\u7684\u6ce8\u610f\u5c42\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u4e0d\u5fc5\u4e3a\u4ee5\u524d\u7684\u4ee4\u724c\u91cd\u65b0\u8ba1\u7b97\u5b83\u4eec\u4e86\u3002</p>\n",
"<h2>Cache</h2>\n<p>This maintains a key-value cache and queues push values and pop them in the same order. The queues are useful since we have multiple attention layers.</p>\n": "<h2>\u7f13\u5b58</h2>\n<p>\u8fd9\u5c06\u7ef4\u62a4\u4e00\u4e2a\u952e\u503c\u7f13\u5b58\uff0c\u5e76\u5c06\u63a8\u9001\u503c\u6392\u961f\u5e76\u6309\u76f8\u540c\u7684\u987a\u5e8f\u5f39\u51fa\u5b83\u4eec\u3002\u961f\u5217\u975e\u5e38\u6709\u7528\uff0c\u56e0\u4e3a\u6211\u4eec\u6709\u591a\u4e2a\u5173\u6ce8\u5c42\u3002</p>\n",
"<h3>Cache a value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the value to be cached </li>\n<li><span translate=no>_^_1_^_</span> is the value</li></ul>\n": "<h3>\u7f13\u5b58\u4e00\u4e2a\u503c</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u8981\u7f13\u5b58\u7684\u503c\u7684\u540d\u79f0</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u4ef7\u503c</li></ul>\n",
"<h3>Clear a cache value</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching</li></ul>\n": "<h3>\u6e05\u9664\u7f13\u5b58\u503c</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u7f13\u5b58\u65f6\u4f7f\u7528\u7684\u540d\u79f0</li></ul>\n",
"<h3>Clear cache</h3>\n": "<h3>\u6e05\u9664\u7f13\u5b58</h3>\n",
"<h3>Get the cache instance</h3>\n<ul><p><em>Returns</em> the cache instance</p></ul>\n": "<h3>\u83b7\u53d6\u7f13\u5b58\u5b9e\u4f8b</h3>\n<ul><p><em>\u8fd4\u56de</em>\u7f13\u5b58\u5b9e\u4f8b</p></ul>\n",
"<h3>Pop from a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> the value</p></ul>\n": "<h3>\u4ece\u961f\u5217\u4e2d\u5f39\u51fa</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u961f\u5217\u7684\u540d\u79f0</li>\n<p><em>\u8fd4\u56de</em>\u503c</p></ul>\n",
"<h3>Push a value to a queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<li><span translate=no>_^_1_^_</span> is the value to be pushed</li></ul>\n": "<h3>\u5c06\u503c\u63a8\u9001\u5230\u961f\u5217</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u961f\u5217\u7684\u540d\u79f0</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u8981\u63a8\u9001\u7684\u503c</li></ul>\n",
"<h3>Retrieve a value from cache</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name used when caching </li>\n<li><span translate=no>_^_1_^_</span> is the default value if the cache is empty </li>\n<p><em>Returns</em> the cached value</p></ul>\n": "<h3>\u4ece\u7f13\u5b58\u4e2d\u68c0\u7d22\u503c</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u7f13\u5b58\u65f6\u4f7f\u7528\u7684\u540d\u79f0</li>\n<li><span translate=no>_^_1_^_</span>\u5982\u679c\u7f13\u5b58\u4e3a\u7a7a\uff0c\u5219\u4e3a\u9ed8\u8ba4\u503c</li>\n<p><em>\u8fd4\u56de</em>\u7f13\u5b58\u7684\u503c</p></ul>\n",
"<h3>Return the size of the queue</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the name of the queue </li>\n<p><em>Returns</em> size of the queue if exists else None</p></ul>\n": "<h3>\u8fd4\u56de\u961f\u5217\u7684\u5927\u5c0f</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u961f\u5217\u7684\u540d\u79f0</li>\n<p><em>\u8fd4\u56de</em>\u961f\u5217\u7684\u5927\u5c0f\uff08\u5982\u679c\u5b58\u5728\uff09\u5426\u5219 None</p></ul>\n",
"<p>Create an empty queue if it&#x27;s not present </p>\n": "<p>\u5982\u679c\u961f\u5217\u4e0d\u5b58\u5728\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a\u7a7a\u961f\u5217</p>\n",
"<p>Push to the queue </p>\n": "<p>\u63a8\u9001\u5230\u961f\u5217</p>\n",
"<p>Singleton for cache </p>\n": "<p>\u7f13\u5b58\u7684\u5355\u4f8b</p>\n",
"Cache for Intermediate Activations": "\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\u7684\u7f13\u5b58",
"Cache for intermediate activations for faster inference.": "\u7f13\u5b58\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\uff0c\u4ee5\u4fbf\u66f4\u5feb\u5730\u63a8\u65ad\u3002"
}
@@ -0,0 +1,6 @@
{
"<p> </p>\n": "<p></p>\n",
"<p>No need to train the mlp bias because we are adding it with attention output </p>\n": "<p>\u6ce8\u610f\u51fa\u529b\u3067\u52a0\u7b97\u3059\u308b\u306e\u3067\u3001mlp\u30d0\u30a4\u30a2\u30b9\u3092\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002</p>\n",
"<p>Set <span translate=no>_^_0_^_</span> to <span translate=no>_^_1_^_</span> for the entire layer. </p>\n": "<p><span translate=no>_^_0_^_</span><span translate=no>_^_1_^_</span>\u30ec\u30a4\u30e4\u30fc\u5168\u4f53\u3067\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002</p>\n",
"finetune.py": "finetune.py"
}
@@ -0,0 +1,6 @@
{
"<p> </p>\n": "<p> </p>\n",
"<p>No need to train the mlp bias because we are adding it with attention output </p>\n": "<p>mlp\u0db1\u0dd0\u0db9\u0dd4\u0dbb\u0dd4\u0dc0 \u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0d85\u0dc0\u0dc1\u0dca\u0dba \u0db1\u0ddc\u0dc0\u0dda, \u0db8\u0db1\u0dca\u0daf \u0d85\u0db4\u0dd2 \u0d91\u0dba \u0d85\u0dc0\u0db0\u0dcf\u0db1\u0dba \u0dba\u0ddc\u0db8\u0dd4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba \u0dc3\u0db8\u0d9f \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1 \u0db6\u0dd0\u0dc0\u0dd2\u0db1\u0dd2 </p>\n",
"<p>Set <span translate=no>_^_0_^_</span> to <span translate=no>_^_1_^_</span> for the entire layer. </p>\n": "<p>\u0dc3\u0db8\u0dca\u0db4\u0dd6\u0dbb\u0dca\u0dab\u0dc3\u0dca\u0dad\u0dbb\u0dba <span translate=no>_^_0_^_</span> <span translate=no>_^_1_^_</span> \u0dc3\u0db3\u0dc4\u0dcf \u0dc3\u0d9a\u0dc3\u0db1\u0dca\u0db1. </p>\n",
"finetune.py": "finetune.py"
}
@@ -0,0 +1,6 @@
{
"<p> </p>\n": "<p></p>\n",
"<p>No need to train the mlp bias because we are adding it with attention output </p>\n": "<p>\u4e0d\u9700\u8981\u8bad\u7ec3 mlp \u504f\u5dee\uff0c\u56e0\u4e3a\u6211\u4eec\u6dfb\u52a0\u4e86\u6ce8\u610f\u529b\u8f93\u51fa</p>\n",
"<p>Set <span translate=no>_^_0_^_</span> to <span translate=no>_^_1_^_</span> for the entire layer. </p>\n": "<p><span translate=no>_^_0_^_</span>\u5c06<span translate=no>_^_1_^_</span>\u6574\u4e2a\u56fe\u5c42\u8bbe\u7f6e\u4e3a\u3002</p>\n",
"finetune.py": "finetune.py"
}
@@ -0,0 +1,11 @@
{
"<h1>LLM.int() on GPT-NeoX</h1>\n<p>This implements a utility function to transform a <span translate=no>_^_0_^_</span> layer to LLM.int8() linear layer.</p>\n<p><a href=\"https://arxiv.org/abs/eb2bcaee1d0011edaa66a71c10a887e7\">LLM.int8() paper</a> shows you can use int8 quantization while handling outliers to reduce memory footprint without performance degradation in large language models. They convert weights and inputs to scaled 8-bit integers and does matrix multiplication producing int32 results which is then converted back to float16 and rescaled. They show that in large langauge models, some features can give extreme values (outliers) that dominate the model&#x27;s output. These features get clamped in 8-bit integer space which causes the model performance to degrade. As a solution they pick these outliers (greater than a specified threshold) and compute their multiplications separately in float16 space. Since the percentage of outliers is around 0.01% this doesn&#x27;t increase memory usage, and prevents the model from degrading performance.</p>\n<p>The code to transform GPT-NoeX layers is defined in <a href=\"../model.html#post_load_prepare\">model.py</a>.</p>\n<p>Here are example uses of GPT-NeoX with int8 quantization.</p>\n<ul><li><a href=\"../samples/llm_int8.html\">Generate Text</a> </li>\n<li><a href=\"../evaluation/llm_int8.html\">Run Evaluation Tests</a></li></ul>\n": "<h1>GPT \u30cd\u30aa\u30c3\u30af\u30b9\u306e llm.int ()</h1>\n<p>\u3053\u308c\u306f\u3001\u30ec\u30a4\u30e4\u30fc\u3092 llm.int8 () <span translate=no>_^_0_^_</span> \u7dda\u5f62\u30ec\u30a4\u30e4\u30fc\u306b\u5909\u63db\u3059\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002</p>\n<p><a href=\"https://arxiv.org/abs/eb2bcaee1d0011edaa66a71c10a887e7\">LLM.int8 () \u306e\u8ad6\u6587\u3067\u306f</a>\u3001\u5927\u898f\u6a21\u306a\u8a00\u8a9e\u30e2\u30c7\u30eb\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u3053\u3068\u306a\u304f\u3001\u5916\u308c\u5024\u3092\u51e6\u7406\u3059\u308b\u969b\u306b int8 \u91cf\u5b50\u5316\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3067\u304d\u308b\u3053\u3068\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u91cd\u307f\u3068\u5165\u529b\u3092\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u305f8\u30d3\u30c3\u30c8\u6574\u6570\u306b\u5909\u63db\u3057\u3001\u884c\u5217\u4e57\u7b97\u3092\u884c\u3063\u3066int32\u306e\u7d50\u679c\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092float16\u306b\u5909\u63db\u3057\u3066\u518d\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u3057\u307e\u3059\u3002\u305d\u306e\u7d50\u679c\u3001\u5927\u898f\u6a21\u306a\u8a00\u8a9e\u30e2\u30c7\u30eb\u3067\u306f\u3001\u4e00\u90e8\u306e\u7279\u5fb4\u306b\u3088\u3063\u3066\u6975\u7aef\u306a\u5024 (\u5916\u308c\u5024) \u304c\u30e2\u30c7\u30eb\u306e\u51fa\u529b\u306e\u5927\u90e8\u5206\u3092\u5360\u3081\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u6a5f\u80fd\u306f8\u30d3\u30c3\u30c8\u306e\u6574\u6570\u7a7a\u9593\u306b\u5236\u9650\u3055\u308c\u308b\u305f\u3081\u3001\u30e2\u30c7\u30eb\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4f4e\u4e0b\u3057\u307e\u3059\u3002\u89e3\u6c7a\u7b56\u3068\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u5916\u308c\u5024\uff08\u6307\u5b9a\u3055\u308c\u305f\u3057\u304d\u3044\u5024\u3092\u8d85\u3048\u308b\uff09\u3092\u9078\u629e\u3057\u3001\u305d\u306e\u4e57\u7b97\u3092float16\u7a7a\u9593\u3067\u500b\u5225\u306b\u8a08\u7b97\u3057\u307e\u3059\u3002\u5916\u308c\u5024\u306e\u5272\u5408\u306f\u7d04 0.01% \u306a\u306e\u3067\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306f\u5897\u52a0\u305b\u305a\u3001\u30e2\u30c7\u30eb\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u4f4e\u4e0b\u3092\u9632\u304e\u307e\u3059</p>\u3002\n<p><a href=\"../model.html#post_load_prepare\">GPT-NoEx \u30ec\u30a4\u30e4\u30fc\u3092\u5909\u63db\u3059\u308b\u30b3\u30fc\u30c9\u306f model.py \u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002</a></p>\n<p>int8 \u91cf\u5b50\u5316\u306b\u3088\u308b GPT-Neox \u306e\u4f7f\u7528\u4f8b\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002</p>\n<ul><li><a href=\"../samples/llm_int8.html\">\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210</a></li>\n<li><a href=\"../evaluation/llm_int8.html\">\u8a55\u4fa1\u30c6\u30b9\u30c8\u3092\u5b9f\u884c</a></li></ul>\n",
"<h2>Transform a <span translate=no>_^_0_^_</span> layer to LLM.int8() linear layer</h2>\n<ul><li><span translate=no>_^_1_^_</span> is the <span translate=no>_^_2_^_</span> layer to transform </li>\n<li><span translate=no>_^_3_^_</span> is the device of the model </li>\n<li><span translate=no>_^_4_^_</span> is the threshold <span translate=no>_^_5_^_</span> to use for outlier detection</li></ul>\n": "<h2><span translate=no>_^_0_^_</span>\u30ec\u30a4\u30e4\u30fc\u3092 llm.int8 () \u30ea\u30cb\u30a2\u30ec\u30a4\u30e4\u30fc\u306b\u5909\u63db\u3057\u307e\u3059</h2>\n<ul><li><span translate=no>_^_1_^_</span><span translate=no>_^_2_^_</span>\u5909\u63db\u3059\u308b\u30ec\u30a4\u30e4\u30fc\u3067\u3059</li>\n<li><span translate=no>_^_3_^_</span>\u30e2\u30c7\u30eb\u306e\u30c7\u30d0\u30a4\u30b9\u3067\u3059</li>\n<li><span translate=no>_^_4_^_</span><span translate=no>_^_5_^_</span>\u5916\u308c\u5024\u306e\u691c\u51fa\u306b\u4f7f\u7528\u3059\u308b\u95be\u5024\u3067\u3059</li></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Create an empty Linear8bitLt module </p>\n": "<p>\u7a7a\u306e Linear8BitLT \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002</p>\n",
"<p>Import <a href=\"https://github.com/timdettmers/bitsandbytes\"><span translate=no>_^_0_^_</span></a> package </p>\n": "<p><a href=\"https://github.com/timdettmers/bitsandbytes\"><span translate=no>_^_0_^_</span></a>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8</p>\n",
"<p>Quantize the weights </p>\n": "<p>\u30a6\u30a7\u30a4\u30c8\u3092\u30af\u30aa\u30f3\u30bf\u30a4\u30ba</p>\n",
"<p>Set the bias in float16 space </p>\n": "<p>float16 \u7a7a\u9593\u306b\u30d0\u30a4\u30a2\u30b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002</p>\n",
"LLM.int8() on GPT-NeoX": "GPT \u30cd\u30aa\u30c3\u30af\u30b9\u306e llm.int8 ()",
"Transform nn.Linear layers to 8-bit integer layers.": "nn.linear \u5c64\u3092 8 \u30d3\u30c3\u30c8\u306e\u6574\u6570\u5c64\u306b\u5909\u63db\u3057\u307e\u3059\u3002"
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
{
"<h1>LLM.int() on GPT-NeoX</h1>\n<p>This implements a utility function to transform a <span translate=no>_^_0_^_</span> layer to LLM.int8() linear layer.</p>\n<p><a href=\"https://arxiv.org/abs/eb2bcaee1d0011edaa66a71c10a887e7\">LLM.int8() paper</a> shows you can use int8 quantization while handling outliers to reduce memory footprint without performance degradation in large language models. They convert weights and inputs to scaled 8-bit integers and does matrix multiplication producing int32 results which is then converted back to float16 and rescaled. They show that in large langauge models, some features can give extreme values (outliers) that dominate the model&#x27;s output. These features get clamped in 8-bit integer space which causes the model performance to degrade. As a solution they pick these outliers (greater than a specified threshold) and compute their multiplications separately in float16 space. Since the percentage of outliers is around 0.01% this doesn&#x27;t increase memory usage, and prevents the model from degrading performance.</p>\n<p>The code to transform GPT-NoeX layers is defined in <a href=\"../model.html#post_load_prepare\">model.py</a>.</p>\n<p>Here are example uses of GPT-NeoX with int8 quantization.</p>\n<ul><li><a href=\"../samples/llm_int8.html\">Generate Text</a> </li>\n<li><a href=\"../evaluation/llm_int8.html\">Run Evaluation Tests</a></li></ul>\n": "<h1>GPT-NEOX \u4e0a\u7684 llm.int ()</h1>\n<p>\u8fd9\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\u51fd\u6570\uff0c\u5c06<span translate=no>_^_0_^_</span>\u5c42\u8f6c\u6362\u4e3a LLM.int8 () \u7ebf\u6027\u5c42\u3002</p>\n<p><a href=\"https://arxiv.org/abs/eb2bcaee1d0011edaa66a71c10a887e7\">LLM.int8 () \u8bba\u6587</a>\u5c55\u793a\u4e86\u5728\u5904\u7406\u5f02\u5e38\u503c\u65f6\u53ef\u4ee5\u4f7f\u7528 int8 \u91cf\u5316\u6765\u51cf\u5c11\u5185\u5b58\u5360\u7528\uff0c\u800c\u4e0d\u4f1a\u964d\u4f4e\u5927\u578b\u8bed\u8a00\u6a21\u578b\u7684\u6027\u80fd\u3002\u5b83\u4eec\u5c06\u6743\u91cd\u548c\u8f93\u5165\u8f6c\u6362\u4e3a\u6309\u6bd4\u4f8b\u7f29\u653e\u76848\u4f4d\u6574\u6570\uff0c\u5e76\u8fdb\u884c\u77e9\u9635\u4e58\u6cd5\u4ea7\u751fint32\u7ed3\u679c\uff0c\u7136\u540e\u5c06\u5176\u8f6c\u6362\u56defloat16\u5e76\u91cd\u65b0\u7f29\u653e\u3002\u5b83\u4eec\u8868\u660e\uff0c\u5728\u5927\u578b\u8bed\u8a00\u6a21\u578b\u4e2d\uff0c\u67d0\u4e9b\u7279\u5f81\u53ef\u4ee5\u7ed9\u51fa\u6781\u503c\uff08\u5f02\u5e38\u503c\uff09\uff0c\u8fd9\u4e9b\u503c\u5728\u6a21\u578b\u7684\u8f93\u51fa\u4e2d\u5360\u636e\u4e3b\u5bfc\u5730\u4f4d\u3002\u8fd9\u4e9b\u7279\u5f81\u88ab\u9650\u5236\u5728 8 \u4f4d\u6574\u6570\u7a7a\u95f4\u4e2d\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u6a21\u578b\u6027\u80fd\u4e0b\u964d\u3002\u4f5c\u4e3a\u89e3\u51b3\u65b9\u6848\uff0c\u4ed6\u4eec\u9009\u62e9\u8fd9\u4e9b\u5f02\u5e38\u503c\uff08\u5927\u4e8e\u6307\u5b9a\u9608\u503c\uff09\uff0c\u5e76\u5728float16\u7a7a\u95f4\u4e2d\u5206\u522b\u8ba1\u7b97\u5b83\u4eec\u7684\u4e58\u6cd5\u3002\u7531\u4e8e\u5f02\u5e38\u503c\u7684\u767e\u5206\u6bd4\u7ea6\u4e3a 0.01%\uff0c\u56e0\u6b64\u4e0d\u4f1a\u589e\u52a0\u5185\u5b58\u4f7f\u7528\u91cf\uff0c\u5e76\u9632\u6b62\u6a21\u578b\u964d\u4f4e\u6027\u80fd\u3002</p>\n<p>\u7528\u4e8e\u8f6c\u6362 GPT-NOEX \u5c42\u7684\u4ee3\u7801\u5728 <a href=\"../model.html#post_load_prepare\">model.py</a> \u4e2d\u5b9a\u4e49\u3002</p>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528 int8 \u91cf\u5316\u7684 GPT-NEOX \u7684\u793a\u4f8b\u7528\u6cd5\u3002</p>\n<ul><li><a href=\"../samples/llm_int8.html\">\u751f\u6210\u6587\u672c</a></li>\n<li><a href=\"../evaluation/llm_int8.html\">\u8fd0\u884c\u8bc4\u4f30\u6d4b\u8bd5</a></li></ul>\n",
"<h2>Transform a <span translate=no>_^_0_^_</span> layer to LLM.int8() linear layer</h2>\n<ul><li><span translate=no>_^_1_^_</span> is the <span translate=no>_^_2_^_</span> layer to transform </li>\n<li><span translate=no>_^_3_^_</span> is the device of the model </li>\n<li><span translate=no>_^_4_^_</span> is the threshold <span translate=no>_^_5_^_</span> to use for outlier detection</li></ul>\n": "<h2>\u5c06<span translate=no>_^_0_^_</span>\u56fe\u5c42\u8f6c\u6362\u4e3a LLM.int8 () \u7ebf\u6027\u56fe\u5c42</h2>\n<ul><li><span translate=no>_^_1_^_</span>\u662f\u8981\u53d8\u6362\u7684<span translate=no>_^_2_^_</span>\u56fe\u5c42</li>\n<li><span translate=no>_^_3_^_</span>\u662f\u8be5\u578b\u53f7\u7684\u8bbe\u5907</li>\n<li><span translate=no>_^_4_^_</span>\u662f\u7528\u4e8e\u5f02\u5e38\u503c\u68c0\u6d4b\u7684\u9608<span translate=no>_^_5_^_</span>\u503c</li></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Create an empty Linear8bitLt module </p>\n": "<p>\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684 Linear8bitLT \u6a21\u5757</p>\n",
"<p>Import <a href=\"https://github.com/timdettmers/bitsandbytes\"><span translate=no>_^_0_^_</span></a> package </p>\n": "<p>\u5bfc\u5165<a href=\"https://github.com/timdettmers/bitsandbytes\"><span translate=no>_^_0_^_</span></a>\u5305</p>\n",
"<p>Quantize the weights </p>\n": "<p>\u91cf\u5316\u6743\u91cd</p>\n",
"<p>Set the bias in float16 space </p>\n": "<p>\u5728 float16 \u7a7a\u95f4\u4e2d\u8bbe\u7f6e\u504f\u5dee</p>\n",
"LLM.int8() on GPT-NeoX": "GPT-NEOX \u4e0a\u7684 llm.int8 ()",
"Transform nn.Linear layers to 8-bit integer layers.": "\u5c06 NN. \u7ebf\u6027\u56fe\u5c42\u8f6c\u6362\u4e3a 8 \u4f4d\u6574\u6570\u56fe\u5c42\u3002"
}
@@ -0,0 +1,19 @@
{
"<h1>Text Dataset for GPT-NeoX</h1>\n": "<h1>GPT-Neox \u7528\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8</h1>\n",
"<h2>Dataset for fine-tuning GPT-NeoX</h2>\n<p>This is not optimized to very large datasets.</p>\n": "<h2>GPT-Neox \u3092\u5fae\u8abf\u6574\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8</h2>\n<p>\u3053\u308c\u306f\u975e\u5e38\u306b\u5927\u304d\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u6700\u9069\u5316\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002</p>\n",
"<h3>Get a sample</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the index of the sample </li>\n<p><em>Returns</em> the input and the target</p></ul>\n": "<h3>\u30b5\u30f3\u30d7\u30eb\u3092\u5165\u624b</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30b5\u30f3\u30d7\u30eb\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u3059</li>\n<p><em>\u5165\u529b\u3068\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Load Dataset</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the sequence length of a single training sample </li>\n<li><span translate=no>_^_1_^_</span> is the name of the dataset </li>\n<p><em>Returns</em> the dataset</p></ul>\n": "<h3>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u8aad\u307f\u8fbc\u307f</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u306f 1 \u3064\u306e\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30b5\u30f3\u30d7\u30eb\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u9577\u3067\u3059</li>\n<li><span translate=no>_^_1_^_</span>\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u540d\u524d</li>\n<p><em>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<h3>Load text file</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the location of the text file </li>\n<li><span translate=no>_^_1_^_</span> is the URL to download the file from </li>\n<li><span translate=no>_^_2_^_</span> is the number of characters to filter. Use this during testing when trying large datasets </li>\n<p><em>Returns</em> the text content</p></ul>\n": "<h3>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3067\u3059</li>\n<li><span translate=no>_^_1_^_</span>\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b URL</li>\n<li><span translate=no>_^_2_^_</span>\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u6587\u5b57\u306e\u6570\u3067\u3059\u3002\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8a66\u3059\u3068\u304d\u306e\u30c6\u30b9\u30c8\u6642\u306b\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044</li>\n<p><em>\u30c6\u30ad\u30b9\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Create a PyTorch tensor </p>\n": "<p>PyTorch \u30c6\u30f3\u30bd\u30eb\u306e\u4f5c\u6210</p>\n",
"<p>Download if it doesn&#x27;t exist </p>\n": "<p>\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9</p>\n",
"<p>Filter </p>\n": "<p>\u30d5\u30a3\u30eb\u30bf</p>\n",
"<p>Load data </p>\n": "<p>\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080</p>\n",
"<p>Load the content </p>\n": "<p>\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8aad\u307f\u8fbc\u3080</p>\n",
"<p>Number of samples </p>\n": "<p>\u30b5\u30f3\u30d7\u30eb\u6570</p>\n",
"<p>Tokenize </p>\n": "<p>\u30c8\u30fc\u30af\u30f3\u5316</p>\n",
"<p>Truncate </p>\n": "<p>\u5207\u308a\u6368\u3066</p>\n",
"<ul><li><span translate=no>_^_0_^_</span> is the list of token ids </li>\n<li><span translate=no>_^_1_^_</span> is the sequence length of a single training sample</li></ul>\n": "<ul><li><span translate=no>_^_0_^_</span>\u30c8\u30fc\u30af\u30f3 ID \u306e\u30ea\u30b9\u30c8\u3067\u3059</li>\n<li><span translate=no>_^_1_^_</span>\u306f 1 \u3064\u306e\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30b5\u30f3\u30d7\u30eb\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u9577\u3067\u3059</li></ul>\n",
"Loads text datasets to fine-tune GPT-NeoX": "\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ed\u30fc\u30c9\u3057\u3066GPT-Neox\u3092\u5fae\u8abf\u6574\u3057\u307e\u3059",
"Text Dataset for GPT-NeoX": "GPT-Neox \u7528\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8"
}
@@ -0,0 +1,19 @@
{
"<h1>Text Dataset for GPT-NeoX</h1>\n": "<h1>\u0da2\u0dd3\u0db4\u0dd3\u0da7\u0dd3-\u0db1\u0dd2\u0dba\u0ddd\u0d9a\u0dca\u0dc3\u0dca\u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dd9\u0dc5 \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd\u0dba</h1>\n",
"<h2>Dataset for fine-tuning GPT-NeoX</h2>\n<p>This is not optimized to very large datasets.</p>\n": "<h2>\u0dc4\u0ddc\u0db3\u0dd2\u0db1\u0dca\u0dc3\u0dd4\u0dc3\u0dbb \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd\u0dba GPT-\u0db1\u0dd2\u0dba\u0ddd\u0d9a\u0dca\u0dc3\u0dca</h2>\n<p>\u0db8\u0dd9\u0dba\u0d89\u0dad\u0dcf \u0dc0\u0dd2\u0dc1\u0dcf\u0dbd \u0daf\u0dad\u0dca\u0dad \u0d9a\u0dcf\u0dab\u0dca\u0da9 \u0dc0\u0dbd\u0da7 \u0db4\u0dca\u0dbb\u0dc1\u0dc3\u0dca\u0dad\u0dd2\u0d9a\u0dbb\u0dab\u0dba \u0d9a\u0dbb \u0db1\u0ddc\u0db8\u0dd0\u0dad. </p>\n",
"<h3>Get a sample</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the index of the sample </li>\n<p><em>Returns</em> the input and the target</p></ul>\n": "<h3>\u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2\u0dba\u0d9a\u0dca\u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2\u0dba\u0dda \u0daf\u0dbb\u0dca\u0dc1\u0d9a\u0dba \u0dc0\u0dda </li>\n<p>\u0d86\u0daf\u0dcf\u0db1\u0dba\u0dc3\u0dc4 \u0d89\u0dbd\u0d9a\u0dca\u0d9a\u0dba<em>\u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Load Dataset</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the sequence length of a single training sample </li>\n<li><span translate=no>_^_1_^_</span> is the name of the dataset </li>\n<p><em>Returns</em> the dataset</p></ul>\n": "<h3>\u0daf\u0dad\u0dca\u0dad\u0d9a\u0da7\u0dca\u0da7\u0dbd\u0dba \u0db4\u0dd6\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0dad\u0db1\u0dd2 \u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4 \u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2\u0dba\u0d9a \u0d85\u0db1\u0dd4\u0d9a\u0dca\u0dbb\u0db8\u0dba \u0daf\u0dd2\u0d9c \u0dc0\u0dda </li>\n<li><span translate=no>_^_1_^_</span> \u0daf\u0dad\u0dca\u0dad \u0dc3\u0db8\u0dd4\u0daf\u0dcf\u0dba \u0db1\u0db8 </li>\n<p>\u0daf\u0dad\u0dca\u0dad\u0dc3\u0db8\u0dd4\u0daf\u0dcf\u0dba<em>\u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<h3>Load text file</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the location of the text file </li>\n<li><span translate=no>_^_1_^_</span> is the URL to download the file from </li>\n<li><span translate=no>_^_2_^_</span> is the number of characters to filter. Use this during testing when trying large datasets </li>\n<p><em>Returns</em> the text content</p></ul>\n": "<h3>\u0db4\u0dd9\u0dc5\u0d9c\u0ddc\u0db1\u0dd4\u0dc0 \u0db4\u0dd6\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db4\u0dd9\u0dc5 \u0d9c\u0ddc\u0db1\u0dd4\u0dc0\u0dda \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0dd3\u0db8 </li>\n<li><span translate=no>_^_1_^_</span> \u0d9c\u0ddc\u0db1\u0dd4\u0dc0 \u0db6\u0dcf\u0d9c\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf URL \u0d91\u0d9a </li>\n<li><span translate=no>_^_2_^_</span> \u0dba\u0db1\u0dd4 \u0db4\u0dd9\u0dbb\u0dd3\u0db8\u0da7 \u0d85\u0d9a\u0dca\u0dc2\u0dbb \u0d9c\u0dab\u0db1\u0dba\u0dba\u0dd2. \u0dc0\u0dd2\u0dc1\u0dcf\u0dbd \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd \u0d8b\u0dad\u0dca\u0dc3\u0dcf\u0dc4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda\u0daf\u0dd3 \u0db4\u0dbb\u0dd3\u0d9a\u0dca\u0dc2\u0dcf \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda\u0daf\u0dd3 \u0db8\u0dd9\u0dba \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dcf \u0d9a\u0dbb\u0db1\u0dca\u0db1 </li>\n<p>\u0db4\u0dd9\u0dc5\u0d85\u0db1\u0dca\u0dad\u0dbb\u0dca\u0d9c\u0dad\u0dba<em>\u0db1\u0dd0\u0dc0\u0dad \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"<p> </p>\n": "<p> </p>\n",
"<p>Create a PyTorch tensor </p>\n": "<p>\u0db4\u0dba\u0dd2\u0da7\u0ddd\u0da0\u0dca\u0da7\u0dd9\u0db1\u0dca\u0dc3\u0dbb\u0dba\u0d9a\u0dca \u0dc3\u0dcf\u0daf\u0db1\u0dca\u0db1 </p>\n",
"<p>Download if it doesn&#x27;t exist </p>\n": "<p>\u0d91\u0dba\u0db1\u0ddc\u0db8\u0dd0\u0dad\u0dd2 \u0db1\u0db8\u0dca \u0db6\u0dcf\u0d9c\u0db1\u0dca\u0db1 </p>\n",
"<p>Filter </p>\n": "<p>\u0db4\u0dd9\u0dbb\u0dc4\u0db1\u0dca </p>\n",
"<p>Load data </p>\n": "<p>\u0daf\u0dad\u0dca\u0dad\u0db4\u0dd6\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Load the content </p>\n": "<p>\u0d85\u0db1\u0dca\u0dad\u0dbb\u0dca\u0d9c\u0dad\u0dba\u0db4\u0dd6\u0dbb\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Number of samples </p>\n": "<p>\u0dc3\u0dcf\u0db8\u0dca\u0db4\u0dbd\u0d9c\u0dab\u0db1 </p>\n",
"<p>Tokenize </p>\n": "<p>\u0da7\u0ddd\u0d9a\u0db1\u0dba\u0dd2\u0dc3\u0dca\u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Truncate </p>\n": "<p>\u0da7\u0dca\u0dbb\u0db1\u0dca\u0d9a\u0dda\u0da7\u0dca\u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<ul><li><span translate=no>_^_0_^_</span> is the list of token ids </li>\n<li><span translate=no>_^_1_^_</span> is the sequence length of a single training sample</li></ul>\n": "<ul><li><span translate=no>_^_0_^_</span> \u0da7\u0ddd\u0d9a\u0db1\u0dca \u0dc4\u0dd0\u0db3\u0dd4\u0db1\u0dd4\u0db8\u0dca\u0db4\u0dad\u0dca \u0dbd\u0dd0\u0dba\u0dd2\u0dc3\u0dca\u0dad\u0dd4\u0dc0\u0dba\u0dd2 </li>\n<li><span translate=no>_^_1_^_</span> \u0dad\u0db1\u0dd2 \u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4 \u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2\u0dba\u0d9a \u0d85\u0db1\u0dd4\u0d9a\u0dca\u0dbb\u0db8\u0dba \u0daf\u0dd2\u0d9c \u0dc0\u0dda</li></ul>\n",
"Loads text datasets to fine-tune GPT-NeoX": "GPT-\u0db1\u0dd2\u0dba\u0ddd\u0d9a\u0dca\u0dc3\u0dca \u0db8\u0db1\u0dcf\u0dc0 \u0dc3\u0d9a\u0dc3\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dd9\u0dc5 \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd \u0db4\u0da7\u0dc0\u0dba\u0dd2",
"Text Dataset for GPT-NeoX": "\u0da2\u0dd3\u0db4\u0dd3\u0da7\u0dd3-\u0db1\u0dd2\u0dba\u0ddd\u0d9a\u0dca\u0dc3\u0dca \u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dd9\u0dc5 \u0daf\u0dad\u0dca\u0dad \u0d9a\u0da7\u0dca\u0da7\u0dbd\u0dba"
}
@@ -0,0 +1,19 @@
{
"<h1>Text Dataset for GPT-NeoX</h1>\n": "<h1>GPT-NEOX \u7684\u6587\u672c\u6570\u636e\u96c6</h1>\n",
"<h2>Dataset for fine-tuning GPT-NeoX</h2>\n<p>This is not optimized to very large datasets.</p>\n": "<h2>\u7528\u4e8e\u5fae\u8c03 GPT-NEOX \u7684\u6570\u636e\u96c6</h2>\n<p>\u8fd9\u5e76\u672a\u9488\u5bf9\u975e\u5e38\u5927\u7684\u6570\u636e\u96c6\u8fdb\u884c\u4f18\u5316\u3002</p>\n",
"<h3>Get a sample</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the index of the sample </li>\n<p><em>Returns</em> the input and the target</p></ul>\n": "<h3>\u83b7\u53d6\u6837\u54c1</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u6837\u672c\u7684\u7d22\u5f15</li>\n<p><em>\u8fd4\u56de</em>\u8f93\u5165\u548c\u76ee\u6807</p></ul>\n",
"<h3>Load Dataset</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the sequence length of a single training sample </li>\n<li><span translate=no>_^_1_^_</span> is the name of the dataset </li>\n<p><em>Returns</em> the dataset</p></ul>\n": "<h3>\u52a0\u8f7d\u6570\u636e\u96c6</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u5355\u4e2a\u8bad\u7ec3\u6837\u672c\u7684\u5e8f\u5217\u957f\u5ea6</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u6570\u636e\u96c6\u7684\u540d\u79f0</li>\n<p><em>\u8fd4\u56de</em>\u6570\u636e\u96c6</p></ul>\n",
"<h3>Load text file</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the location of the text file </li>\n<li><span translate=no>_^_1_^_</span> is the URL to download the file from </li>\n<li><span translate=no>_^_2_^_</span> is the number of characters to filter. Use this during testing when trying large datasets </li>\n<p><em>Returns</em> the text content</p></ul>\n": "<h3>\u52a0\u8f7d\u6587\u672c\u6587\u4ef6</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u6587\u672c\u6587\u4ef6\u7684\u4f4d\u7f6e</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u4ece\u4e2d\u4e0b\u8f7d\u6587\u4ef6\u7684 URL</li>\n<li><span translate=no>_^_2_^_</span>\u662f\u8981\u7b5b\u9009\u7684\u5b57\u7b26\u6570\u3002\u5728\u6d4b\u8bd5\u671f\u95f4\u5c1d\u8bd5\u5927\u578b\u6570\u636e\u96c6\u65f6\u4f7f\u7528\u6b64</li>\u9009\u9879\n<p><em>\u8fd4\u56de</em>\u6587\u672c\u5185\u5bb9</p></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Create a PyTorch tensor </p>\n": "<p>\u521b\u5efa\u4e00\u4e2a pyTorch \u5f20\u91cf</p>\n",
"<p>Download if it doesn&#x27;t exist </p>\n": "<p>\u5982\u679c\u4e0d\u5b58\u5728\uff0c\u8bf7\u4e0b\u8f7d</p>\n",
"<p>Filter </p>\n": "<p>\u7b5b\u9009</p>\n",
"<p>Load data </p>\n": "<p>\u52a0\u8f7d\u6570\u636e</p>\n",
"<p>Load the content </p>\n": "<p>\u52a0\u8f7d\u5185\u5bb9</p>\n",
"<p>Number of samples </p>\n": "<p>\u6837\u672c\u6570\u91cf</p>\n",
"<p>Tokenize </p>\n": "<p>Tokenize</p>\n",
"<p>Truncate </p>\n": "<p>\u622a\u65ad</p>\n",
"<ul><li><span translate=no>_^_0_^_</span> is the list of token ids </li>\n<li><span translate=no>_^_1_^_</span> is the sequence length of a single training sample</li></ul>\n": "<ul><li><span translate=no>_^_0_^_</span>\u662f\u4ee4\u724c ID \u7684\u5217\u8868</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u5355\u4e2a\u8bad\u7ec3\u6837\u672c\u7684\u5e8f\u5217\u957f\u5ea6</li></ul>\n",
"Loads text datasets to fine-tune GPT-NeoX": "\u52a0\u8f7d\u6587\u672c\u6570\u636e\u96c6\u4ee5\u5fae\u8c03 GPT-NEOX",
"Text Dataset for GPT-NeoX": "GPT-NEOX \u7684\u6587\u672c\u6570\u636e\u96c6"
}
@@ -0,0 +1,19 @@
{
"<h3>Get trainable parameters</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the model to train </li>\n<p><em>Returns</em> a list of parameters for training</p></ul>\n": "<h3>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u53ef\u80fd\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u30e2\u30c7\u30eb\u3067\u3059</li>\n<p><em>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u7528\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Backward pass </p>\n": "<p>\u30d0\u30c3\u30af\u30ef\u30fc\u30c9\u30d1\u30b9</p>\n",
"<p>Calculate accuracy </p>\n": "<p>\u7cbe\u5ea6\u3092\u8a08\u7b97</p>\n",
"<p>Calculate loss </p>\n": "<p>\u640d\u5931\u306e\u8a08\u7b97</p>\n",
"<p>Filter parameters that require gradients </p>\n": "<p>\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5fc5\u8981\u3068\u3059\u308b\u30d5\u30a3\u30eb\u30bf\u30fc\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc</p>\n",
"<p>Forward pass </p>\n": "<p>\u30d5\u30a9\u30ef\u30fc\u30c9\u30d1\u30b9</p>\n",
"<p>Get all parameters </p>\n": "<p>\u3059\u3079\u3066\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97</p>\n",
"<p>Get predictions </p>\n": "<p>\u4e88\u6e2c\u3092\u53d6\u5f97</p>\n",
"<p>Iterate through the batches </p>\n": "<p>\u30d0\u30c3\u30c1\u3092\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3059\u308b</p>\n",
"<p>Move targets to the same device as output </p>\n": "<p>\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u51fa\u529b\u3068\u540c\u3058\u30c7\u30d0\u30a4\u30b9\u306b\u79fb\u52d5</p>\n",
"<p>Optimize </p>\n": "<p>\u6700\u9069\u5316</p>\n",
"<p>Set gradients to zero </p>\n": "<p>\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u30bc\u30ed\u306b\u8a2d\u5b9a</p>\n",
"<p>Set model for train </p>\n": "<p>\u9244\u9053\u6a21\u578b\u3092\u8a2d\u5b9a</p>\n",
"<p>tracker.add({&#x27;loss.scaled&#x27;: loss}) </p>\n": "<p>\u30c8\u30e9\u30c3\u30ab\u30fc\u8ffd\u52a0 ({'\u640d\u5931.scaled': \u640d\u5931})</p>\n",
"<ul><li><span translate=no>_^_0_^_</span> train/valid </li>\n<li><span translate=no>_^_1_^_</span> is the sample </li>\n<p><em>Returns</em> the loss, output and the target</p></ul>\n": "<ul><li><span translate=no>_^_0_^_</span>\u96fb\u8eca/\u6709\u52b9</li>\n<li><span translate=no>_^_1_^_</span>\u30b5\u30f3\u30d7\u30eb\u3067\u3059</li>\n<p>\u640d\u5931\u3001\u51fa\u529b\u3001<em>\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u8fd4\u3057\u307e\u3059</em></p></ul>\n",
"trainer.py": "trainer.py"
}
@@ -0,0 +1,19 @@
{
"<h3>Get trainable parameters</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the model to train </li>\n<p><em>Returns</em> a list of parameters for training</p></ul>\n": "<h3>\u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4\u0d9a\u0dc5 \u0dc4\u0dd0\u0d9a\u0dd2 \u0db4\u0dbb\u0dcf\u0db8\u0dd2\u0dad\u0dd3\u0db1\u0dca \u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1</h3>\n<ul><li><span translate=no>_^_0_^_</span> \u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4 \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0dda \u0d86\u0d9a\u0dd8\u0dad\u0dd2\u0dba\u0dba\u0dd2 </li>\n</ul><p>\u0db4\u0dd4\u0dc4\u0dd4\u0dab\u0dd4\u0dc0\u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dbb\u0dcf\u0db8\u0dd2\u0dad\u0dd2 \u0dbd\u0dd0\u0dba\u0dd2\u0dc3\u0dca\u0dad\u0dd4\u0dc0\u0d9a\u0dca<em>\u0d86\u0db4\u0dc3\u0dd4</em> \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</p>\n",
"<p> </p>\n": "<p> </p>\n",
"<p>Backward pass </p>\n": "<p>\u0db4\u0dc3\u0dd4\u0d9c\u0dcf\u0db8\u0dd3\u0db4\u0dcf\u0dc3\u0dca </p>\n",
"<p>Calculate accuracy </p>\n": "<p>\u0db1\u0dd2\u0dbb\u0dc0\u0daf\u0dca\u0dba\u0dad\u0dcf\u0dc0\u0dba\u0d9c\u0dab\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Calculate loss </p>\n": "<p>\u0d85\u0dbd\u0dcf\u0db7\u0dba\u0d9c\u0dab\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Filter parameters that require gradients </p>\n": "<p>\u0d85\u0db1\u0dd4\u0d9a\u0dca\u0dbb\u0db8\u0dd2\u0d9a\u0d85\u0dc0\u0dc1\u0dca\u0dba \u0db6\u0dc0 \u0db4\u0dd9\u0dbb\u0dc4\u0db1\u0dca \u0db4\u0dbb\u0dcf\u0db8\u0dd2\u0dad\u0dd3\u0db1\u0dca </p>\n",
"<p>Forward pass </p>\n": "<p>\u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dc3\u0dcf\u0db8\u0dcf\u0dbb\u0dca\u0dae\u0dba </p>\n",
"<p>Get all parameters </p>\n": "<p>\u0dc3\u0dd2\u0dba\u0dbd\u0dd4\u0db8\u0db4\u0dbb\u0dcf\u0db8\u0dd2\u0dad\u0dd3\u0db1\u0dca \u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1 </p>\n",
"<p>Get predictions </p>\n": "<p>\u0d85\u0db1\u0dcf\u0dc0\u0dd0\u0d9a\u0dd2\u0dbd\u0db6\u0dcf \u0d9c\u0db1\u0dca\u0db1 </p>\n",
"<p>Iterate through the batches </p>\n": "<p>\u0d9a\u0dab\u0dca\u0da9\u0dcf\u0dba\u0db8\u0dca\u0dc4\u0dbb\u0dc4\u0dcf \u0db1\u0dd0\u0dc0\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Move targets to the same device as output </p>\n": "<p>\u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba\u0dbd\u0dd9\u0dc3 \u0d91\u0d9a\u0db8 \u0d8b\u0db4\u0dcf\u0d82\u0d9c\u0dba \u0dc0\u0dd9\u0dad \u0d89\u0dbd\u0d9a\u0dca\u0d9a \u0d9c\u0dd9\u0db1\u0dba\u0db1\u0dca\u0db1 </p>\n",
"<p>Optimize </p>\n": "<p>\u0db4\u0dca\u0dbb\u0dc1\u0dc3\u0dca\u0dad\u0d9a\u0dbb\u0db1\u0dca\u0db1 </p>\n",
"<p>Set gradients to zero </p>\n": "<p>\u0dc1\u0dd4\u0db1\u0dca\u0dba\u0dba\u0da7\u0d85\u0db1\u0dd4\u0d9a\u0dca\u0dbb\u0db8\u0dd2\u0d9a \u0dc3\u0d9a\u0dc3\u0db1\u0dca\u0db1 </p>\n",
"<p>Set model for train </p>\n": "<p>\u0daf\u0dd4\u0db8\u0dca\u0dbb\u0dd2\u0dba\u0dc3\u0db3\u0dc4\u0dcf \u0d86\u0d9a\u0dd8\u0dad\u0dd2\u0dba \u0dc3\u0d9a\u0dc3\u0db1\u0dca\u0db1 </p>\n",
"<p>tracker.add({&#x27;loss.scaled&#x27;: loss}) </p>\n": "<p>tracker.add({'loss.scaled': \u0d85\u0dc4\u0dd2\u0db8\u0dd2 \u0dc0\u0dd3\u0db8}) </p>\n",
"<ul><li><span translate=no>_^_0_^_</span> train/valid </li>\n<li><span translate=no>_^_1_^_</span> is the sample </li>\n<p><em>Returns</em> the loss, output and the target</p></ul>\n": "<ul><li><span translate=no>_^_0_^_</span> \u0daf\u0dd4\u0db8\u0dca\u0dbb\u0dd2\u0dba/\u0dc0\u0dbd\u0d82\u0d9c\u0dd4 </li>\n<li><span translate=no>_^_1_^_</span> \u0db1\u0dd2\u0dba\u0dd0\u0daf\u0dd2\u0dba \u0dc0\u0dda </li>\n<p>\u0d85\u0dbd\u0dcf\u0db7\u0dba, \u0db4\u0dca\u0dbb\u0dad\u0dd2\u0daf\u0dcf\u0db1\u0dba \u0dc3\u0dc4 \u0d89\u0dbd\u0d9a\u0dca\u0d9a\u0dba<em>\u0d86\u0db4\u0dc3\u0dd4 \u0dbd\u0db6\u0dcf \u0daf\u0dd9\u0dba\u0dd2</em> </p></ul>\n",
"trainer.py": "trainer.py"
}
@@ -0,0 +1,19 @@
{
"<h3>Get trainable parameters</h3>\n<ul><li><span translate=no>_^_0_^_</span> is the model to train </li>\n<p><em>Returns</em> a list of parameters for training</p></ul>\n": "<h3>\u83b7\u53d6\u53ef\u8bad\u7ec3\u7684\u53c2\u6570</h3>\n<ul><li><span translate=no>_^_0_^_</span>\u662f\u8981\u8bad\u7ec3\u7684\u6a21\u578b</li>\n<p><em>\u8fd4\u56de</em>\u8bad\u7ec3\u7684\u53c2\u6570\u5217\u8868</p></ul>\n",
"<p> </p>\n": "<p></p>\n",
"<p>Backward pass </p>\n": "<p>\u5411\u540e\u4f20\u7403</p>\n",
"<p>Calculate accuracy </p>\n": "<p>\u8ba1\u7b97\u7cbe\u5ea6</p>\n",
"<p>Calculate loss </p>\n": "<p>\u8ba1\u7b97\u635f\u5931</p>\n",
"<p>Filter parameters that require gradients </p>\n": "<p>\u8fc7\u6ee4\u9700\u8981\u6e10\u53d8\u7684\u53c2\u6570</p>\n",
"<p>Forward pass </p>\n": "<p>\u5411\u524d\u4f20\u7403</p>\n",
"<p>Get all parameters </p>\n": "<p>\u83b7\u53d6\u6240\u6709\u53c2\u6570</p>\n",
"<p>Get predictions </p>\n": "<p>\u83b7\u53d6\u9884\u6d4b</p>\n",
"<p>Iterate through the batches </p>\n": "<p>\u904d\u5386\u6279\u6b21</p>\n",
"<p>Move targets to the same device as output </p>\n": "<p>\u5c06\u76ee\u6807\u79fb\u52a8\u5230\u4e0e\u8f93\u51fa\u76f8\u540c\u7684\u8bbe\u5907\u4e0a</p>\n",
"<p>Optimize </p>\n": "<p>\u4f18\u5316</p>\n",
"<p>Set gradients to zero </p>\n": "<p>\u5c06\u6e10\u53d8\u8bbe\u7f6e\u4e3a\u96f6</p>\n",
"<p>Set model for train </p>\n": "<p>\u8bbe\u7f6e\u706b\u8f66\u6a21\u578b</p>\n",
"<p>tracker.add({&#x27;loss.scaled&#x27;: loss}) </p>\n": "<p>tracker.add ({'loss.scaled': loss})</p>\n",
"<ul><li><span translate=no>_^_0_^_</span> train/valid </li>\n<li><span translate=no>_^_1_^_</span> is the sample </li>\n<p><em>Returns</em> the loss, output and the target</p></ul>\n": "<ul><li><span translate=no>_^_0_^_</span>\u8bad\u7ec3/\u6709\u6548</li>\n<li><span translate=no>_^_1_^_</span>\u662f\u6837\u672c</li>\n<p><em>\u8fd4\u56de</em>\u635f\u5931\u3001\u8f93\u51fa\u548c\u76ee\u6807</p></ul>\n",
"trainer.py": "trainer.py"
}