Large Language Models (LLMs) with MATLAB

Connect MATLAB to Ollama™ (for local LLMs), OpenAI® Chat Completions API (which powers ChatGPT™), and Azure® OpenAI Services
ダウンロード: 124
更新 2024/7/22

Large Language Models (LLMs) with MATLAB®

Open in MATLAB Online View Large Language Models (LLMs) with MATLAB on File Exchange

This repository contains code to connect MATLAB to the OpenAI™ Chat Completions API (which powers ChatGPT™), OpenAI Images API (which powers DALL·E™), Azure® OpenAI Service, and local Ollama® models. This allows you to leverage the natural language processing capabilities of large language models directly within your MATLAB environment.

Requirements

MathWorks Products (https://www.mathworks.com)

  • Requires MATLAB release R2024a or newer.
  • Some examples require Text Analytics Toolbox™.

3rd Party Products:

  • For OpenAI connections: An active OpenAI API subscription and API key.
  • For Azure OpenAI Services: An active Azure subscription with OpenAI access, deployment, and API key.
  • For Ollama: A local Ollama installation. Currently, only connections on localhost are supported, i.e., Ollama and MATLAB must run on the same machine.

Setup

See these pages for instructions specific to the 3rd party product selected:

MATLAB Online

To use this repository with MATLAB Online, click Open in MATLAB Online

MATLAB Desktop

To use this repository with a local installation of MATLAB, first clone the repository.

  1. In the system command prompt, run:

    git clone https://github.com/matlab-deep-learning/llms-with-matlab.git
  2. Open MATLAB and navigate to the directory where you cloned the repository.

  3. Add the directory to the MATLAB path.

    addpath('path/to/llms-with-matlab');

Examples

To learn how to use this in your workflows, see Examples.

License

The license is available in the license.txt file in this GitHub repository.

Community Support

MATLAB Central

Copyright 2023-2024 The MathWorks, Inc.

引用

MathWorks Text Analytics Toolbox Team (2024). Large Language Models (LLMs) with MATLAB (https://github.com/matlab-deep-learning/llms-with-matlab), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2024a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
3.0.0

Added Azure and Ollama support

1.0.1

Updating image.

1.0.0

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。