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
130
{{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
0
34
Direct Preference Optimization
zchenry
0
230
Diffusion Model with Perceptual Loss
zchenry
0
140
レンズの下のLLM / LLM under the Lens
zchenry
0
130
Go with the Prompt Flow
zchenry
0
110
Mojo Dojo
zchenry
1
160
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
280
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
140
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
70
Other Decks in Programming
See All in Programming
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Activities at Cairo Library
cairolibrary720
0
1.2k
リハビリmruby
kishima
1
160
20240706_CDKConf
takuyay0ne
0
1.2k
Advanced App Shrinking Techniques
cbeyls
2
150
Clean Architecture by TypeScript & NestJS
ryounasso
0
150
初心者がおさえておきたいAWS CDKのベストプラクティス 2024
konokenj
15
7.3k
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
AHC035解説
terryu16
0
730
Terraformテスト入門
msato
0
540
わかりやすい正解を捨てて、コトに向き合う - スクラムフェス金沢2024 スポンサーセッション
yusukekokubo
0
170
CSC307 Lecture 14
javiergs
PRO
0
220
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
360
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
29k
[RailsConf 2023] Rails as a piece of cake
palkan
35
4.4k
GraphQLの誤解/rethinking-graphql
sonatard
59
9.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
YesSQL, Process and Tooling at Scale
rocio
166
14k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Web development in the modern age
philhawksworth
203
10k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Done Done
chrislema
179
15k
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