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
110
{{guidance}}のガイダンス / Guidance of guidance
Henry Cui
June 24, 2023
Tweet
Share
More Decks by Henry Cui
See All by Henry Cui
Direct Preference Optimization
zchenry
0
140
Diffusion Model with Perceptual Loss
zchenry
0
72
レンズの下のLLM / LLM under the Lens
zchenry
0
98
Go with the Prompt Flow
zchenry
0
100
Mojo Dojo
zchenry
1
140
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
190
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
120
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
61
MLOps初心者がApache Airflowを触る / Apache Airflow Introduction for an MLOps Beginner
zchenry
0
160
Other Decks in Programming
See All in Programming
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
960
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
250
Code Reviews
bkuhlmann
4
890
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
970
Ruby GitHub Packages
bkuhlmann
0
630
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
7
980
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.5k
エンターテイメント業界で利用されるAWS
demuyan
0
210
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Goのmultiple errorsについて (2024年4月版)
syumai
4
970
Featured
See All Featured
Bash Introduction
62gerente
604
210k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
GitHub's CSS Performance
jonrohan
1025
450k
Agile that works and the tools we love
rasmusluckow
325
20k
A Tale of Four Properties
chriscoyier
151
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
YesSQL, Process and Tooling at Scale
rocio
164
13k
How to train your dragon (web standard)
notwaldorf
73
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Fireside Chat
paigeccino
21
2.6k
5 minutes of I Can Smell Your CMS
philhawksworth
199
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