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
Sashimimochi
April 30, 2024
Technology
680
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
490
Alert on Call with LLM
sashimimochi
1
330
My AI Copilot for writing
sashimimochi
1
340
GraphRAG: What I Thought I Knew (But Didn’t)
sashimimochi
1
860
Search Engineer diving into Kubernetes
sashimimochi
1
340
Using GPTs from Local by Dify
sashimimochi
1
970
Search Engine for Frontend Engineer
sashimimochi
0
310
Start Vector Search with Solr
sashimimochi
1
1.3k
Other Decks in Technology
See All in Technology
「今盗んで、後で解く」に備える ― AWSのポスト量子暗号入門
yama3133
2
240
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
4
1.3k
ScotSecure West 2026 - Glasgow
raybugg
0
170
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
140
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
300
時うどん〜Socket.getifaddrsで学ぶネットワーク編 / Tokiudon: The Socket.getifaddrs Edition
coe401_
4
270
AIは推し活である。
kurazuuuuuu
2
980
Argo CDとAtlantisで実現するインフラ管理のセルフサービス化──小規模SREチームで支えるプラットフォーム
cassius7
0
150
GitHub Agentic Workflows を触ってみる
htkym
2
590
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
6
760
AI Agent入門〜今更聞けないAgentの話〜
hiromimaganuma
0
120
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
100
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
11k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
For a Future-Friendly Web
brad_frost
183
10k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Rails Girls Zürich Keynote
gr2m
96
14k
How to make the Groovebox
asonas
2
2.5k
Between Models and Reality
mayunak
4
470
The Invisible Side of Design
smashingmag
301
52k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Designing for humans not robots
tammielis
254
26k
Building an army of robots
kneath
307
46k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
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にくらべて適当なプロンプトでもよしなに解釈して くれる