fully-local-pdf-chatbot icon indicating copy to clipboard operation
fully-local-pdf-chatbot copied to clipboard

Errors uploading PDF files

Open bijuabraham opened this issue 1 year ago • 4 comments

I am getting different errors while uploading PDF files. Some files are working too. The error comes to the top right and disappears and unable to capture it. OrtRun(). error code = 6 and out of Bounds are the usual ones. Where do I see the logs so that I can debug the same ?

bijuabraham avatar Dec 03 '23 22:12 bijuabraham

Hey @bijuabraham,

It's a bit janky but I ended up doing this with postMessage since errors in the worker were getting swallowed:

https://github.com/jacoblee93/fully-local-pdf-chatbot/blob/6b2880cbb80420693e87ac53230b9b48c540a246/app/worker.ts#L187

Let me know what you find!

jacoblee93 avatar Dec 04 '23 01:12 jacoblee93

Hey @jacoblee93 - did you find a resolution to this issue? I'm getting the same error. OrtRun failed to run. Error code = 6.

smayanks avatar Mar 09 '24 01:03 smayanks

Hey @jacoblee93 - did you find a resolution to this issue? I'm getting the same error. OrtRun failed to run. Error code = 6.

No. It seems something to do with the file size or content of file. I abandoned and using LMStudio that has all these built in.

bijuabraham avatar Mar 09 '24 03:03 bijuabraham

That's a good clue! This is definitely meant as a proof of concept more than a super robust app but if you have the PDF causing problems I'd be interested in seeing it.

jacoblee93 avatar Mar 09 '24 06:03 jacoblee93

#13 solved OrtRun(). error code = 6, I followed the hint and everything goes well

arbitraryking avatar Mar 14 '24 08:03 arbitraryking

Oh nice. Will mark this as closed. Thank you to all for the reports!

I do want to leave Transformers.js as the default embeddings to put as much in the browser as possible - maybe @xenova has seen this before?

jacoblee93 avatar Mar 14 '24 16:03 jacoblee93

OrtRun failed to run. Error code = 6 is an error code raised by onnxruntime-web, typically due to out of memory issues. For now, you can try (1) reduce batch size, or (2) reduce sequence length. However, this will most likely be fixed with v3 (onnxruntime-web v1.17.0 fixed a WASM memory access bug for > 2GB). You will then also be enable WebGPU support for this.

xenova avatar Mar 14 '24 16:03 xenova

Thank you for the context!

jacoblee93 avatar Mar 14 '24 19:03 jacoblee93