Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Max out Local LLM in Challenging Environments
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sashimimochi
April 30, 2024
Technology
700
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Max out Local LLM in Challenging Environments
エンジニア達の「完全に理解した」Talk #52 で登壇したときのスライドです。
https://easy2.connpass.com/event/312501/
Sashimimochi
April 30, 2024
More Decks by Sashimimochi
See All by Sashimimochi
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
1
530
Alert on Call with LLM
sashimimochi
1
350
My AI Copilot for writing
sashimimochi
1
350
GraphRAG: What I Thought I Knew (But Didn’t)
sashimimochi
1
880
Search Engineer diving into Kubernetes
sashimimochi
1
350
Using GPTs from Local by Dify
sashimimochi
1
980
Search Engine for Frontend Engineer
sashimimochi
0
320
Start Vector Search with Solr
sashimimochi
1
1.3k
Other Decks in Technology
See All in Technology
大型犬好きによるPugの紹介
yamanoku
1
160
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
300
Local CI × GitHub Actions
gogutan
2
220
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
170
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
3
570
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
140
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
440
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
310
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.3k
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
360
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Practical Orchestrator
shlominoach
192
12k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Six Lessons from altMBA
skipperchong
29
4.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Rails Girls Zürich Keynote
gr2m
96
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
ここまで使えるローカルLLM さしみもち 弱小環境でも 💪 2024/4/30 【オンライン】エンジニア達の「完全に理解した」Talk #52
自己紹介 2 さしみもち @Sashimimochi343 普段は年間数十億件のトラフィック がある検索システムの開発・運用や データ分析基盤の運用をしてます。 最近は、検索エンジンとLLMの連携 でなんかおもしろいことができない か日夜研究しています。
3 世は空前の第4次AIブーム https://speakerdeck.com/pfn/llmnoxian-zai?slide=14
富めるものだけが開発できる世界? 4 GPT-4 APIは値段が... セキュリティ的に 許可が下りない... 申請が通るまで時 間がかかる Rate Limitが...
富めるものだけが開発できる世界? 5 クラウド借りる費用 もないし... APIじゃないとシステム に組み込みづらいし... GPUがあるわけ じゃないし... あきらめるしかないの?
弱小環境でも なんとかなります! 6 大丈夫!!
想定マシンスペック 7 CPU 6 Core (Ryzen) Memory 16GB ※2 Core
(Intel Core i5), Memory 8GB でも頑張れば動くことも確認しています 標準的なスペックのノートPCがあれば動かせる!!
その他前提条件 8 使用するモデル お話ししないこと • Quality • パフォーマンス • コスパ
• Calm2-chat-7b • llava-v1.5-7b 素だと16GB程度のGPUが必要なモデル
弱小環境の強い味方!その名も「量子化」 9 量子化によってCPUだけでも動かせるようになる! イメージ:厳密さは捨ててざっくり計算するようにする ex. 円周率πはだいたい3で良いじゃんね!? https://laboro.ai/activity/column/engineer/%e3%83%87%e3%82%a3%e3%83%bc%e3%83%97%e3%83%a9%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e 3%82%92%e8%bb%bd%e9%87%8f%e5%8c%96%e3%81%99%e3%82%8b%e3%83%a2%e3%83%87%e3%83%ab%e5%9c%a7%e7%b8%ae/
おすすめの量子化ライブラリ 10 https://github.com/ggerganov/llama.cpp https://github.com/abetlen/llama-cpp-python LLMをローカルからクラウドまで幅広い環境で簡単かつベストパフォーマンスで 動かせることを目指したC++製のツール
できること1:マルチターンチャット 11 https://github.com/Sashimimochi/llm-chat-playbook できます!
できること2:RAG 12 できます! https://github.com/Sashimimochi/llm-chat-playbook
できること3:Function Calling 13 https://github.com/Sashimimochi/llm-chat-playbook https://zenn.dev/kazuwombat/articles/1f39f003298028 より できます!
できること4:Vision and Language 14 https://github.com/Sashimimochi/llava-python-sample https://llava-vl.github.io/llava-interactive/ より できます!
15 そのほかにも https://qiita.com/SH2/items/1d5ee5b898046ff89458 より https://qiita.com/moritalous/items/76ba9f2ad200df335d07 より GitHub Copilot Like なツール
チャットのトレースやメトリクスを収 集できるツール できます!
量子化モデルがない?自分ですればいいじゃない! 16 https://github.com/Sashimimochi/llm-quantize-sample できます!
もっと知りたい方は 17 https://zenn.dev/sashimimochi/articles/be1122c813d989 https://zenn.dev/sashimimochi/articles/29d78fadaf8b17
詳細は来月の技術書典16 で出すかも 18
まとめ 19 • 量子化モデルを使えばノートPCでも動かせる • メジャーな機能がサポートされたAPI完備 • オフラインでも稼働するローカルモデルならではの強み これでセキュリティやお金はLLM組み込みシステムを開発 しない理由にはならなくなりましたね
😁
APPENDIX 20
参考文献 21 • 横須賀市役所の「ChatGPT実用化実験」の実施内容まとめ ◦ https://bocek.co.jp/media/news/1498/ • “生成AI”全国の自治体で約9割が導入 業務の作業時間が平均3分の1に短縮の事例も ◦
https://news.tv-asahi.co.jp/news_society/articles/000343740.html • 生成AIカオスマップ 国内向けサービスを初公開!掲載数は258製品! ◦ https://aismiley.co.jp/ai_news/generativeai-chaosmap/ • 国産LLMに期待する企業は7割以上、MM総研が生成AIの利活用を調査 ◦ https://xtech.nikkei.com/atcl/nxt/news/24/00459/ • 緊急パネル:ChatGPTで自然言語処理は終わるのか? ◦ https://www.anlp.jp/nlp2023/#special_panel
参考文献 22 • 言語処理学会第30回年次大会(NLP2024)併設ワークショップ 自治体における生成 AI(ChatGPT)の利活用と問題点 ◦ https://broccoli-farm.jp/workshop-nlp2024/ • ELYZAとKDDIグループ、生成AIの社会実装に向け資本業務提携を締結
◦ https://news.kddi.com/kddi/corporate/newsrelease/2024/03/18/7333.html • AI Shift、カスタマーサポートに特化した各企業専用LLM構築サービスを提供開始 ◦ https://www.cyberagent.co.jp/news/detail/id=28841 • オフラインでも使えるAIチャットアプリ、ローカルLLMパッケージの販売を開始 ◦ https://prtimes.jp/main/html/rd/p/000000027.000065047.html • 日本語LLM 9種を量子化して回答内容を比較調査してみた ◦ https://qiita.com/wayama_ryousuke/items/50e36d0dcb37f8fb7dd8
素材集 23 • ぱくたそ ◦ https://www.pakutaso.com/
ローカルモデルとSaaSモデルのどっちを使う? 24 https://jedworkshop.github.io/JLR2024/materials/b-1.pdf
もちろん、有償サービスにはそれだけの価値がある 25 • お金がかかるだけのことはある • 作り込むなら買った方が安いかも • ローカルLLMにくらべて適当なプロンプトでもよしなに解釈して くれる