{"id":7413,"date":"2022-10-28T22:00:52","date_gmt":"2022-10-28T13:00:52","guid":{"rendered":"https:\/\/www.xenos.jp\/~zen\/blog2\/?p=7413"},"modified":"2022-10-28T22:00:53","modified_gmt":"2022-10-28T13:00:53","slug":"post-7413","status":"publish","type":"post","link":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/2022\/10\/28\/post-7413\/","title":{"rendered":"Google Colab\u3067Whisper\u3092\u4f7f\u3063\u3066\u3044\u305f\u3089\u300cCUDA out of memory\u300d\u304c\u767a\u751f\u3002"},"content":{"rendered":"\n<p>Google Colab\u306e\u74b0\u5883\u306b\u3001Whisper\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u3044\u308d\u3044\u308d\u3068\u8a66\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u4f55\u56de\u304b\u5b9f\u884c\u3057\u3066\u3044\u305f\u3089\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/lib\/python3.7\/dist-packages\/torch\/_utils.py in _cuda(self, device, non_blocking, **kwargs) \n     76             return new_type(indices, values, self.size()) \n     77         else: \n---> 78             return torch._UntypedStorage(self.size(), device=torch.device('cuda')).copy_(self, non_blocking) \n     79  \n     80  \nRuntimeError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 14.76 GiB total capacity; 12.98 GiB already allocated; 27.75 MiB free; 13.47 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF<\/code><\/pre>\n\n\n\n<p>\u30a8\u30e9\u30fc\u306f\u3001GPU\u306e\u30e1\u30e2\u30ea\u304c\u4e0d\u8db3\u3057\u3066\u3001\u5b9f\u884c\u306b\u5fc5\u8981\u306aVRAM\u3092\u78ba\u4fdd\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3002<\/p>\n\n\n\n<p>Google Colab\u306e\u74b0\u5883\u3067Whisper\u3092\u52d5\u304b\u3057\u3066\u3044\u308b\u3046\u3061\u306b\u3001VRAM\u3092\u4f7f\u3044\u5207\u3063\u3066\u3057\u307e\u3044\u3001\u305d\u308c\u304c\u958b\u653e\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u65b0\u898f\u5272\u308a\u5f53\u3066\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u3002\u5b9f\u884c\u81ea\u4f53\u306f\u7d42\u308f\u3063\u3066\u3044\u308b\u306e\u3067\u3001PyTorch\u3067\u306eVRAM\u306e\u958b\u653e\u304c\u3067\u304d\u3066\u3044\u306a\u304b\u3063\u305f\u3088\u3046\u3060\u3002<\/p>\n\n\n\n<p>PyTorch\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u5207\u3063\u3066\u3082\u3088\u3044\u306e\u3060\u304c\u3001Google Colab\u3060\u3068\u3001\u305d\u306e\u65b9\u304c\u96e3\u6613\u5ea6\u304c\u9ad8\u3044\u3002\u305d\u306e\u305f\u3081\u3001Google Colab\u3067\u306f\u3001\u300c\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u63a5\u7d9a\u89e3\u9664\u3057\u3066\u524a\u9664\u300d\u3092\u884c\u3063\u3066\u304b\u3089\u3001\u63a5\u7d9a\u304c\u3088\u3044\u3002\u3082\u3057\u304f\u306f\u3001\u4e00\u5ea6\u3001\u9589\u3058\u3066\u3001\u65b0\u3057\u304f\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<p>1\u6642\u9593\u304f\u3089\u3044\u306e\u52d5\u753b\u3092Large\u306e\u51e6\u7406\u3067\u30012\u56de\u76ee\u306f\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4f55\u56de\u3082\u5b9f\u884c\u3057\u3066\u3044\u304f\u306b\u306f\u518d\u63a5\u7d9a\u306a\u3069\u306e\u624b\u9593\u3092\u304b\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3060\u3002\u3082\u3063\u3068\u9577\u3044\u52d5\u753b\u306e\u51e6\u7406\u3082\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Colab\u306e\u74b0\u5883\u306b\u3001Whisper\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u3044\u308d\u3044\u308d\u3068\u8a66\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u4f55\u56de\u304b\u5b9f\u884c\u3057\u3066\u3044\u305f\u3089\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3002 \u30a8\u30e9\u30fc\u306f\u3001GPU\u306e\u30e1\u30e2\u30ea\u304c\u4e0d\u8db3\u3057\u3066\u3001\u5b9f\u884c\u306b\u5fc5\u8981\u306aVRAM\u3092\u78ba\u4fdd\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[92,259,164],"class_list":["post-7413","post","type-post","status-publish","format-standard","hentry","category-diary","tag-google","tag-google-colab","tag-python"],"_links":{"self":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/7413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/comments?post=7413"}],"version-history":[{"count":1,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/7413\/revisions"}],"predecessor-version":[{"id":7414,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/7413\/revisions\/7414"}],"wp:attachment":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/media?parent=7413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/categories?post=7413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/tags?post=7413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}