SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
BERTをブラウザで動かしたい!
―MobileBERTとTensorFlow.js―
本⽥ 志温
@shion_honda
発表内容
• TensorFlow.jsのMobileBERT Q&A モデルの紹介
• デモ
• 応⽤例(プロトタイプ)の紹介
• MobileBERTとは
• TensorFlow.js Q&Aモデル
2
⾃⼰紹介
3
• 本⽥ 志温(ほんだ しおん)
• データサイエンティストっぽい仕事@リクルートライフスタイル
• 3⽉までは東京⼤学⼤学院にてAI創薬の研究
• これまでも[cv/nl]paper.challengeで何度か発表してきました
• ブログ: https://hippocampus-garden.com/
MobileBERT Q&A モデルのデモ
https://muppet.fandom.com/wiki/Bert
4
Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In
contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions.
His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz),
consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet
pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers.
Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh.
While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable
exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello"
with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John.
Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The
Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling.
Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives,
including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The
album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm.
Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to
Sesame Street, a special sneak preview special promoting Sesame Street.
Passage (289 words)
Question #1
5
Question: Where does Bert live?
Answer #1: 正解
https://muppet.fandom.com/wiki/Bert
6
Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In
contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions.
His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz),
consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet
pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers.
Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh.
While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable
exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello"
with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John.
Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The
Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling.
Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives,
including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The
album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm.
Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to
Sesame Street, a special sneak preview special promoting Sesame Street.
Answer: 123 Sesame Street
Question #2
7
Question: What does Bert like to collect?
Answer #2: 正解
https://muppet.fandom.com/wiki/Bert
8
Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In
contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions.
His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz),
consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet
pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers.
Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh.
While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable
exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello"
with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John.
Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The
Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling.
Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives,
including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The
album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm.
Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to
Sesame Street, a special sneak preview special promoting Sesame Street.
Answer: paper clips and bottle caps
Question #3
9
Question: Who is the best friend of Ernie?
Answer #3: 不正解
https://muppet.fandom.com/wiki/Bert
10
Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In
contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions.
His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz),
consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet
pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers.
Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh.
While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable
exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello"
with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John.
Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The
Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling.
Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives,
including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The
album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm.
Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to
Sesame Street, a special sneak preview special promoting Sesame Street.
Answer: (No Answer) *SQuADにはNo Answerの問題がある
MobileBERT Q&A モデル 実⽤例
11
ブラウザのページ内検索(Ctrl+F)に質問を⼊⼒できる
Chrome拡張機能のプロトタイプ.
Google Developers Japan: ブラウザと Tensorflow.js を使った BERT の活⽤⽅法を考える より.
常に上⼿くいくわけではない
12
https://www.bedbathandbeyond.com/store/product/kitchenaid-reg-5-speed-diamond-blender/3242409
質問 What is the pitcher made of?
正答 BPA-free polycarbonate pitcher
BERT Ice mode pulses at staggered intervals to uniformly crush a pitcher of ice in seconds
MobileBERTとは
13
モバイル端末向けに, 汎⽤性と精度はそのままに
軽量化・⾼速化を⾏ったBERT
ボトルネック型
(アーキテクチャの⼯夫)
Progressive knowledge transfer
(学習⽅法の⼯夫)
→ 汎化性能と各タスクでの精度を保ちつつ, BERT BASEの4倍⾼速
学習⽅法(蒸留)の⼯夫
14
• ⼩さいモデルをスクラッチで訓練してもうまくいかないため,
BERT Largeからの蒸留を採⽤
• Progressive Knowledge Transfer: 下層から順に⼀層ずつ訓練
• 各層の特徴マップと注意マップを近づけていく
• Pre-training Distilation: PKTの後にMLMの出⼒を合わせるような訓
練も⾏う
アーキテクチャの⼯夫
15
BERT Large IB-BERT
(Teacher)
MobileBERT
(Student)
• PKTのために, 教師と⽣徒で各層の⼊出⼒サイズは⼀致させな
ければならない
• 教師は逆ボトルネック型にして, 性能を維持しつつ⼊出⼒サイズ縮⼩
• ⽣徒はボトルネック型にして, ⼊出⼒サイズを保ちつつモデル圧縮
性能評価
16
ハイパラ探索の結果, 以下の設定を採⽤
x0.25
GLUE SQuAD
BERT BASEの4倍⾼速 (367ms)
汎化性能と各タスクの精度も維持 *BERT LARGEには負けている
TensorFlow.jsとは
• ブラウザで機械学習を実⾏するためのJavaScriptライブラリ
• GPUはWebGL経由で使える
• TensorFlowやKerasの学習済みモデルをインポートできる
• React Nativeもサポート
17
TensorFlow.js Q&Aモデルの使い⽅
18
https://github.com/tensorflow/tfjs-models/tree/master/qna
SQuAD 1.1でファインチューニング済みのBERTを呼ぶだけ
おまけ: Q&A以外の学習済みモデル
19
姿勢推定 (PoseNet) 有害テキストの検出
他にも⾳声コマンド認識など
ブラウザで動く機械学習アプリケーションが作れる!
https://www.tensorflow.org/js/models
20
BERTを使ってアプリケーションを
作ってみよう!t
https://muppet.fandom.com/wiki/Bert
参考⽂献など
[1] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, Denny Zhou. “MobileBERT:
a Compact Task-Agnostic BERT for Resource-Limited Devices.” ACL. 2020.
[2] Google Developers Japan: ブラウザと Tensorflow.js を使った BERT の活⽤⽅法を考える
[3] MobileBERT Q&Aモデルのデモ
[4] tfjs-models/qna at master · tensorflow/tfjs-models
[5] Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova. “BERT: Pre-training of Deep
Bidirectional Transformers for Language Understanding.” NACCL. 2019.
[6] アバター: Ultraman Mebius by sousaguilherme5
21

Más contenido relacionado

La actualidad más candente

20090924 姿勢推定と回転行列
20090924 姿勢推定と回転行列20090924 姿勢推定と回転行列
20090924 姿勢推定と回転行列Toru Tamaki
 
LiDAR点群とSfM点群との位置合わせ
LiDAR点群とSfM点群との位置合わせLiDAR点群とSfM点群との位置合わせ
LiDAR点群とSfM点群との位置合わせTakuya Minagawa
 
画像処理ライブラリ OpenCV で 出来ること・出来ないこと
画像処理ライブラリ OpenCV で 出来ること・出来ないこと画像処理ライブラリ OpenCV で 出来ること・出来ないこと
画像処理ライブラリ OpenCV で 出来ること・出来ないことNorishige Fukushima
 
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9Kazuhiro Ota
 
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCHDeep Learning JP
 
PRML輪読#1
PRML輪読#1PRML輪読#1
PRML輪読#1matsuolab
 
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)Yusuke Uchida
 
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​SSII
 
最近のディープラーニングのトレンド紹介_20200925
最近のディープラーニングのトレンド紹介_20200925最近のディープラーニングのトレンド紹介_20200925
最近のディープラーニングのトレンド紹介_20200925小川 雄太郎
 
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介Ryohei Ueda
 
【CVPR 2020 メタサーベイ】Image Retrieval
【CVPR 2020 メタサーベイ】Image Retrieval【CVPR 2020 メタサーベイ】Image Retrieval
【CVPR 2020 メタサーベイ】Image Retrievalcvpaper. challenge
 
CV分野におけるサーベイ方法
CV分野におけるサーベイ方法CV分野におけるサーベイ方法
CV分野におけるサーベイ方法Hirokatsu Kataoka
 
Sift特徴量について
Sift特徴量についてSift特徴量について
Sift特徴量についてla_flance
 
mROS:組込みデバイス向けのROS1ノード軽量実行環境
mROS:組込みデバイス向けのROS1ノード軽量実行環境mROS:組込みデバイス向けのROS1ノード軽量実行環境
mROS:組込みデバイス向けのROS1ノード軽量実行環境Hideki Takase
 
最適化超入門
最適化超入門最適化超入門
最適化超入門Takami Sato
 
3次元レジストレーション(PCLデモとコード付き)
3次元レジストレーション(PCLデモとコード付き)3次元レジストレーション(PCLデモとコード付き)
3次元レジストレーション(PCLデモとコード付き)Toru Tamaki
 
画像認識モデルを作るための鉄板レシピ
画像認識モデルを作るための鉄板レシピ画像認識モデルを作るための鉄板レシピ
画像認識モデルを作るための鉄板レシピTakahiro Kubo
 
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチMIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチHironobu Fujiyoshi
 
【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A SurveyDeep Learning JP
 
ORB-SLAMの手法解説
ORB-SLAMの手法解説ORB-SLAMの手法解説
ORB-SLAMの手法解説Masaya Kaneko
 

La actualidad más candente (20)

20090924 姿勢推定と回転行列
20090924 姿勢推定と回転行列20090924 姿勢推定と回転行列
20090924 姿勢推定と回転行列
 
LiDAR点群とSfM点群との位置合わせ
LiDAR点群とSfM点群との位置合わせLiDAR点群とSfM点群との位置合わせ
LiDAR点群とSfM点群との位置合わせ
 
画像処理ライブラリ OpenCV で 出来ること・出来ないこと
画像処理ライブラリ OpenCV で 出来ること・出来ないこと画像処理ライブラリ OpenCV で 出来ること・出来ないこと
画像処理ライブラリ OpenCV で 出来ること・出来ないこと
 
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9
広告クリエイティブ制作におけるコンピュータビジョングラフィックデザイン CA Data Engineering & Data Analysis WS #9
 
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH
【DL輪読会】AUTOGT: AUTOMATED GRAPH TRANSFORMER ARCHITECTURE SEARCH
 
PRML輪読#1
PRML輪読#1PRML輪読#1
PRML輪読#1
 
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
 
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
 
最近のディープラーニングのトレンド紹介_20200925
最近のディープラーニングのトレンド紹介_20200925最近のディープラーニングのトレンド紹介_20200925
最近のディープラーニングのトレンド紹介_20200925
 
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
三次元点群処理ライブラリPCLと 統合ロボットシステム研究での 利用例の紹介
 
【CVPR 2020 メタサーベイ】Image Retrieval
【CVPR 2020 メタサーベイ】Image Retrieval【CVPR 2020 メタサーベイ】Image Retrieval
【CVPR 2020 メタサーベイ】Image Retrieval
 
CV分野におけるサーベイ方法
CV分野におけるサーベイ方法CV分野におけるサーベイ方法
CV分野におけるサーベイ方法
 
Sift特徴量について
Sift特徴量についてSift特徴量について
Sift特徴量について
 
mROS:組込みデバイス向けのROS1ノード軽量実行環境
mROS:組込みデバイス向けのROS1ノード軽量実行環境mROS:組込みデバイス向けのROS1ノード軽量実行環境
mROS:組込みデバイス向けのROS1ノード軽量実行環境
 
最適化超入門
最適化超入門最適化超入門
最適化超入門
 
3次元レジストレーション(PCLデモとコード付き)
3次元レジストレーション(PCLデモとコード付き)3次元レジストレーション(PCLデモとコード付き)
3次元レジストレーション(PCLデモとコード付き)
 
画像認識モデルを作るための鉄板レシピ
画像認識モデルを作るための鉄板レシピ画像認識モデルを作るための鉄板レシピ
画像認識モデルを作るための鉄板レシピ
 
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチMIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
 
【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey
 
ORB-SLAMの手法解説
ORB-SLAMの手法解説ORB-SLAMの手法解説
ORB-SLAMの手法解説
 

Más de Shion Honda

Bridging between Vision and Language
Bridging between Vision and LanguageBridging between Vision and Language
Bridging between Vision and LanguageShion Honda
 
Deep Learning Chap. 12: Applications
Deep Learning Chap. 12: ApplicationsDeep Learning Chap. 12: Applications
Deep Learning Chap. 12: ApplicationsShion Honda
 
Deep Learning Chap. 6: Deep Feedforward Networks
Deep Learning Chap. 6: Deep Feedforward NetworksDeep Learning Chap. 6: Deep Feedforward Networks
Deep Learning Chap. 6: Deep Feedforward NetworksShion Honda
 
画像認識 第9章 さらなる話題
画像認識 第9章 さらなる話題画像認識 第9章 さらなる話題
画像認識 第9章 さらなる話題Shion Honda
 
Towards Predicting Molecular Property by Graph Neural Networks
Towards Predicting Molecular Property by Graph Neural NetworksTowards Predicting Molecular Property by Graph Neural Networks
Towards Predicting Molecular Property by Graph Neural NetworksShion Honda
 
画像認識 6.3-6.6 畳込みニューラル ネットワーク
画像認識 6.3-6.6 畳込みニューラルネットワーク画像認識 6.3-6.6 畳込みニューラルネットワーク
画像認識 6.3-6.6 畳込みニューラル ネットワークShion Honda
 
深層学習による自然言語処理 第2章 ニューラルネットの基礎
深層学習による自然言語処理 第2章 ニューラルネットの基礎深層学習による自然言語処理 第2章 ニューラルネットの基礎
深層学習による自然言語処理 第2章 ニューラルネットの基礎Shion Honda
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...Shion Honda
 
IaGo: an Othello AI inspired by AlphaGo
IaGo: an Othello AI inspired by AlphaGoIaGo: an Othello AI inspired by AlphaGo
IaGo: an Othello AI inspired by AlphaGoShion Honda
 
Planning chemical syntheses with deep neural networks and symbolic AI
Planning chemical syntheses with deep neural networks and symbolic AIPlanning chemical syntheses with deep neural networks and symbolic AI
Planning chemical syntheses with deep neural networks and symbolic AIShion Honda
 

Más de Shion Honda (11)

Bridging between Vision and Language
Bridging between Vision and LanguageBridging between Vision and Language
Bridging between Vision and Language
 
Graph U-Nets
Graph U-NetsGraph U-Nets
Graph U-Nets
 
Deep Learning Chap. 12: Applications
Deep Learning Chap. 12: ApplicationsDeep Learning Chap. 12: Applications
Deep Learning Chap. 12: Applications
 
Deep Learning Chap. 6: Deep Feedforward Networks
Deep Learning Chap. 6: Deep Feedforward NetworksDeep Learning Chap. 6: Deep Feedforward Networks
Deep Learning Chap. 6: Deep Feedforward Networks
 
画像認識 第9章 さらなる話題
画像認識 第9章 さらなる話題画像認識 第9章 さらなる話題
画像認識 第9章 さらなる話題
 
Towards Predicting Molecular Property by Graph Neural Networks
Towards Predicting Molecular Property by Graph Neural NetworksTowards Predicting Molecular Property by Graph Neural Networks
Towards Predicting Molecular Property by Graph Neural Networks
 
画像認識 6.3-6.6 畳込みニューラル ネットワーク
画像認識 6.3-6.6 畳込みニューラルネットワーク画像認識 6.3-6.6 畳込みニューラルネットワーク
画像認識 6.3-6.6 畳込みニューラル ネットワーク
 
深層学習による自然言語処理 第2章 ニューラルネットの基礎
深層学習による自然言語処理 第2章 ニューラルネットの基礎深層学習による自然言語処理 第2章 ニューラルネットの基礎
深層学習による自然言語処理 第2章 ニューラルネットの基礎
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...
BERT: Pre-training of Deep Bidirectional Transformers for Language Understand...
 
IaGo: an Othello AI inspired by AlphaGo
IaGo: an Othello AI inspired by AlphaGoIaGo: an Othello AI inspired by AlphaGo
IaGo: an Othello AI inspired by AlphaGo
 
Planning chemical syntheses with deep neural networks and symbolic AI
Planning chemical syntheses with deep neural networks and symbolic AIPlanning chemical syntheses with deep neural networks and symbolic AI
Planning chemical syntheses with deep neural networks and symbolic AI
 

Último

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Último (20)

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 

BERTをブラウザで動かしたい! ―MobileBERTとTensorFlow.js―

  • 2. 発表内容 • TensorFlow.jsのMobileBERT Q&A モデルの紹介 • デモ • 応⽤例(プロトタイプ)の紹介 • MobileBERTとは • TensorFlow.js Q&Aモデル 2
  • 3. ⾃⼰紹介 3 • 本⽥ 志温(ほんだ しおん) • データサイエンティストっぽい仕事@リクルートライフスタイル • 3⽉までは東京⼤学⼤学院にてAI創薬の研究 • これまでも[cv/nl]paper.challengeで何度か発表してきました • ブログ: https://hippocampus-garden.com/
  • 4. MobileBERT Q&A モデルのデモ https://muppet.fandom.com/wiki/Bert 4 Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions. His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz), consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers. Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh. While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello" with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John. Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling. Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives, including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm. Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to Sesame Street, a special sneak preview special promoting Sesame Street. Passage (289 words)
  • 6. Answer #1: 正解 https://muppet.fandom.com/wiki/Bert 6 Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions. His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz), consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers. Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh. While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello" with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John. Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling. Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives, including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm. Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to Sesame Street, a special sneak preview special promoting Sesame Street. Answer: 123 Sesame Street
  • 7. Question #2 7 Question: What does Bert like to collect?
  • 8. Answer #2: 正解 https://muppet.fandom.com/wiki/Bert 8 Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions. His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz), consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers. Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh. While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello" with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John. Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling. Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives, including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm. Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to Sesame Street, a special sneak preview special promoting Sesame Street. Answer: paper clips and bottle caps
  • 9. Question #3 9 Question: Who is the best friend of Ernie?
  • 10. Answer #3: 不正解 https://muppet.fandom.com/wiki/Bert 10 Bert is Ernie's best friend and roommate on Sesame Street. The pair share the basement apartment at 123 Sesame Street. In contrast to the practical-joking, extroverted Ernie, Bert is serious, studious, and tries to make sense of his friend's actions. His own passions include reading Boring Stories, collecting paper clips and bottle caps (especially the rare Figgy Fizz), consuming oatmeal, and studying pigeons. While Ernie's best companion outside of Bert is Rubber Duckie, Bert has his pet pigeon, Bernice. True to his detail-oriented, organized mind, Bert is president of the National Association of W Lovers. Unfortunately for Bert, his nose has come off of his face on a number of occasions. He has a distinctive, bleating laugh. While Ernie has appeared in many of scenes without Bert, Bert has not been seen without Ernie quite so often. Notable exceptions include the songs "Doin' the Pigeon," "The Subway," "Bert's Blanket," and "Stick Out Your Hand and Say Hello" with Rick Moranis, as well as occasional Muppet/Kid scenes, such as discussing emotions with John John. Some of Bert's memorable moments include riding with Ernie in a plane in Follow That Bird, and interrupting The Adventures of Elmo in Grouchland whenever it looked like the movie was becoming unsettling. Bert's extended family includes his identical twin brother salesman Bart, infant nephew Brad, and several unseen relatives, including his Aunt Matilda, Uncle Bart (who gave Bert his first paper clip), and great-great-grandfather Mountain Mike. The album Sesame Street Sing-Along! also refers to Bert's Uncle Louie, who lives on a farm. Bert and Ernie were the only Muppets to appear in the Sesame Street Pilot Episodes, and they also hosted This Way to Sesame Street, a special sneak preview special promoting Sesame Street. Answer: (No Answer) *SQuADにはNo Answerの問題がある
  • 11. MobileBERT Q&A モデル 実⽤例 11 ブラウザのページ内検索(Ctrl+F)に質問を⼊⼒できる Chrome拡張機能のプロトタイプ. Google Developers Japan: ブラウザと Tensorflow.js を使った BERT の活⽤⽅法を考える より.
  • 12. 常に上⼿くいくわけではない 12 https://www.bedbathandbeyond.com/store/product/kitchenaid-reg-5-speed-diamond-blender/3242409 質問 What is the pitcher made of? 正答 BPA-free polycarbonate pitcher BERT Ice mode pulses at staggered intervals to uniformly crush a pitcher of ice in seconds
  • 14. 学習⽅法(蒸留)の⼯夫 14 • ⼩さいモデルをスクラッチで訓練してもうまくいかないため, BERT Largeからの蒸留を採⽤ • Progressive Knowledge Transfer: 下層から順に⼀層ずつ訓練 • 各層の特徴マップと注意マップを近づけていく • Pre-training Distilation: PKTの後にMLMの出⼒を合わせるような訓 練も⾏う
  • 15. アーキテクチャの⼯夫 15 BERT Large IB-BERT (Teacher) MobileBERT (Student) • PKTのために, 教師と⽣徒で各層の⼊出⼒サイズは⼀致させな ければならない • 教師は逆ボトルネック型にして, 性能を維持しつつ⼊出⼒サイズ縮⼩ • ⽣徒はボトルネック型にして, ⼊出⼒サイズを保ちつつモデル圧縮
  • 16. 性能評価 16 ハイパラ探索の結果, 以下の設定を採⽤ x0.25 GLUE SQuAD BERT BASEの4倍⾼速 (367ms) 汎化性能と各タスクの精度も維持 *BERT LARGEには負けている
  • 17. TensorFlow.jsとは • ブラウザで機械学習を実⾏するためのJavaScriptライブラリ • GPUはWebGL経由で使える • TensorFlowやKerasの学習済みモデルをインポートできる • React Nativeもサポート 17
  • 19. おまけ: Q&A以外の学習済みモデル 19 姿勢推定 (PoseNet) 有害テキストの検出 他にも⾳声コマンド認識など ブラウザで動く機械学習アプリケーションが作れる! https://www.tensorflow.org/js/models
  • 21. 参考⽂献など [1] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, Denny Zhou. “MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices.” ACL. 2020. [2] Google Developers Japan: ブラウザと Tensorflow.js を使った BERT の活⽤⽅法を考える [3] MobileBERT Q&Aモデルのデモ [4] tfjs-models/qna at master · tensorflow/tfjs-models [5] Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova. “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.” NACCL. 2019. [6] アバター: Ultraman Mebius by sousaguilherme5 21