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
220
Direct Preference Optimization
zchenry
0
400
Diffusion Model with Perceptual Loss
zchenry
0
440
レンズの下のLLM / LLM under the Lens
zchenry
0
190
Go with the Prompt Flow
zchenry
0
170
Mojo Dojo
zchenry
0
230
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
610
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
270
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
150
Other Decks in Programming
See All in Programming
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
160
AIを駆使して新しい技術を効率的に理解する方法
nogu66
0
590
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
400
外接に惑わされない自システムの処理時間SLIをOpenTelemetryで実現した話
kotaro7750
0
240
CSC509 Lecture 11
javiergs
PRO
0
300
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
490
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
8
1.4k
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
130
CSC509 Lecture 09
javiergs
PRO
0
290
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
100
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
130
Dive into Triton Internals
appleparan
0
480
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Agile that works and the tools we love
rasmusluckow
331
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Producing Creativity
orderedlist
PRO
348
40k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Done Done
chrislema
186
16k
Designing Experiences People Love
moore
142
24k
How STYLIGHT went responsive
nonsquared
100
5.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
The Pragmatic Product Professional
lauravandoore
36
7k
KATA
mclloyd
PRO
32
15k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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