Building Machine Learning Apps with Hugging Face: LLMs to Diffusion Modeling

The seminar "Building Machine Learning Apps with Hugging Face: LLMs to Diffusion Modeling" from a few weeks ago from Hugging Face provides some interesting insights on LLMs to Diffusion Modeling.


History of MLOps

- Software is eating the world

- Deep learning is eating the world

- Transformers are eating the Deep learning

Underthehood, transfer learning is the key player for transformers eating the deep learning.


Transfer learning

There are many pre-trained models which have been trained on large-scale data that we cannot do by ourselves. But thankfully, we can use the output (the pre-trained models) for our tasks.

So nowadays, we can easily use those models, e.g., via Hugging Face, by following steps:

1. Identify the task matching the problem

- Text, Images, Speech

2. Pick a pre-trained SOTA 

- no need to build, label, and clean a large dataset

- 2 lines of code to download and test a model

3. If needed, fine-tune it on your dataset

        - build customized layers on top of pre-trained models for our needs

        - only train the parameters of the customized layers


Mission of Hugging Face: Democratize Good ML

        - open source, community, ethics-first


Some facts about Hugging Face

- Diffusers is growing faster than Transformers 

- 150k free public models

- Over 50% of Hub models are private 

- 1M model downloads/day

- How we make money? Sell compute services, expert support

- Get started with /tasks

- Bloomz from Bloom: an instruction fine-tuned open source LLM 

- Fast ControlNet: Guide image generation

- Mac app for that (Diffusers)

- Free diffusion course from Hugging Face (git)

- Javascript client - huggingface.js


Building ML with Hugging Face

- Explore models

- Manage your models (every model is on github)

- Collaborate

- Use


from transformers import pipeline

- pipeline - encapsulize all - text in text out


AutoTrain

- allows to train based on your data (pricing)


Spaces

- allows you to create your app 


Deploy models at scale

- headache about GPUs, CPUs, Docker containers etc.

- Inference Endpoints (we made models plug and play)


LLMs 3types

- Bloom, GPT

- Bloomz, GPT-3: intruction guided 

- ChatGPT: Human feedback (RL-based)


Pinecone: vector database company

ModelScope from text to generate video







No comments:

Post a Comment