uwe311's picture
download
raw
646 Bytes
#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;
};
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);
} // namespace hf_cache

Xet Storage Details

Size:
646 Bytes
·
Xet hash:
65f450d49645d344153b0eead281ca804e09ba0c6bec651af2ffc0745771238f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.