mirror of
https://github.com/p-e-w/heretic.git
synced 2026-12-03 18:42:57 +07:00
[GH-ISSUE #24] Add possibility to load model from local path #11
Labels
No labels
bug
enhancement
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
p-e-w/heretic#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fengwang on GitHub (Nov 19, 2025).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/24
When running in a Docker container, Heretic currently downloads the model from HuggingFace even after binding the cache directory. Would it be possible to modify the behavior so Heretic prioritizes a local model folder if specified via the model parameter? If the parameter points to a local directory, the model should be loaded from there; otherwise, it should proceed as before downloading from HuggingFace.
@spikymoth commented on GitHub (Nov 19, 2025):
Looks like you can pass in an absolute path like
/home/user/models/Qwen/Qwen3-4B-Instruct-2507and it'll work. The same goes for the datasets.Note that relative paths don't seem to work, at least for the model - the transformers library will throw a validation error.
@fengwang commented on GitHub (Nov 19, 2025):
Have you tried yet? I thought we have to use the
local_files_onlyflag, with more modification like this:github.com/fengwang/heretic@b4949bc07f@spikymoth commented on GitHub (Nov 19, 2025):
Yes, I've tried it and it works. The underlying APIs accept both repository links and paths; if you pass in a path that starts with a slash then it'll use the local directory instead of trying to access a repo.
@fengwang commented on GitHub (Nov 19, 2025):
Many thanks. I will close this issue then.