{ "
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.
\n": "\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
\u3002\n", "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.
\n": "\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
\u3002\n", "Returns the cache instance
\u30ad\u30e3\u30c3\u30b7\u30e5\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u3059
Returns the value
\u5024\u3092\u8fd4\u3059
Returns the cached value
\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u5024\u3092\u8fd4\u3057\u307e\u3059
Returns size of the queue if exists else None
\u30ad\u30e5\u30fc\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u30ad\u30e5\u30fc\u306e\u30b5\u30a4\u30ba\u3092\u8fd4\u3057\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306f None
Create an empty queue if it's not present
\n": "\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u7a7a\u306e\u30ad\u30e5\u30fc\u3092\u4f5c\u6210
\n", "Push to the queue
\n": "\u30ad\u30e5\u30fc\u306b\u30d7\u30c3\u30b7\u30e5
\n", "Singleton for cache
\n": "\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3
\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" }