Offline use not working
Author: Q3-3Created Mar 1, 2025Updated Feb 12, 2026
I cloned moondream2 files from huggingface and copied it to a pc that doesn't connect to internet. When trying to load as shown in 'usage' section here
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"/root/moondream2",
revision="2025-01-09",
trust_remote_code=True,
# Uncomment to run on GPU.
# device_map={"": "cuda"}
)I keep getting load error such as the one below for one module or the other.
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/huggingface/modules/transformers_modules/layers.py'
I copied the entire contents of the downloaded folder to cache
cp /root/moondream2/*.* /root/.cache/huggingface/modules/transformers_modules/
And then I have this error
File "/root/.cache/huggingface/modules/transformers_modules/hf_moondream.py", line 3, in <module>
from .config import MoondreamConfig
ModuleNotFoundError: No module named 'transformers_modules.config'At wits end trying to make this work. Not a python pro. But all other models i tried from hf like qwen2 3B,qwen2.5 3B, microsoft phi, deep-seek vl, etc all work fine. Can someone help?
Source: m87-labs/moondream