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
630
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
420
Alert on Call with LLM
sashimimochi
1
250
My AI Copilot for writing
sashimimochi
1
290
GraphRAG: What I Thought I Knew (But Didn’t)
sashimimochi
1
780
Search Engineer diving into Kubernetes
sashimimochi
1
310
Using GPTs from Local by Dify
sashimimochi
1
930
Search Engine for Frontend Engineer
sashimimochi
0
290
Start Vector Search with Solr
sashimimochi
1
1.2k
Other Decks in Technology
See All in Technology
Hatena Engineer Seminar 37 jj1uzh
jj1uzh
0
150
Why is RC4 still being used?
tamaiyutaro
0
110
起点・思考・出力で分解する 〜PM業務の自動化設計〜
kazu_kichi_67
2
1.1k
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
150
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
220
Lightning近況報告
kozy4324
0
230
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
0
160
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
200
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
360
4人目のSREはAgent
tanimuyk
0
280
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
千葉での単身赴任からAWSをやり続け、千葉に戻ってきた話
yama3133
1
120
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Utilizing Notion as your number one productivity tool
mfonobong
4
330
Evolving SEO for Evolving Search Engines
ryanjones
0
230
Building an army of robots
kneath
306
46k
Are puppies a ranking factor?
jonoalderson
1
3.7k
ラッコキーワード サービス紹介資料
rakko
1
3.8M
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
240
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
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にくらべて適当なプロンプトでもよしなに解釈して くれる