Bug: NotImplementedError with Meta Tensors on Windows 10 CPU execution
Hi Chandra Team,I encountered a consistent crash when attempting to run Chandra OCR 2.0 locally on a Windows 10 laptop using the HuggingFace
Bug NotImplementedError with Meta Tensors on Windows 10 CPU execution.pdf
backend (--method hf) in a pure CPU environment.Environment:OS: Windows 10Python: 3.10.11 (Virtual Environment)Hardware: CPU execution (No dedicated NVIDIA GPU/CUDA)The Issue:When launching the tool, the initialization crashes during the HuggingFace weight-tying and token verification stages. The underlying framework throws a fatal NotImplementedError: attempted to run this operator with Meta tensors inside PyTorch when executing internal checks like torch.equal or torch.isin.It appears that low_cpu_mem_usage=True forces certain parameters onto abstract meta tensors, which PyTorch on Windows CPU builds cannot natively evaluate or copy out of (causing a secondary Cannot copy out of meta tensor; no data! error when forced).I have attached a comprehensive PDF containing the full step-by-step diagnostic process, complete console tracebacks, and various patching attempts we made in our environment.Please let me know if you need any further logs or testing from a Windows CPU setup!Let me know if you would like to modify any specific details in this draft before sending it off to the Chandra team!
Source: datalab-to/chandra