Skip to main content

batuta/hf/catalog/
registry_extended.rs

1//! Extended component registration for the HuggingFace Ecosystem Catalog
2//!
3//! Contains Training, Collaboration, Community, and Integration component definitions.
4
5use super::core::HfCatalog;
6use super::types::{AssetType, CatalogComponent, CourseAlignment, HfComponentCategory};
7
8impl HfCatalog {
9    pub(crate) fn register_training_components(&mut self) {
10        // PEFT
11        self.add(
12            CatalogComponent::new("peft", "PEFT", HfComponentCategory::Training)
13                .with_description("Parameter-efficient finetuning for large language models")
14                .with_docs("https://huggingface.co/docs/peft")
15                .with_repo("https://github.com/huggingface/peft")
16                .with_pypi("peft")
17                .with_tags(&["finetuning", "lora", "qlora", "efficient"])
18                .with_deps(&["transformers", "bitsandbytes"])
19                .with_course(
20                    CourseAlignment::new(4, 1)
21                        .with_lessons(&["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8"])
22                        .with_assets(&[
23                            AssetType::Video,
24                            AssetType::Lab,
25                            AssetType::Reading,
26                            AssetType::Quiz,
27                        ]),
28                ),
29        );
30
31        // Accelerate
32        self.add(
33            CatalogComponent::new("accelerate", "Accelerate", HfComponentCategory::Training)
34                .with_description("Train PyTorch models with multi-GPU, TPU, mixed precision")
35                .with_docs("https://huggingface.co/docs/accelerate")
36                .with_repo("https://github.com/huggingface/accelerate")
37                .with_pypi("accelerate")
38                .with_tags(&["distributed", "multi-gpu", "tpu", "mixed-precision"])
39                .with_course(
40                    CourseAlignment::new(1, 2)
41                        .with_lessons(&["2.8"])
42                        .with_assets(&[AssetType::Lab]),
43                ),
44        );
45
46        // Optimum
47        self.add(
48            CatalogComponent::new("optimum", "Optimum", HfComponentCategory::Training)
49                .with_description("Optimize HF Transformers for faster training/inference")
50                .with_docs("https://huggingface.co/docs/optimum")
51                .with_repo("https://github.com/huggingface/optimum")
52                .with_pypi("optimum")
53                .with_tags(&["optimization", "onnx", "quantization", "hardware"])
54                .with_deps(&["transformers"])
55                .with_course(
56                    CourseAlignment::new(5, 3)
57                        .with_lessons(&["3.1", "3.2", "3.3", "3.4", "3.5"])
58                        .with_assets(&[AssetType::Video, AssetType::Lab, AssetType::Reading]),
59                ),
60        );
61
62        // AWS Trainium/Inferentia
63        self.add(
64            CatalogComponent::new(
65                "aws-trainium",
66                "AWS Trainium & Inferentia",
67                HfComponentCategory::Training,
68            )
69            .with_description("Train/deploy Transformers/Diffusers on AWS custom silicon")
70            .with_docs("https://huggingface.co/docs/optimum-neuron")
71            .with_pypi("optimum-neuron")
72            .with_tags(&["aws", "trainium", "inferentia", "hardware"]),
73        );
74
75        // Google TPUs
76        self.add(
77            CatalogComponent::new("tpu", "Google TPUs", HfComponentCategory::Training)
78                .with_description("Train and deploy models on Google TPUs via Optimum")
79                .with_docs("https://huggingface.co/docs/optimum-tpu")
80                .with_tags(&["gcp", "tpu", "hardware"]),
81        );
82
83        // TRL
84        self.add(
85            CatalogComponent::new("trl", "TRL", HfComponentCategory::Training)
86                .with_description("Train transformer LMs with reinforcement learning")
87                .with_docs("https://huggingface.co/docs/trl")
88                .with_repo("https://github.com/huggingface/trl")
89                .with_pypi("trl")
90                .with_tags(&["rlhf", "dpo", "ppo", "alignment", "sft"])
91                .with_deps(&["transformers", "peft"])
92                .with_course(
93                    CourseAlignment::new(4, 2)
94                        .with_lessons(&["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"])
95                        .with_assets(&[
96                            AssetType::Video,
97                            AssetType::Lab,
98                            AssetType::Reading,
99                            AssetType::Discussion,
100                            AssetType::Quiz,
101                        ]),
102                )
103                .with_course(
104                    CourseAlignment::new(4, 3)
105                        .with_lessons(&["3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8"])
106                        .with_assets(&[
107                            AssetType::Video,
108                            AssetType::Lab,
109                            AssetType::Reading,
110                            AssetType::Quiz,
111                        ]),
112                ),
113        );
114
115        // Bitsandbytes
116        self.add(
117            CatalogComponent::new("bitsandbytes", "Bitsandbytes", HfComponentCategory::Training)
118                .with_description("Optimize and quantize models with bitsandbytes")
119                .with_docs("https://huggingface.co/docs/bitsandbytes")
120                .with_repo("https://github.com/TimDettmers/bitsandbytes")
121                .with_pypi("bitsandbytes")
122                .with_tags(&["quantization", "4bit", "8bit", "nf4", "qlora"])
123                .with_course(
124                    CourseAlignment::new(4, 1)
125                        .with_lessons(&["1.4", "1.5"])
126                        .with_assets(&[AssetType::Video, AssetType::Lab]),
127                ),
128        );
129
130        // Lighteval
131        self.add(
132            CatalogComponent::new("lighteval", "Lighteval", HfComponentCategory::Training)
133                .with_description("All-in-one toolkit to evaluate LLMs across multiple backends")
134                .with_docs("https://huggingface.co/docs/lighteval")
135                .with_repo("https://github.com/huggingface/lighteval")
136                .with_pypi("lighteval")
137                .with_tags(&["evaluation", "llm", "benchmarking"]),
138        );
139
140        // Trainer API
141        self.add(
142            CatalogComponent::new("trainer", "Trainer API", HfComponentCategory::Training)
143                .with_description("High-level training loops for transformers models")
144                .with_docs("https://huggingface.co/docs/transformers/main_classes/trainer")
145                .with_tags(&["training", "api", "loops"])
146                .with_deps(&["transformers", "datasets"])
147                .with_course(
148                    CourseAlignment::new(2, 2)
149                        .with_lessons(&["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8"])
150                        .with_assets(&[
151                            AssetType::Video,
152                            AssetType::Lab,
153                            AssetType::Reading,
154                            AssetType::Quiz,
155                        ]),
156                ),
157        );
158
159        // AutoTrain
160        self.add(
161            CatalogComponent::new("autotrain", "AutoTrain", HfComponentCategory::Training)
162                .with_description("AutoTrain API and UI for seamless model training")
163                .with_docs("https://huggingface.co/docs/autotrain")
164                .with_repo("https://github.com/huggingface/autotrain-advanced")
165                .with_pypi("autotrain-advanced")
166                .with_tags(&["automl", "no-code", "training"]),
167        );
168    }
169
170    pub(crate) fn register_collaboration_components(&mut self) {
171        // Gradio
172        self.add(
173            CatalogComponent::new("gradio", "Gradio", HfComponentCategory::Collaboration)
174                .with_description("Build ML demos and web apps with a few lines of Python")
175                .with_docs("https://www.gradio.app/docs")
176                .with_repo("https://github.com/gradio-app/gradio")
177                .with_pypi("gradio")
178                .with_tags(&["demos", "ui", "web-apps", "interactive"])
179                .with_course(
180                    CourseAlignment::new(5, 2)
181                        .with_lessons(&["2.5", "2.6", "2.7", "2.8"])
182                        .with_assets(&[AssetType::Video, AssetType::Lab, AssetType::Quiz]),
183                ),
184        );
185
186        // Trackio
187        self.add(
188            CatalogComponent::new("trackio", "Trackio", HfComponentCategory::Collaboration)
189                .with_description("Lightweight, local-first experiment tracking library")
190                .with_docs("https://huggingface.co/docs/trackio")
191                .with_pypi("trackio")
192                .with_tags(&["experiment-tracking", "logging", "local"]),
193        );
194
195        // smolagents
196        self.add(
197            CatalogComponent::new("smolagents", "smolagents", HfComponentCategory::Collaboration)
198                .with_description("Smol library to build great agents in Python")
199                .with_docs("https://huggingface.co/docs/smolagents")
200                .with_repo("https://github.com/huggingface/smolagents")
201                .with_pypi("smolagents")
202                .with_tags(&["agents", "tools", "llm"]),
203        );
204
205        // LeRobot
206        self.add(
207            CatalogComponent::new("lerobot", "LeRobot", HfComponentCategory::Collaboration)
208                .with_description("Making AI for Robotics more accessible with end-to-end learning")
209                .with_docs("https://huggingface.co/docs/lerobot")
210                .with_repo("https://github.com/huggingface/lerobot")
211                .with_pypi("lerobot")
212                .with_tags(&["robotics", "embodied-ai", "imitation-learning"]),
213        );
214
215        // Chat UI
216        self.add(
217            CatalogComponent::new("chat-ui", "Chat UI", HfComponentCategory::Collaboration)
218                .with_description("Open source chat frontend powering HuggingChat")
219                .with_docs("https://huggingface.co/docs/chat-ui")
220                .with_repo("https://github.com/huggingface/chat-ui")
221                .with_tags(&["chat", "ui", "frontend", "huggingchat"]),
222        );
223
224        // Leaderboards
225        self.add(
226            CatalogComponent::new(
227                "leaderboards",
228                "Leaderboards",
229                HfComponentCategory::Collaboration,
230            )
231            .with_description("Create custom leaderboards on HuggingFace")
232            .with_docs("https://huggingface.co/docs/leaderboards")
233            .with_tags(&["leaderboards", "benchmarking", "comparison"]),
234        );
235
236        // Argilla
237        self.add(
238            CatalogComponent::new("argilla", "Argilla", HfComponentCategory::Collaboration)
239                .with_description("Collaboration tool for building high-quality datasets")
240                .with_docs("https://docs.argilla.io/")
241                .with_repo("https://github.com/argilla-io/argilla")
242                .with_pypi("argilla")
243                .with_tags(&["annotation", "labeling", "data-quality"]),
244        );
245
246        // Distilabel
247        self.add(
248            CatalogComponent::new("distilabel", "Distilabel", HfComponentCategory::Collaboration)
249                .with_description("Framework for synthetic data generation and AI feedback")
250                .with_docs("https://distilabel.argilla.io/")
251                .with_repo("https://github.com/argilla-io/distilabel")
252                .with_pypi("distilabel")
253                .with_tags(&["synthetic-data", "ai-feedback", "data-generation"]),
254        );
255    }
256
257    pub(crate) fn register_community_components(&mut self) {
258        // Blog
259        self.add(
260            CatalogComponent::new("blog", "Blog", HfComponentCategory::Community)
261                .with_description("HuggingFace official blog with tutorials and announcements")
262                .with_docs("https://huggingface.co/blog")
263                .with_tags(&["blog", "tutorials", "announcements"]),
264        );
265
266        // Learn
267        self.add(
268            CatalogComponent::new("learn", "Learn", HfComponentCategory::Community)
269                .with_description("HuggingFace learning resources and courses")
270                .with_docs("https://huggingface.co/learn")
271                .with_tags(&["learning", "courses", "education"]),
272        );
273
274        // Discord
275        self.add(
276            CatalogComponent::new("discord", "Discord", HfComponentCategory::Community)
277                .with_description("HuggingFace community Discord server")
278                .with_docs("https://discord.gg/huggingface")
279                .with_tags(&["community", "discord", "chat"]),
280        );
281
282        // Forum
283        self.add(
284            CatalogComponent::new("forum", "Forum", HfComponentCategory::Community)
285                .with_description("HuggingFace discussion forum")
286                .with_docs("https://discuss.huggingface.co/")
287                .with_tags(&["community", "forum", "discussion"]),
288        );
289
290        // Open LLM Leaderboard
291        self.add(
292            CatalogComponent::new(
293                "open-llm-leaderboard",
294                "Open LLM Leaderboard",
295                HfComponentCategory::Community,
296            )
297            .with_description("Track and compare open-source LLM performance")
298            .with_docs("https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard")
299            .with_tags(&["leaderboard", "llm", "benchmarking", "evaluation"])
300            .with_related(&["lighteval", "leaderboards"]),
301        );
302
303        // Arena
304        self.add(
305            CatalogComponent::new("arena", "Chatbot Arena", HfComponentCategory::Community)
306                .with_description("Anonymous LLM benchmark via human preference voting")
307                .with_docs("https://lmarena.ai/")
308                .with_tags(&["arena", "llm", "human-preference", "elo"])
309                .with_related(&["open-llm-leaderboard"]),
310        );
311    }
312
313    pub(crate) fn register_integration_components(&mut self) {
314        // Outlines
315        self.add(
316            CatalogComponent::new("outlines", "Outlines", HfComponentCategory::Collaboration)
317                .with_description("Structured text generation with grammar constraints")
318                .with_docs("https://outlines-dev.github.io/outlines/")
319                .with_repo("https://github.com/outlines-dev/outlines")
320                .with_pypi("outlines")
321                .with_tags(&["structured-output", "json", "grammar", "constrained-generation"])
322                .with_deps(&["transformers"])
323                .with_course(
324                    CourseAlignment::new(3, 2)
325                        .with_lessons(&["2.5"])
326                        .with_assets(&[AssetType::Lab]),
327                ),
328        );
329
330        // Wandb
331        self.add(
332            CatalogComponent::new("wandb", "Weights & Biases", HfComponentCategory::Collaboration)
333                .with_description("Experiment tracking, visualization, and model registry")
334                .with_docs("https://docs.wandb.ai/")
335                .with_pypi("wandb")
336                .with_tags(&["experiment-tracking", "logging", "mlops", "visualization"])
337                .with_course(
338                    CourseAlignment::new(2, 2)
339                        .with_lessons(&["2.5"])
340                        .with_assets(&[AssetType::Lab]),
341                ),
342        );
343
344        // FAISS
345        self.add(
346            CatalogComponent::new("faiss", "FAISS", HfComponentCategory::Collaboration)
347                .with_description(
348                    "Facebook's efficient similarity search and clustering of dense vectors",
349                )
350                .with_docs("https://faiss.ai/")
351                .with_repo("https://github.com/facebookresearch/faiss")
352                .with_pypi("faiss-cpu")
353                .with_tags(&["vector-search", "similarity", "indexing", "rag"])
354                .with_course(
355                    CourseAlignment::new(3, 2)
356                        .with_lessons(&["2.3", "2.4"])
357                        .with_assets(&[AssetType::Video, AssetType::Lab]),
358                ),
359        );
360    }
361}