Skip to content

feat: add native Hugging Face GGUF downloads - #16

Open
zhangzhenghao wants to merge 3 commits into
mainfrom
feat/huggingface-download
Open

zhangzhenghao wants to merge 3 commits into
mainfrom
feat/huggingface-download

Conversation

@zhangzhenghao

Copy link
Copy Markdown
Collaborator

Summary

  • Add native C++17 Hugging Face GGUF downloads with clap download -hf owner/repo[:quant] and the same resolver in clap-model.
  • Resolve immutable commits and paginated repository trees; support exact filenames, quant selection, HF cache layout/environment variables, bearer tokens, and offline reuse.
  • Stream/resume downloads with validated ranges and sizes, bounded retries, LFS SHA256 verification, and credential-safe redirects.
  • Validate cache paths across platforms and recover interrupted snapshot publication; fall back to hard links when symlinks are unavailable.
  • Keep existing dummy embedding/server interfaces unchanged; reject split GGUFs explicitly because the model loader does not support them.

Validation

  • Full local CTest: 18/18 passed.
  • HF HTTP integration suite: 23/23 passed against both static and shared builds, including downloaded-model inference and offline equivalence.
  • Shared build with BUILD_TESTING=OFF and staged install verified (existing shared install requires runtime library-path configuration).
  • Independent code review passed; git diff --check passed.
  • Native Windows/macOS validation is left to the CI matrix.

Notes

  • HTTPS requires OpenSSL development libraries at build time.
  • Downloads consume existing GGUF files, not safetensors/PyTorch conversion.
  • An abandoned repository download lock requires manual cleanup as documented.

@zhangzhenghao
zhangzhenghao force-pushed the feat/huggingface-download branch from cbff473 to c8c9f98 Compare October 24, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants