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
Max out Local LLM in Challenging Environments
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sashimimochi
April 30, 2024
Technology
3
550
Max out Local LLM in Challenging Environments
エンジニア達の「完全に理解した」Talk #52 で登壇したときのスライドです。
https://easy2.connpass.com/event/312501/
Sashimimochi
April 30, 2024
Tweet
Share
More Decks by Sashimimochi
See All by Sashimimochi
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
180
Alert on Call with LLM
sashimimochi
1
52
My AI Copilot for writing
sashimimochi
1
190
GraphRAG: What I Thought I Knew (But Didn’t)
sashimimochi
1
670
Search Engineer diving into Kubernetes
sashimimochi
1
230
Using GPTs from Local by Dify
sashimimochi
1
860
Search Engine for Frontend Engineer
sashimimochi
0
230
Start Vector Search with Solr
sashimimochi
1
1.2k
Other Decks in Technology
See All in Technology
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
AI駆動開発を事業のコアに置く
tasukuonizawa
1
340
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
3
220
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
200
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.4k
Red Hat OpenStack Services on OpenShift
tamemiya
0
130
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
390
マネージャー視点で考えるプロダクトエンジニアの評価 / Evaluating Product Engineers from a Manager's Perspective
hiro_torii
0
100
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
What happened to RubyGems and what can we learn?
mikemcquaid
0
310
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Amusing Abliteration
ianozsvald
0
100
Facilitating Awesome Meetings
lara
57
6.8k
[SF Ruby Conf 2025] Rails X
palkan
1
760
A better future with KSS
kneath
240
18k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
The agentic SEO stack - context over prompts
schlessera
0
640
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
120
Build your cross-platform service in a week with App Engine
jlugia
234
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
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にくらべて適当なプロンプトでもよしなに解釈して くれる