char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
4b4d13ae7
char/aliceai-t5-moe
1#pragma once 2 3#include <string> 4#include <vector> 5 6// Ref: https://huggingface.co/docs/hub/local-cache.md 7 8namespace hf_cache { 9 10struct hf_file { 11std ::string path ; 12std ::string url ; 13std ::string local_path ; 14std ::string final_path ; 15std ::string oid ; 16std ::string repo_id ; 17}; 18 19using hf_files = std ::vector < hf_file > ; 20 21// Get files from HF API 22hf_files get_repo_files ( 23const std ::string & repo_id , 24const std ::string & token 25); 26 27hf_files get_cached_files (const std ::string & repo_id = {}); 28 29// Create snapshot path (link or move/copy) and return it 30std ::string finalize_file (const hf_file & file ); 31 32// Remove the entire cached directory for a repo, returns true if removed 33bool remove_cached_repo (const std ::string & repo_id ); 34 35}// namespace hf_cache