[Android demo app] Load failed: 34

ethanc8: <p>I exported the stories110M model to ExecuTorch using <a href="https://colab.research.google.com/drive/1S_K_J2ooHh575i4zSkZKNhYLZL5Di5rI#scrollTo=QZcwzluUTpDO" rel="noopener nofollow ugc">a Colab notebook</a> on ExecuTorch v0.2.0’s PyPI pip package. I then downloaded the exported model to my device and tried to open it in ExecuTorchLlamaDemo v0.2.0, which I downloaded from GitHub Actions. The specific steps that I took are documented at <a href="https://gist.github.com/ethanc8/66ee3b6abf58e77943331d3a511a015e" class="inline-onebox" rel="noopener nofollow ugc">Executorch LLM tutorial · GitHub</a>.</p>
<p>Unfortunately, I’ve encountered the error “Load failed: 34” after trying to open it in GitHub Actions.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/e/fefdca398abe9f729a748f759a364a7bd5c5dc22.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/fefdca398abe9f729a748f759a364a7bd5c5dc22" title="Screenshot showing the error &quot;Load failed: 34&quot; in front of a message saying &quot;Total RAM: 7400 MB. Available RAM: 2177 MB. Model path: /data/local/tmp/llama/xnnpack_llama2.pte Tokenizer path: /data/local/tmp/llama/tokenizer.bin Model loaded time: 20 ms&quot;"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fefdca398abe9f729a748f759a364a7bd5c5dc22_2_230x500.jpeg" alt="Screenshot showing the error &quot;Load failed: 34&quot; in front of a message saying &quot;Total RAM: 7400 MB. Available RAM: 2177 MB. Model path: /data/local/tmp/llama/xnnpack_llama2.pte Tokenizer path: /data/local/tmp/llama/tokenizer.bin Model loaded time: 20 ms&quot;" data-base62-sha1="AnL1eCObgTCte6qOmv9ZXzp73oe" width="230" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fefdca398abe9f729a748f759a364a7bd5c5dc22_2_230x500.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fefdca398abe9f729a748f759a364a7bd5c5dc22_2_345x750.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fefdca398abe9f729a748f759a364a7bd5c5dc22_2_460x1000.jpeg 2x" data-dominant-color="5B5B5B"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot showing the error "Load failed: 34" in front of a message saying "Total RAM: 7400 MB. Available RAM: 2177 MB. Model path: /data/local/tmp/llama/xnnpack_llama2.pte Tokenizer path: /data/local/tmp/llama/tokenizer.bin Model loaded time: 20 ms"</span><span class="informations">1080×2340 110 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Does anyone know what is the cause of this issue or how I can fix it?</p>

dbort: <p>Sorry about the slow response <a class="mention" href="/u/ethanc8">@ethanc8</a>. If this is still happening, could you please create a <a href="https://github.com/pytorch/executorch/issues/new/choose" rel="noopener nofollow ugc">bug report</a> with the details?</p>
<p>34 is 0x22, so sounds like there’s an <a href="https://github.com/pytorch/executorch/blob/561c035af5d6b64cd74defd8aea96b94f84af6f1/runtime/core/error.h#L77" rel="noopener nofollow ugc">AccessFailed</a> error when loading the model. Maybe a file is missing?</p>

hsz: <p>Hi <a class="mention" href="/u/ethanc8">@ethanc8</a> Could you please try with the latest code?</p>

ethanc8: <p>Sorry, I didn’t see this. I will try testing with the latest code sometime soon.</p>