[GH-ISSUE #1448] Pytorch model quantization, using ollama/quantize docker is not working. #47287

Closed
opened 2026-04-28 03:30:37 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @phalexo on GitHub (Dec 9, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1448

(base) alexo@GrayMatters:/opt/data/data/Salesforce/codegen25-7b-mono$ docker run --rm -v .:/model -v .:/workdir ollama/quantize -q q6_K ./
sh: 0: cannot open entrypoint.sh: No such file

Originally created by @phalexo on GitHub (Dec 9, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1448 (base) alexo@GrayMatters:/opt/data/data/Salesforce/codegen25-7b-mono$ docker run --rm -v .:/model -v .:/workdir ollama/quantize -q q6_K ./ sh: 0: cannot open entrypoint.sh: No such file
Author
Owner

@netroy commented on GitHub (Feb 12, 2024):

Looking at the docker image ollama/quantize, /workdir seems to be the WORKDIR, where llama.cpp is cloned and compiled, and where the entrypoint.sh is copied over to.
So, when you do -v .:/workdir, all those files are gone from the container.
You could try to either not mount a volume to that path, or first copy over the content of that folder from the image into the current folder.

<!-- gh-comment-id:1938434964 --> @netroy commented on GitHub (Feb 12, 2024): Looking at the docker image `ollama/quantize`, `/workdir` seems to be the `WORKDIR`, where llama.cpp is cloned and compiled, and where the `entrypoint.sh` is copied over to. So, when you do `-v .:/workdir`, all those files are gone from the container. You could try to either not mount a volume to that path, or first copy over the content of that folder from the image into the current folder.
Author
Owner

@jmorganca commented on GitHub (Feb 20, 2024):

Hi there, we've updated the docs to use python and llama.cpp's quantize utility directly – let me know if this helps

<!-- gh-comment-id:1953342939 --> @jmorganca commented on GitHub (Feb 20, 2024): Hi there, we've updated the [docs](https://github.com/ollama/ollama/blob/main/docs/import.md) to use `python` and llama.cpp's `quantize` utility directly – let me know if this helps
Author
Owner

@netroy commented on GitHub (Feb 21, 2024):

@jmorganca Does this mean that I should close #2461 ?

<!-- gh-comment-id:1956442304 --> @netroy commented on GitHub (Feb 21, 2024): @jmorganca Does this mean that I should close #2461 ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#47287