Path: blob/master/translate_cache/neox/utils/cache.zh.json
4923 views
{1"<h1>Cache for Intermediate Activations</h1>\n<p>During inference the model outputs token by token. We use this simple cache to store key's and value's attention layers, so that we don'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",2"<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",3"<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",4"<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",5"<h3>Clear cache</h3>\n": "<h3>\u6e05\u9664\u7f13\u5b58</h3>\n",6"<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",7"<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",8"<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",9"<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",10"<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",11"<p>Create an empty queue if it's not present </p>\n": "<p>\u5982\u679c\u961f\u5217\u4e0d\u5b58\u5728\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a\u7a7a\u961f\u5217</p>\n",12"<p>Push to the queue </p>\n": "<p>\u63a8\u9001\u5230\u961f\u5217</p>\n",13"<p>Singleton for cache </p>\n": "<p>\u7f13\u5b58\u7684\u5355\u4f8b</p>\n",14"Cache for Intermediate Activations": "\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\u7684\u7f13\u5b58",15"Cache for intermediate activations for faster inference.": "\u7f13\u5b58\u7528\u4e8e\u4e2d\u95f4\u6fc0\u6d3b\uff0c\u4ee5\u4fbf\u66f4\u5feb\u5730\u63a8\u65ad\u3002"16}1718