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
390
Diffusion Model with Perceptual Loss
zchenry
0
420
レンズの下の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
590
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
260
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
130
Other Decks in Programming
See All in Programming
Swift Concurrency - 状態監視の罠
objectiveaudio
2
480
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
1.1k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
940
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.3k
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
380
CSC305 Lecture 02
javiergs
PRO
1
260
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
140
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
200
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
8
4.7k
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
640
止められない医療アプリ、そっと Swift 6 へ
medley
1
130
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Speed Design
sergeychernyshev
32
1.1k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
Documentation Writing (for coders)
carmenintech
75
5k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
What's in a price? How to price your products and services
michaelherold
246
12k
A Tale of Four Properties
chriscoyier
160
23k
Become a Pro
speakerdeck
PRO
29
5.5k
Code Review Best Practice
trishagee
72
19k
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