[GPT4All] ThinkPadでもChatGPT風なチャットAIを使いたい!

[GPT4All] ThinkPadでもChatGPT風なチャットAIを使いたい!

ChatGPTが流行っている今、様々なチャットAIが世に出てきています。

最近だと、alpaca.cpp (https://github.com/antimatter15/alpaca.cpp)やllama.cpp(https://github.com/ggerganov/llama.cpp)などがあるが、今回はThinkPadにGPT4Allを入れて遊んでみました。

GPT4Allとは

詳細についてはGPT4Allのリポジトリを参照(https://github.com/nomic-ai/gpt4all)

GPT4Allは、単語問題、物語の説明、マルチターンの対話、プログラムなどを含むアシスタントでトレーニングされたチャットボットです。

使用したPCについて

CPUで動作するため、先日購入したThinkPad X1 Carbon(2018)でも動作するのではないかと思い、入れてみました。

こんな感じのラップトップです。↓

機種: ThinkPad X1 Carbon 6 gen (2018)

CPU: Intel Core i5 8th gen

メモリ: 16GB

OS: Arch Linux

導入

簡単に使えるようになりました。

https://github.com/nomic-ai/gpt4all#try-it-yourself こちらを参考に準備しました。

  1. まず、 Direct Link か [Torrent-Magnet]からgpt4all-lora-quantized.bin ファイルをダウンロードします。
  2. 次に、このリポジトリをクローンし、chatに移動して、ダウンロードしたファイルをそこに配置します。
    • git clone https://github.com/nomic-ai/gpt4all.git && cd gpt4all
  3. OSに合わせたコマンドを実行します:
    M1 Mac/OSX: cd chat; ./gpt4all-lora-quantized-OSX-m1
    Linux: cd chat; ./gpt4all-lora-quantized-linux-x86
    Windows (PowerShell): cd chat; ./gpt4all-lora-quantized-win64.exe
    Intel Mac/OSX: cd chat; ./gpt4all-lora-quantized-OSX-intel

会話してみた

$ cd chat;./gpt4all-lora-quantized-linux-x86 -m gpt4all-lora-unfiltered-quantized.bin
main: seed = 1680424481
llama_model_load: loading model from ‘gpt4all-lora-unfiltered-quantized.bin’ – please wait …
llama_model_load: ggml ctx size = 6065.35 MB
llama_model_load: memory_size = 2048.00 MB, n_mem = 65536
llama_model_load: loading model part 1/1 from ‘gpt4all-lora-unfiltered-quantized.bin’
llama_model_load: ……………………………… done
llama_model_load: model size = 4017.27 MB / num tensors = 291

system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 |
main: interactive mode on.
sampling parameters: temp = 0.100000, top_k = 40, top_p = 0.950000, repeat_last_n = 64, repeat_penalty = 1.300000

== Running in chat mode. ==

  • Press Ctrl+C to interject at any time.
  • Press Return to return control to LLaMA.
  • If you want to submit another line, end your input in ‘\’.

hello~! // 筆者が打ったコメント
Hello World!! //GPT4Allから返ってきたコメント
how are you? // 筆者
I’m doing well, thanks for asking 🙂 // GPT4All

日本語は苦手みたいです。

こんにちは。元気ですか? // 筆者
私は、あなたの寄杭を持つように思いましております! どうヘッドさせるときは「頑張って下さい」です。 // GPT4All