Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
{{guidance}}のガイダンス / Guidance of guidance
Search
Henry Cui
June 24, 2023
Programming
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
{{guidance}}のガイダンス / Guidance of guidance
Henry Cui
June 24, 2023
More Decks by Henry Cui
See All by Henry Cui
プロダクション言語モデルの情報を盗む攻撃 / Stealing Part of a Production Language Model
zchenry
1
260
Direct Preference Optimization
zchenry
0
490
Diffusion Model with Perceptual Loss
zchenry
0
540
レンズの下のLLM / LLM under the Lens
zchenry
0
250
Go with the Prompt Flow
zchenry
0
260
Mojo Dojo
zchenry
0
290
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
770
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
350
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
230
Other Decks in Programming
See All in Programming
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
760
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
690
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
370
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
180
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
360
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
2
2.9k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
470
すこし踏み込む CancellationToken
htkym
2
1.7k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
速習iPhone Duo対応
yuukiw00w
2
980
sbt 2.0: takeoff
eed3si9n
0
120
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
310
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
Designing for humans not robots
tammielis
254
26k
Test your architecture with Archunit
thirion
2
2.4k
4 Signs Your Business is Dying
shpigford
187
23k
Navigating Weather and Climate Data
rabernat
0
550
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
RailsConf 2023
tenderlove
30
1.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Optimising Largest Contentful Paint
csswizardry
37
4k
Claude Code のすすめ
schroneko
67
230k
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