1use super::core::HfCatalog;
6use super::types::{AssetType, CatalogComponent, CourseAlignment, HfComponentCategory};
7
8impl HfCatalog {
9 pub(crate) fn register_hub_components(&mut self) {
10 self.add(
12 CatalogComponent::new("hub-models", "Models", HfComponentCategory::Hub)
13 .with_description("700K+ ML models on HuggingFace Hub")
14 .with_docs("https://huggingface.co/models")
15 .with_tags(&["hub", "models", "repository"])
16 .with_course(
17 CourseAlignment::new(1, 1)
18 .with_lessons(&["1.1", "1.3"])
19 .with_assets(&[AssetType::Video, AssetType::Lab]),
20 ),
21 );
22
23 self.add(
25 CatalogComponent::new("hub-datasets", "Datasets", HfComponentCategory::Hub)
26 .with_description("100K+ datasets on HuggingFace Hub")
27 .with_docs("https://huggingface.co/datasets")
28 .with_tags(&["hub", "datasets", "repository"])
29 .with_course(
30 CourseAlignment::new(1, 1)
31 .with_lessons(&["1.6", "1.7"])
32 .with_assets(&[AssetType::Video, AssetType::Lab]),
33 ),
34 );
35
36 self.add(
38 CatalogComponent::new("hub-spaces", "Spaces", HfComponentCategory::Hub)
39 .with_description("300K+ ML demos and apps")
40 .with_docs("https://huggingface.co/spaces")
41 .with_tags(&["hub", "spaces", "demos", "apps"])
42 .with_course(
43 CourseAlignment::new(5, 2)
44 .with_lessons(&["2.7", "2.8"])
45 .with_assets(&[AssetType::Video, AssetType::Lab]),
46 ),
47 );
48
49 self.add(
51 CatalogComponent::new(
52 "huggingface-hub",
53 "Hub Python Library",
54 HfComponentCategory::Hub,
55 )
56 .with_description("Python client to interact with the HuggingFace Hub")
57 .with_docs("https://huggingface.co/docs/huggingface_hub")
58 .with_repo("https://github.com/huggingface/huggingface_hub")
59 .with_pypi("huggingface-hub")
60 .with_tags(&["hub", "client", "python", "api"])
61 .with_course(
62 CourseAlignment::new(1, 1)
63 .with_lessons(&["1.1"])
64 .with_assets(&[AssetType::Reading]),
65 ),
66 );
67
68 self.add(
70 CatalogComponent::new("huggingface-js", "Huggingface.js", HfComponentCategory::Hub)
71 .with_description("JavaScript libraries for HuggingFace with TypeScript types")
72 .with_docs("https://huggingface.co/docs/huggingface.js")
73 .with_repo("https://github.com/huggingface/huggingface.js")
74 .with_npm("@huggingface/hub")
75 .with_tags(&["hub", "client", "javascript", "typescript"])
76 .with_course(
77 CourseAlignment::new(5, 3)
78 .with_lessons(&["3.6", "3.7"])
79 .with_assets(&[AssetType::Video, AssetType::Lab]),
80 ),
81 );
82
83 self.add(
85 CatalogComponent::new("tasks", "Tasks", HfComponentCategory::Hub)
86 .with_description("Explore demos, models, and datasets for any ML task")
87 .with_docs("https://huggingface.co/tasks")
88 .with_tags(&["hub", "tasks", "taxonomy"])
89 .with_course(
90 CourseAlignment::new(1, 3)
91 .with_lessons(&["3.7"])
92 .with_assets(&[AssetType::Reading]),
93 ),
94 );
95
96 self.add(
98 CatalogComponent::new("dataset-viewer", "Dataset Viewer", HfComponentCategory::Hub)
99 .with_description("API for metadata, stats, and content of Hub datasets")
100 .with_docs("https://huggingface.co/docs/dataset-viewer")
101 .with_tags(&["hub", "datasets", "api", "viewer"])
102 .with_course(
103 CourseAlignment::new(2, 1)
104 .with_lessons(&["1.2"])
105 .with_assets(&[AssetType::Lab]),
106 ),
107 );
108 }
109
110 pub(crate) fn register_deployment_components(&mut self) {
111 self.add(
113 CatalogComponent::new(
114 "inference-providers",
115 "Inference Providers",
116 HfComponentCategory::Deployment,
117 )
118 .with_description("Call 200k+ models hosted by 10+ inference partners")
119 .with_docs("https://huggingface.co/docs/api-inference")
120 .with_tags(&["inference", "api", "serverless"])
121 .with_course(
122 CourseAlignment::new(5, 1)
123 .with_lessons(&["1.6", "1.7"])
124 .with_assets(&[AssetType::Video, AssetType::Lab]),
125 ),
126 );
127
128 self.add(
130 CatalogComponent::new(
131 "inference-endpoints",
132 "Inference Endpoints",
133 HfComponentCategory::Deployment,
134 )
135 .with_description("Deploy models on dedicated & fully managed infrastructure")
136 .with_docs("https://huggingface.co/docs/inference-endpoints")
137 .with_tags(&["inference", "deployment", "dedicated", "managed"])
138 .with_course(
139 CourseAlignment::new(5, 2)
140 .with_lessons(&["2.1", "2.2", "2.4"])
141 .with_assets(&[AssetType::Video, AssetType::Lab]),
142 ),
143 );
144
145 self.add(
147 CatalogComponent::new(
148 "tgi",
149 "Text Generation Inference",
150 HfComponentCategory::Deployment,
151 )
152 .with_description("Serve language models with TGI optimized toolkit")
153 .with_docs("https://huggingface.co/docs/text-generation-inference")
154 .with_repo("https://github.com/huggingface/text-generation-inference")
155 .with_tags(&["inference", "llm", "serving", "tgi", "production"])
156 .with_deps(&["transformers"])
157 .with_course(
158 CourseAlignment::new(5, 1)
159 .with_lessons(&["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7"])
160 .with_assets(&[
161 AssetType::Video,
162 AssetType::Lab,
163 AssetType::Reading,
164 AssetType::Quiz,
165 ]),
166 ),
167 );
168
169 self.add(
171 CatalogComponent::new(
172 "tei",
173 "Text Embeddings Inference",
174 HfComponentCategory::Deployment,
175 )
176 .with_description("Serve embeddings models with TEI optimized toolkit")
177 .with_docs("https://huggingface.co/docs/text-embeddings-inference")
178 .with_repo("https://github.com/huggingface/text-embeddings-inference")
179 .with_tags(&["inference", "embeddings", "serving", "tei"])
180 .with_deps(&["sentence-transformers"]),
181 );
182
183 self.add(
185 CatalogComponent::new(
186 "aws-dlcs",
187 "AWS Deep Learning Containers",
188 HfComponentCategory::Deployment,
189 )
190 .with_description("Train/deploy models from HuggingFace to AWS with DLCs")
191 .with_docs("https://huggingface.co/docs/sagemaker")
192 .with_tags(&["aws", "sagemaker", "deployment", "cloud"]),
193 );
194
195 self.add(
197 CatalogComponent::new("azure", "Microsoft Azure", HfComponentCategory::Deployment)
198 .with_description("Deploy HuggingFace models on Microsoft Azure")
199 .with_docs("https://huggingface.co/docs/hub/azure")
200 .with_tags(&["azure", "deployment", "cloud"]),
201 );
202
203 self.add(
205 CatalogComponent::new("gcp", "Google Cloud", HfComponentCategory::Deployment)
206 .with_description("Train and deploy HuggingFace models on Google Cloud")
207 .with_docs("https://huggingface.co/docs/hub/google-cloud")
208 .with_tags(&["gcp", "deployment", "cloud"]),
209 );
210 }
211
212 pub(crate) fn register_library_components(&mut self) {
213 self.add(
215 CatalogComponent::new("transformers", "Transformers", HfComponentCategory::Library)
216 .with_description("State-of-the-art AI models for PyTorch, TensorFlow, JAX")
217 .with_docs("https://huggingface.co/docs/transformers")
218 .with_repo("https://github.com/huggingface/transformers")
219 .with_pypi("transformers")
220 .with_tags(&["models", "nlp", "vision", "audio", "multimodal"])
221 .with_deps(&["tokenizers", "safetensors", "huggingface-hub"])
222 .with_related(&["diffusers", "peft", "trl"])
223 .with_course(
224 CourseAlignment::new(1, 2)
225 .with_lessons(&["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8"])
226 .with_assets(&[
227 AssetType::Video,
228 AssetType::Lab,
229 AssetType::Reading,
230 AssetType::Quiz,
231 ]),
232 )
233 .with_course(
234 CourseAlignment::new(1, 3)
235 .with_lessons(&["3.1", "3.2", "3.3", "3.4", "3.5", "3.6"])
236 .with_assets(&[AssetType::Video, AssetType::Lab]),
237 ),
238 );
239
240 self.add(
242 CatalogComponent::new("diffusers", "Diffusers", HfComponentCategory::Library)
243 .with_description("State-of-the-art diffusion models in PyTorch")
244 .with_docs("https://huggingface.co/docs/diffusers")
245 .with_repo("https://github.com/huggingface/diffusers")
246 .with_pypi("diffusers")
247 .with_tags(&["diffusion", "image-generation", "stable-diffusion"])
248 .with_deps(&["transformers", "safetensors"]),
249 );
250
251 self.add(
253 CatalogComponent::new("datasets", "Datasets", HfComponentCategory::Library)
254 .with_description("Access & share datasets for any ML task")
255 .with_docs("https://huggingface.co/docs/datasets")
256 .with_repo("https://github.com/huggingface/datasets")
257 .with_pypi("datasets")
258 .with_tags(&["datasets", "data-loading", "preprocessing"])
259 .with_deps(&["huggingface-hub"])
260 .with_course(
261 CourseAlignment::new(2, 1)
262 .with_lessons(&["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7"])
263 .with_assets(&[
264 AssetType::Video,
265 AssetType::Lab,
266 AssetType::Reading,
267 AssetType::Quiz,
268 ]),
269 ),
270 );
271
272 self.add(
274 CatalogComponent::new(
275 "transformers-js",
276 "Transformers.js",
277 HfComponentCategory::Library,
278 )
279 .with_description("State-of-the-art ML running directly in your browser")
280 .with_docs("https://huggingface.co/docs/transformers.js")
281 .with_repo("https://github.com/xenova/transformers.js")
282 .with_npm("@xenova/transformers")
283 .with_tags(&["javascript", "browser", "wasm", "onnx"])
284 .with_course(
285 CourseAlignment::new(5, 3)
286 .with_lessons(&["3.6", "3.7"])
287 .with_assets(&[AssetType::Video, AssetType::Lab]),
288 ),
289 );
290
291 self.add(
293 CatalogComponent::new("tokenizers", "Tokenizers", HfComponentCategory::Library)
294 .with_description("Fast tokenizers optimized for research & production")
295 .with_docs("https://huggingface.co/docs/tokenizers")
296 .with_repo("https://github.com/huggingface/tokenizers")
297 .with_pypi("tokenizers")
298 .with_tags(&["tokenization", "bpe", "wordpiece", "sentencepiece"])
299 .with_course(
300 CourseAlignment::new(1, 2)
301 .with_lessons(&["2.4"])
302 .with_assets(&[AssetType::Reading]),
303 ),
304 );
305
306 self.add(
308 CatalogComponent::new("evaluate", "Evaluate", HfComponentCategory::Library)
309 .with_description("Evaluate and compare model performance")
310 .with_docs("https://huggingface.co/docs/evaluate")
311 .with_repo("https://github.com/huggingface/evaluate")
312 .with_pypi("evaluate")
313 .with_tags(&["evaluation", "metrics", "benchmarking"])
314 .with_course(
315 CourseAlignment::new(2, 3)
316 .with_lessons(&["3.1", "3.2", "3.3", "3.4"])
317 .with_assets(&[AssetType::Video, AssetType::Lab]),
318 ),
319 );
320
321 self.add(
323 CatalogComponent::new("timm", "timm", HfComponentCategory::Library)
324 .with_description("State-of-the-art vision models: layers, optimizers, utilities")
325 .with_docs("https://huggingface.co/docs/timm")
326 .with_repo("https://github.com/huggingface/pytorch-image-models")
327 .with_pypi("timm")
328 .with_tags(&["vision", "image-classification", "pretrained"])
329 .with_course(
330 CourseAlignment::new(1, 3)
331 .with_lessons(&["3.1", "3.2"])
332 .with_assets(&[AssetType::Video, AssetType::Lab]),
333 ),
334 );
335
336 self.add(
338 CatalogComponent::new(
339 "sentence-transformers",
340 "Sentence Transformers",
341 HfComponentCategory::Library,
342 )
343 .with_description("Embeddings, retrieval, and reranking")
344 .with_docs("https://www.sbert.net/")
345 .with_repo("https://github.com/UKPLab/sentence-transformers")
346 .with_pypi("sentence-transformers")
347 .with_tags(&["embeddings", "semantic-search", "retrieval", "rag"])
348 .with_deps(&["transformers"])
349 .with_course(
350 CourseAlignment::new(3, 2)
351 .with_lessons(&["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"])
352 .with_assets(&[
353 AssetType::Video,
354 AssetType::Lab,
355 AssetType::Reading,
356 AssetType::Discussion,
357 AssetType::Quiz,
358 ]),
359 ),
360 );
361
362 self.add(
364 CatalogComponent::new("kernels", "Kernels", HfComponentCategory::Library)
365 .with_description("Load and run compute kernels from the HuggingFace Hub")
366 .with_docs("https://huggingface.co/docs/kernels")
367 .with_tags(&["kernels", "cuda", "triton", "optimization"]),
368 );
369
370 self.add(
372 CatalogComponent::new("safetensors", "Safetensors", HfComponentCategory::Library)
373 .with_description("Safe way to store/distribute neural network weights")
374 .with_docs("https://huggingface.co/docs/safetensors")
375 .with_repo("https://github.com/huggingface/safetensors")
376 .with_pypi("safetensors")
377 .with_tags(&["serialization", "safe", "tensors", "format"])
378 .with_course(
379 CourseAlignment::new(1, 1)
380 .with_lessons(&["1.4"])
381 .with_assets(&[AssetType::Video]),
382 ),
383 );
384 }
385}