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
200
Direct Preference Optimization
zchenry
0
380
Diffusion Model with Perceptual Loss
zchenry
0
400
レンズの下のLLM / LLM under the Lens
zchenry
0
180
Go with the Prompt Flow
zchenry
0
160
Mojo Dojo
zchenry
0
210
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
580
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
250
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
120
Other Decks in Programming
See All in Programming
DataformでPythonする / dataform-de-python
snhryt
0
160
AIコーディングエージェント全社導入とセキュリティ対策
hikaruegashira
16
9.7k
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
0
200
GitHub Copilotの全体像と活用のヒント AI駆動開発の最初の一歩
74th
7
2.5k
新しいモバイルアプリ勉強会(仮)について
uetyo
1
250
あのころの iPod を どうにか再生させたい
orumin
2
2.4k
一人でAIプロダクトを作るための工夫 〜技術選定・開発プロセス編〜 / I want AI to work harder
rkaga
12
2.5k
Bedrock AgentCore ObservabilityによるAIエージェントの運用
licux
9
620
なぜあなたのオブザーバビリティ導入は頓挫するのか
ryota_hnk
5
590
iOS開発スターターキットの作り方
akidon0000
0
240
構文解析器入門
ydah
7
2.1k
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
130
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Speed Design
sergeychernyshev
32
1.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Docker and Python
trallard
45
3.5k
Practical Orchestrator
shlominoach
190
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Thoughts on Productivity
jonyablonski
69
4.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
A better future with KSS
kneath
239
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
880
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
760
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