<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TGI on YennJ12 Engineering Blog</title><link>https://yennj12.js.org/yennj12_blog_V4/tags/tgi/</link><description>Recent content in TGI on YennJ12 Engineering Blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 14 Aug 2026 09:00:00 +0800</lastBuildDate><atom:link href="https://yennj12.js.org/yennj12_blog_V4/tags/tgi/feed.xml" rel="self" type="application/rss+xml"/><item><title>Hugging Face 實戰（二）：用模型、跑 App、推送自己的模型</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/hugging-face-part2-use-and-push-models-zh/</link><pubDate>Fri, 14 Aug 2026 09:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/hugging-face-part2-use-and-push-models-zh/</guid><description>大多數人挑模型的方式是看 Trending 第一名，然後 from_pretrained 下去。 正確答案是：先確定 VRAM 上限與授權條款，再從那個交集裡挑排行最高的。 大多數人把 pipeline 包進 Flask 就當作上線了。 正確答案是：那個架構在第 5 個並發請求就會開始排隊，而你需要的是 continuous batching。
上一篇我們把環境架好、跑出第一個結果。這一篇處理三件實際工作：挑對模型、把它變成別人能用的服務、把自己訓練的成果推回 Hub。
一、選模型：從兩百萬個 repo 中挑對那一個 1.1 四道篩選器，順序不能顛倒 2,000,000+ 個模型 │ ▼ ┌──────────────────────────────────────────────┐ │ 篩選 1：任務類型（pipeline_tag） │ → 剩約 5% │ text-generation / embeddings / ASR / … │ └──────────────┬───────────────────────────────┘ ▼ ┌──────────────────────────────────────────────┐ │ 篩選 2：VRAM 是否放得下（硬限制） │ → 剩約 1% │ 參數量 × dtype bytes × 1.2 ≤ 你的 VRAM │ └──────────────┬───────────────────────────────┘ ▼ ┌──────────────────────────────────────────────┐ │ 篩選 3：授權是否允許你的用途（法務限制） │ → 剩約 0.</description></item></channel></rss>