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
170
{{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
1
210
Direct Preference Optimization
zchenry
0
380
Diffusion Model with Perceptual Loss
zchenry
0
410
レンズの下のLLM / LLM under the Lens
zchenry
0
190
Go with the Prompt Flow
zchenry
0
170
Mojo Dojo
zchenry
0
220
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
580
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
260
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
130
Other Decks in Programming
See All in Programming
個人軟體時代
ethanhuang13
0
310
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.8k
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.2k
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
240
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
270
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
260
私の後悔をAWS DMSで解決した話
hiramax
4
190
速いWebフレームワークを作る
yusukebe
5
1.7k
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
150
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
1k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
910
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Statistics for Hackers
jakevdp
799
220k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
KATA
mclloyd
32
14k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Side Projects
sachag
455
43k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
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