SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion ModelsDeep Learning JP
 
【DL輪読会】Patches Are All You Need? (ConvMixer)
【DL輪読会】Patches Are All You Need? (ConvMixer)【DL輪読会】Patches Are All You Need? (ConvMixer)
【DL輪読会】Patches Are All You Need? (ConvMixer)Deep Learning JP
 
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料Yusuke Uchida
 
【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習cvpaper. challenge
 
Transformerを雰囲気で理解する
Transformerを雰囲気で理解するTransformerを雰囲気で理解する
Transformerを雰囲気で理解するAtsukiYamaguchi1
 
ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争Yosuke Shinya
 
Transformer メタサーベイ
Transformer メタサーベイTransformer メタサーベイ
Transformer メタサーベイcvpaper. challenge
 
画像キャプションの自動生成
画像キャプションの自動生成画像キャプションの自動生成
画像キャプションの自動生成Yoshitaka Ushiku
 
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用SSII
 
畳み込みニューラルネットワークの高精度化と高速化
畳み込みニューラルネットワークの高精度化と高速化畳み込みニューラルネットワークの高精度化と高速化
畳み込みニューラルネットワークの高精度化と高速化Yusuke Uchida
 
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)Deep Learning JP
 
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"Deep Learning JP
 
Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)Yamato OKAMOTO
 
IIBMP2016 深層生成モデルによる表現学習
IIBMP2016 深層生成モデルによる表現学習IIBMP2016 深層生成モデルによる表現学習
IIBMP2016 深層生成モデルによる表現学習Preferred Networks
 
SSII2022 [OS3-02] Federated Learningの基礎と応用
SSII2022 [OS3-02] Federated Learningの基礎と応用SSII2022 [OS3-02] Federated Learningの基礎と応用
SSII2022 [OS3-02] Federated Learningの基礎と応用SSII
 
ChatGPT 人間のフィードバックから強化学習した対話AI
ChatGPT 人間のフィードバックから強化学習した対話AIChatGPT 人間のフィードバックから強化学習した対話AI
ChatGPT 人間のフィードバックから強化学習した対話AIShota Imai
 
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View SynthesisDeep Learning JP
 
Data-Centric AI開発における データ生成の取り組み
Data-Centric AI開発における データ生成の取り組みData-Centric AI開発における データ生成の取り組み
Data-Centric AI開発における データ生成の取り組みTakeshi Suzuki
 

Was ist angesagt? (20)

【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
 
【DL輪読会】Patches Are All You Need? (ConvMixer)
【DL輪読会】Patches Are All You Need? (ConvMixer)【DL輪読会】Patches Are All You Need? (ConvMixer)
【DL輪読会】Patches Are All You Need? (ConvMixer)
 
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
 
【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習
 
Transformerを雰囲気で理解する
Transformerを雰囲気で理解するTransformerを雰囲気で理解する
Transformerを雰囲気で理解する
 
ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争
 
Transformer メタサーベイ
Transformer メタサーベイTransformer メタサーベイ
Transformer メタサーベイ
 
画像キャプションの自動生成
画像キャプションの自動生成画像キャプションの自動生成
画像キャプションの自動生成
 
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用
SSII2021 [OS2-03] 自己教師あり学習における対照学習の基礎と応用
 
畳み込みニューラルネットワークの高精度化と高速化
畳み込みニューラルネットワークの高精度化と高速化畳み込みニューラルネットワークの高精度化と高速化
畳み込みニューラルネットワークの高精度化と高速化
 
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
 
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
 
Data-Centric AIの紹介
Data-Centric AIの紹介Data-Centric AIの紹介
Data-Centric AIの紹介
 
Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)
 
IIBMP2016 深層生成モデルによる表現学習
IIBMP2016 深層生成モデルによる表現学習IIBMP2016 深層生成モデルによる表現学習
IIBMP2016 深層生成モデルによる表現学習
 
SSII2022 [OS3-02] Federated Learningの基礎と応用
SSII2022 [OS3-02] Federated Learningの基礎と応用SSII2022 [OS3-02] Federated Learningの基礎と応用
SSII2022 [OS3-02] Federated Learningの基礎と応用
 
ChatGPT 人間のフィードバックから強化学習した対話AI
ChatGPT 人間のフィードバックから強化学習した対話AIChatGPT 人間のフィードバックから強化学習した対話AI
ChatGPT 人間のフィードバックから強化学習した対話AI
 
Lucas kanade法について
Lucas kanade法についてLucas kanade法について
Lucas kanade法について
 
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
 
Data-Centric AI開発における データ生成の取り組み
Data-Centric AI開発における データ生成の取り組みData-Centric AI開発における データ生成の取り組み
Data-Centric AI開発における データ生成の取り組み
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Kürzlich hochgeladen (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.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