金子邦彦研究室人工知能人工知能の実行(Python を使用)(Windows 上)privateGPT のインストールと動作確認(大規模言語モデルと対話型AI)(Build Tools, Python を使用)(Windows 上)

privateGPT のインストールと動作確認(大規模言語モデルと対話型AI)(Build Tools, Python を使用)(Windows 上)

privateGPT のインストールと動作確認を行う.

目次

  1. 前準備
  2. privateGPT のインストール(Windows 上)
  3. privateGPT の動作確認(Windows 上)

関連する外部ページ

公式の GitHub のページ:https://github.com/imartinez/privateGPT

前準備

Git のインストール(Windows 上)

Gitは,バージョン管理システム.ソースコードの管理や複数人での共同に役立つ.

サイト内の関連ページ

Windows での Git のインストール: 別ページ »で説明している.

関連する外部ページ

Git の公式ページ: https://git-scm.com/

CMake のインストール(Windows 上)

CMake はビルドツールである.

サイト内の関連ページ

Windows での cmake のインストール: 別ページ »で説明している.

関連する外部ページ

CMake の公式ダウンロードページ: https://cmake.org/download/

Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022),Visual Studio 2022 のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Python のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Python の公式ページ: https://www.python.org/

OpenCV のインストール(Windows 上)

OpenCV 4.7.0 のインストール,動作確認(Windows 上): 別ページ »で説明している.

privateGPT のインストール(Windows 上)

  1. Windows で,コマンドプロンプト管理者として実行

    コマンドプロンプトを管理者として実行: 別ページ »で説明

  2. ソースコードのダウンロード,インストール,学習済みモデル ggml-gpt4all-j のダウンロード

    次のコマンドを実行.

    cd %HOMEPATH%
    rmdir /s /q privateGPT
    git clone https://github.com/imartinez/privateGPT.git
    cd privateGPT
    python -m pip install -r requirements.txt
    copy example.env .env
    mkdir models
    cd models
    curl -L -O https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin
    
  3. ingest.py の実行

    cd %HOMEPATH%\privateGPT
    python ingest.py
    

    [image]

privateGPT の動作確認(Windows 上)

次のコマンドを実行.

cd %HOMEPATH%\privateGPT
python privateGPT.py

プロンプトを入れ,しばらく待つ.プロンプトとして「Please explain about computer science for beginner.」を入れたときの実行結果は次の通り.

[image]