Skip to content

Model is not being loaded on loadModel? #408

Answered by giladgd
kumikumi asked this question in Q&A
Discussion options

You must be logged in to vote

When you load a model, useMmap is enabled by default if your system supports it.
mmap (memory-mapped file) allows mapping a file from the disk to a virtual memory managed by the OS, so the OS can load and unload the files from memory as it sees fit, and it allows the system to skip caching large regions of the memory to the disk since it can use the file instead, which makes everything more efficient and smooth.
However, it also means that the file might finish loading (or even start, depending on what the OS decides) only when it's used for the first time, which is why the loading of the model is very fast, but the first response begins with a delay.
Most of the memory consumption you se…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by giladgd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants