|
Mila
Deep Neural Network Library
|
The HuggingFace hub. More...
Public Member Functions | |
| HuggingFaceHub (std::shared_ptr< const IHttpTransport > transport, std::string token=discoverHuggingFaceToken(), ProgressCallback progress={}) | |
| FetchReport | fetchFile (const ModelCoordinate &coordinate, const std::string &path, uint64_t resume_from, const std::function< bool(const char *, size_t)> &sink) const override |
| Stream one repository file, resuming from an offset. | |
| std::string | fetchManifest (const ModelCoordinate &coordinate) const override |
| The raw mila.json text for a coordinate. | |
| std::vector< HubModel > | listModels (const std::string &owner) const override |
| Every repository an owner publishes. | |
| std::string | name () const override |
| Stable identifier recorded in a store record, e.g. "huggingface". | |
The HuggingFace hub.
The only class in the library that names a huggingface.co URL. It composes an HttpClient rather than a transport: redirects, the cross-host token rule and the Range protocol are the client's business, and this class should no more reimplement them than it should open a socket.
|
inlineoverridevirtual |
Stream one repository file, resuming from an offset.
Implements Mila::Distribution::IModelHub.
|
inlineoverridevirtual |
The raw mila.json text for a coordinate.
Implements Mila::Distribution::IModelHub.
|
inlineoverridevirtual |
Every repository an owner publishes.
The result is untrusted remote text authored by whoever owns the repository. It is data: rendered, never interpreted as markup and never as instructions.
Implements Mila::Distribution::IModelHub.
|
inlineoverridevirtual |
Stable identifier recorded in a store record, e.g. "huggingface".
Implements Mila::Distribution::IModelHub.