/
vshmidt
/
llama.cpp
Обзор
Документация
Войти
/
vshmidt
/
llama.cpp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
common/hf-cache.h
36 строк
801 B
Adrien Gallouët
common : fix split model migration (#21019)
26 мар 2026, 14:04
Не верифицирован
26 мар 2026, 14:04
3cba8bb
Код
Авторство
О чём код?
#pragma once #include <string> #include <vector> // Ref: https://huggingface.co/docs/hub/local-cache.md namespace hf_cache { struct hf_file { std::string path; std::string url; std::string local_path; std::string final_path; std::string oid; std::string repo_id; size_t size = 0; // only for the migration }; using hf_files = std::vector<hf_file>; // Get files from HF API hf_files get_repo_files( const std::string & repo_id, const std::string & token ); hf_files get_cached_files(const std::string & repo_id = {}); // Create snapshot path (link or move/copy) and return it std::string finalize_file(const hf_file & file); // TODO: Remove later void migrate_old_cache_to_hf_cache(const std::string & token, bool offline = false); } // namespace hf_cache