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
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
280
rage against annotate_predecessor
junk0612
0
160
時間軸から考えるTerraformを使う理由と留意点
fufuhu
14
4.4k
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
430
🔨 小さなビルドシステムを作る
momeemt
3
660
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
870
Swift Updates - Learn Languages 2025
koher
2
450
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
740
More Approvers for Greater OSS and Japan Community
tkikuc
1
110
旅行プランAIエージェント開発の裏側
ippo012
2
850
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.6k
Bash Introduction
62gerente
615
210k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
Practical Orchestrator
shlominoach
190
11k
Scaling GitHub
holman
463
140k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
For a Future-Friendly Web
brad_frost
180
9.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
187
54k
Why Our Code Smells
bkeepers
PRO
339
57k
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