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
130
Direct Preference Optimization
zchenry
0
340
Diffusion Model with Perceptual Loss
zchenry
0
310
レンズの下の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
480
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
210
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
97
Other Decks in Programming
See All in Programming
オレを救った Cline を紹介する
codehex
16
15k
読もう! Android build ドキュメント
andpad
1
140
Learning Kotlin with detekt
inouehi
1
240
Rubyと自由とAIと
yotii23
6
2k
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
270
Accelerate your key learnings of scaling modern Android apps
aldefy
0
100
バッチを作らなきゃとなったときに考えること
irof
2
590
若手バックエンドエンジニアが Elasticsearch を使ってみた話
hott0mott0
1
110
読まないコードリーディング術
hisaju
1
160
ステートソーシング型イベント駆動の視点で捉えるCQRS+ES
shinnosuke0522
0
110
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
190
Boost Your Web Performance with Hyperdrive
chimame
1
180
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Code Review Best Practice
trishagee
67
18k
4 Signs Your Business is Dying
shpigford
183
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
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