Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
{{guidance}}のガイダンス / Guidance of guidance
Search
Henry Cui
June 24, 2023
Programming
0
150
{{guidance}}のガイダンス / Guidance of guidance
Henry Cui
June 24, 2023
Tweet
Share
More Decks by Henry Cui
See All by Henry Cui
プロダクション言語モデルの情報を盗む攻撃 / Stealing Part of a Production Language Model
zchenry
0
170
Direct Preference Optimization
zchenry
0
350
Diffusion Model with Perceptual Loss
zchenry
0
340
レンズの下のLLM / LLM under the Lens
zchenry
0
170
Go with the Prompt Flow
zchenry
0
150
Mojo Dojo
zchenry
0
190
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
530
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
230
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
110
Other Decks in Programming
See All in Programming
Boast Code Party / RubyKaigi 2025 After Event
lemonade_37
0
110
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
890
note の Elasticsearch 更新系を支える技術
tchov
9
3.6k
マイコンでもRustのtestがしたい/KernelVM Kansai 11
tnishinaga
1
890
Browser and UI #2 HTML/ARIA
ken7253
2
180
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
3
2.1k
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
270
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
400
カウシェで Four Keys の改善を試みた理由
ike002jp
1
140
最速Green Tea 🍵 Garbage Collector
kuro_kurorrr
1
130
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
1.1k
Cursor/Devin全社導入の理想と現実
saitoryc
29
22k
Featured
See All Featured
Scaling GitHub
holman
459
140k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.3k
4 Signs Your Business is Dying
shpigford
183
22k
Speed Design
sergeychernyshev
29
940
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
We Have a Design System, Now What?
morganepeng
52
7.6k
Building Adaptive Systems
keathley
41
2.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
GitHub's CSS Performance
jonrohan
1031
460k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Transcript
{{guidance}}のガイダンス 機械学習の社会実装勉強会第24回 Henry 2023/6/24
背景 ▪ LLM (Large Language Model、大規模言語モデル)は世界を 席巻している ▪ OpenAIのChatGPT等だけでなく、オープンソースのLLMも含 めて、より効率的に扱うためのライブラリ
guidance がマイクロ ソフトが先日リリース ▪ langchainとsemantic-kernelがすでにある中で、guidanceに ついて見ていく 2
内容 ▪ テンプレート言語 ▪ 基本文法 ▪ gen関数 3
テンプレート言語 ▪ guidanceはHandlebarsというテンプレート言語を採用してい ます • しかし文法は完全に一致しているわけでもない ▪ Handlebarsは元々HTMLなどを構成するためのフロントエンド で使われるテンプレート言語 •
https://handlebarsjs.com/guide/#what-is-handlebars 4
基本文法 ▪ どのLLMを使うかを先に指定 • 後で引数として渡せるが、事前に指定したほうがわかりやすい ▪ テンプレートの文字列を渡して、オブジェクトを定義 • ここの自由度が高い •
入出力とgen関数 ▪ 呼び出して実行する 5
gen関数 ▪ gen関数に色々な引数が渡せる • name • stop • n •
temperature • max_tokens • … 6
まとめ ▪ LLMを扱うライブラリ guidance の紹介 ▪ 基本文法と肝心な関数の基本的な紹介 ▪ guidance の他の便利な機能やより高度な使い方も紹介した
い 7