入門 · 免費 · 建議先修 Python

Hugging Face 入門與應用

免費公開課 · 雙語 · 聯絡 psyche@mail.grokbot.com

初學貼士

初學貼士

  • 先看大綱再動手;每完成一節就勾進度。
  • 英文版按右上 EN/中。
  • 示範登入:demo@cyberai.hk/demo123 可試進度。

課節進度

開始學習吧!勾選完成的課節。

0% 完成(0/5 課節)

  • 11. Hugging Face 是什麼
  • 22. Hub:模型/資料集/Spaces
  • 33. Transformers 快速上手
  • 44. 推論:本機與 Inference API
  • 55. 官方連結與社群

提示:點擊課節即可標記/取消(存於本機)。

一句話:開源 ML/AI 生態與模型中心。

相關:LLM/DL/ML/LangChain/Ollama。

1. Hugging Face 是什麼?

  • Hub
  • 函式庫
  • Spaces
  • 推論服務

2. Hub:模型/資料集/Spaces

  1. 瀏覽模型
  2. 讀模型卡
  3. 資料集
  4. Spaces

功課:選小模型+試一個 Space。

3. Transformers 快速上手

# pip install transformers torch  # or tensorflow / flax per docs
from transformers import pipeline

pipe = pipeline("sentiment-analysis")
print(pipe("CyberAI Academy is helpful!"))

# LLM-style (model id from the Hub; needs enough RAM/VRAM)
# gen = pipeline("text-generation", model="gpt2")
# print(gen("Once upon a time", max_new_tokens=40))
  • 先 pipeline
  • 大模型可走 Ollama/API
  • Colab 試跑

4. 推論:本機與 Inference API

本機HF 雲端
隱私不出機上傳雲端
成本硬體用量
上手安裝Token

可接 LangChain。

← 返回首頁 · LangChain · OpenAI · LLM

課程完成標記

登入會員後可將整門課標記完成並同步至儀表板。